POST Query the latest 2 K lines of products in batches
English / 中文
Post /batch-kline
Please refer to the complete URL in API Address Description
Interface Description
This interface can query multiple products in batches at one time, and can query multiple k-line types in batches at one time (k-line types refer to 1 minute, 15 minutes, 30 minutes, etc.), but can only query the latest 2 k-lines in batches.
Request Frequency
Free
1、1 request allowed every 10 seconds.
2、Each query can batch retrieve 10 items, where 10 equals the product count times the candlestick type.
1、One request per second.
2、/batch-kline needs 10-second intervals.
3、Total of 10 requests per minute (every 6 seconds).
4、Max 14400 daily requests; excess resets at midnight.
Basic
1、1 request every 3 seconds.
2、Each query can batch retrieve 100 items, where 100 equals the product count times the candlestick type.
1、One request per second.
2、/batch-kline: 1 request every 3 seconds.
3、Total of 60 requests per minute (1 request per second).
4、Max 86400 daily requests; excess resets at midnight.
Premium
1、1 request every 2 seconds.
2、Each query can batch retrieve 200 items, where 200 equals the product count times the candlestick type.
1、Combined interfaces: 10 requests/second.
2、/batch-kline: 1 request/2 seconds.
3、Total: 600 requests/minute (10/second).
4、Daily limit: 864,000 requests; reset daily at midnight if exceeded.
Professional
1、1 request per second.
2、Each query can batch retrieve 500 items, where 500 equals the product count times the candlestick type.
1、Combined interfaces: 20 requests/second.
2、/batch-kline: 1 request/second interval.
3、Total: 1200 requests/minute (20/second).
4、Daily limit: 1,728,000 requests; reset daily at midnight if exceeded.
All HK Stocks
1、1 request per second.
2、Each query can batch retrieve 500 items, where 500 equals the product count times the candlestick type.
1、Combined interfaces: 20 requests/second.
2、/batch-kline: 1 request/second interval.
3、Total: 1200 requests/minute (20/second).
4、Daily limit: 1,728,000 requests; reset daily at midnight if exceeded.
All CN Stocks
1、1 request per second.
2、Each query can batch retrieve 500 items, where 500 equals the product count times the candlestick type.
1、Combined interfaces: 20 requests/second.
2、/batch-kline: 1 request/second interval.
3、Total: 1200 requests/minute (20/second).
4、Daily limit: 1,728,000 requests; reset daily at midnight if exceeded.
API Endpoints
US Stocks, Hong Kong Stocks, A Shares, Major Index Data API Endpoints:
Base Path:
/quote-stock-b-api/batch-kline
Full URL:
https://quote.alltick.io/quote-stock-b-api/batch-kline
Forex, Precious Metals, Cryptocurrencies, Commodities API Endpoints:
Base Path:
/quote-b-api/batch-kline
Full URL:
https://quote.alltick.io/quote-b-api/batch-kline
Request Examples
Request Example for US Stocks, Hong Kong Stocks, A Shares, Major Index Data: The batch query function for retrieving the latest K-line data requires many parameters, which should be included in the request body. Only the
token
parameter should be included in the URL. When sending the query request, you must include the method name and token information. An example request is as follows:Request Example for Forex, Precious Metals, Cryptocurrencies, Commodities: The batch query function for retrieving the latest K-line data requires many parameters, which should be included in the request body. Only the
token
parameter should be included in the URL. When sending the query request, you must include the method name and token information. An example request is as follows:
Additional Notes
For both endpoints, the batch query parameters are expected to be provided in the request body, as the number of parameters can be extensive.
Ensure that the token parameter is included in the URL for authentication purposes.
Request Parameters
token
query
string
No
query
query
string
No
See explanation of query request parameters below
Query Request Parameters
The following JSON should be URL-encoded and assigned to the query
query string in the URL.
Query Request Parameters
trace
string
Yes
data
object
Yes
» symbol_list
[object]
Yes
»» code
string
No
Code
Response Example
Response Result
200
OK
OK
Inline
» 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
»»» tick_time
string
false
Timestamp
»»» price
string
false
Price
»»» volume
string
false
Volume
»»» turnover
string
false
Turnover
»»» trade_direction
integer
false
Trading direction, 0 for default, 1 for BUY, 2 for SELL
Official Website
Official website: https://alltick.co/
Last updated
Was this helpful?