GET /trade-tick
Interface Description
This interface supports batch requests for the latest trade price of products (latest tick data, also the current price or latest price). It does not support requests for historical trade prices (historical tick data).Request Frequency
| Plan | Individual Request | Multiple HTTP Interfaces Requested Together |
|---|---|---|
| Free | 1. One request every 10 seconds. 2. Up to 5 products can be queried in one batch. | 1. Only one interface request every 10 seconds. 2. When requesting multiple interfaces, note that /batch-kline requires a 10-second interval. 3. All interfaces combined: maximum 10 requests per minute (one every 6 seconds). 4. Maximum 1,000 requests per day; usage resumes after midnight the next day if exceeded. |
| Basic | 1. One request per second. 2. Due to GET URL length limits, a maximum of 50 codes per request is recommended. | 1. Only one interface request in the same second. 2. When requesting multiple interfaces, note that /batch-kline requires a 3-second interval. 3. All interfaces combined: maximum 60 requests per minute (one per second). 4. Maximum 86,400 requests per day; usage resumes after midnight the next day if exceeded. |
| Premium | 1. Up to 10 requests per second. 2. Due to GET URL length limits, a maximum of 50 codes per request is recommended. | 1. All interfaces combined: up to 10 requests per second. 2. When requesting multiple interfaces, note that /batch-kline requires a 2-second interval. 3. All interfaces combined: maximum 600 requests per minute (10 per second). 4. Maximum 864,000 requests per day; usage resumes after midnight the next day if exceeded. |
| Professional | 1. Up to 20 requests per second. 2. Due to GET URL length limits, a maximum of 50 codes per request is recommended. | 1. All interfaces combined: up to 20 requests per second. 2. When requesting multiple interfaces, note that /batch-kline requires a 1-second interval. 3. All interfaces combined: maximum 1,200 requests per minute (20 per second). 4. Maximum 1,728,000 requests per day; usage resumes after midnight the next day if exceeded. |
| All Hong Kong Stocks | 1. Up to 20 requests per second. 2. Due to GET URL length limits, a maximum of 50 codes per request is recommended. | 1. All interfaces combined: up to 20 requests per second. 2. When requesting multiple interfaces, note that /batch-kline requires a 1-second interval. 3. All interfaces combined: maximum 1,200 requests per minute (20 per second). 4. Maximum 1,728,000 requests per day; usage resumes after midnight the next day if exceeded. |
| All A Shares | 1. Up to 20 requests per second. 2. Due to GET URL length limits, a maximum of 50 codes per request is recommended. | 1. All interfaces combined: up to 20 requests per second. 2. When requesting multiple interfaces, note that /batch-kline requires a 1-second interval. 3. All interfaces combined: maximum 1,200 requests per minute (20 per second). 4. Maximum 1,728,000 requests per day; usage resumes after midnight the next day if exceeded. |
| All US Stocks | 1. Up to 20 requests per second. 2. Due to GET URL length limits, a maximum of 50 codes per request is recommended. | 1. All interfaces combined: up to 20 requests per second. 2. When requesting multiple interfaces, note that /batch-kline requires a 1-second interval. 3. All interfaces combined: maximum 1,200 requests per minute (20 per second). 4. Maximum 1,728,000 requests per day; usage resumes after midnight the next day if exceeded. |
Interface Limitations
- Be sure to read: HTTP Interface Restrictions
- Be sure to read: Error Code Description
API Endpoints
1. US Stocks, Hong Kong Stocks, A Shares, and Major Index Data:- Base Path:
/quote-stock-b-api/trade-tick - Full URL: https://quote.alltick.co/quote-stock-b-api/trade-tick
- Base Path:
/quote-b-api/trade-tick - Full URL: https://quote.alltick.co/quote-b-api/trade-tick
Request Examples
1. US Stocks, Hong Kong Stocks, A Shares, and Major Index Data: When sending a query request, include the method name and token information. Example: https://quote.alltick.co/quote-stock-b-api/trade-tick?token=your_token&query=queryData 2. Forex, Precious Metals, Cryptocurrencies, Crude Oil, CFD Indices, and Commodities: When sending a query request, include the method name and token information. Example: https://quote.alltick.co/quote-b-api/trade-tick?token=your_token&query=queryDataRequest Parameters
| Name | Position | Type | Required | Description |
|---|---|---|---|---|
| token | query | string | No | |
| query | query | string | No | See the query request parameter description. |
Query Request Parameters
URL-encode the following JSON and assign it to thequery query string in the URL.
| Name | Type | Required | Description |
|---|---|---|---|
| trace | string | Yes | |
| data | object | Yes | |
| » symbol_list | [object] | Yes | |
| »» code | string | No | Code. Select the code you want to query from the code list. Note: The code value is case-sensitive and must match the code in the product list. |
Response Example
Response Result
| Status Code | Status Meaning | Description | Data Model |
|---|---|---|---|
| 200 | OK | OK | Inline |
Response Data Structure
| Name | Type | Required | Description |
|---|---|---|---|
| » ret | integer | true | Return code |
| » msg | string | true | Message corresponding to the return code |
| » trace | string | true | Request trace |
| » data | object | true | |
| »» tick_list | [object] | true | |
| »»» code | string | false | Code |
| »»» seq | string | false | Sequence number |
| »»» tick_time | string | false | Timestamp |
| »»» price | string | false | Trade price |
| »»» volume | string | false | Trade volume |
| »»» turnover | string | false | Turnover |
| »»» trade_direction | integer | false | Trade direction: 1. 0 is the default value, 1 is Buy, and 2 is Sell. 2. Forex, precious metals, and energy return 1 by default. 3. Stocks and cryptocurrencies may return 0, 1, or 2 depending on market conditions. 4. Details: 0: Neutral, meaning the trade was matched at a price between the best bid and best ask. 1: Aggressive buy, meaning the trade was executed at the ask price or higher. 2: Aggressive sell, meaning the trade was executed at the bid price or lower. |
AllTick Website
Official website: https://alltick.co/
Interface Debug
Open GET /trade-tick Debug Module
Use the debuggable module to fill in parameters and send requests.