Skip to main content

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

PlanIndividual RequestMultiple HTTP Interfaces Requested Together
Free1. 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.
Basic1. 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.
Premium1. 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.
Professional1. 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 Stocks1. 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 Shares1. 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 Stocks1. 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

  1. Be sure to read: HTTP Interface Restrictions
  2. Be sure to read: Error Code Description

API Endpoints

1. US Stocks, Hong Kong Stocks, A Shares, and Major Index Data: 2. Forex, Precious Metals, Cryptocurrencies, Crude Oil, CFD Indices, and Commodities:

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=queryData

Request Parameters

NamePositionTypeRequiredDescription
tokenquerystringNo
queryquerystringNoSee the query request parameter description.

Query Request Parameters

URL-encode the following JSON and assign it to the query query string in the URL.
{
  "trace": "edd5df80-df7f-4acf-8f67-68fd2f096426",
  "data": {
    "symbol_list": [
      {
        "code": "857.HK"
      },
      {
        "code": "UNH.US"
      }
    ]
  }
}
NameTypeRequiredDescription
tracestringYes
dataobjectYes
» symbol_list[object]Yes
»» codestringNoCode. 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

{
  "ret": 200,
  "msg": "ok",
  "trace": "edd5df80-df7f-4acf-8f67-68fd2f096426",
  "data": {
    "tick_list": [
      {
        "code": "857.HK",
        "seq": "30841439",
        "tick_time": "1677831545217",
        "price": "136.302",
        "volume": "0",
        "turnover": "0",
        "trade_direction": 0
      }
    ]
  }
}

Response Result

Status CodeStatus MeaningDescriptionData Model
200OKOKInline

Response Data Structure

NameTypeRequiredDescription
» retintegertrueReturn code
» msgstringtrueMessage corresponding to the return code
» tracestringtrueRequest trace
» dataobjecttrue
»» tick_list[object]true
»»» codestringfalseCode
»»» seqstringfalseSequence number
»»» tick_timestringfalseTimestamp
»»» pricestringfalseTrade price
»»» volumestringfalseTrade volume
»»» turnoverstringfalseTurnover
»»» trade_directionintegerfalseTrade 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.