POST /batch-kline
Interface Description
This interface can batch query multiple products at once, and can also batch query multiple K-line types at once (K-line types refer to 1-minute, 15-minute, 30-minute, etc.). However, it can only batch query the latest 2 K-lines. For customers using HTTP interfaces to obtain K-lines, we recommend using/kline together with /batch-kline as follows:
- First, use the
/klineinterface to poll historical data and store it in a local database. Later historical data can be obtained directly from the customer’s database without making another interface request. - Then, continuously use the
/batch-klineinterface to batch request the latest 2 K-lines for multiple products and update the database with the data.
Request Frequency
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 API Endpoint:- Base Path:
/quote-stock-b-api/batch-kline - Full URL: https://quote.alltick.co/quote-stock-b-api/batch-kline
- Base Path:
/quote-b-api/batch-kline - Full URL: https://quote.alltick.co/quote-b-api/batch-kline
Request Examples
1. Request example for US Stocks, Hong Kong Stocks, A Shares, and Major Index Data: For batch querying the latest K-lines of products, because there are many batch query parameters, they are placed in the body. Only the token parameter is kept in the URL parameters. When sending a query request, you must include the method name and token information. Example: https://quote.alltick.co/quote-stock-b-api/batch-kline?token=your_token 2. Request example for Forex, Precious Metals, Cryptocurrencies, Crude Oil, CFD Indices, and Commodities: For batch querying the latest K-lines of products, because there are many batch query parameters, they are placed in the body. Only the token parameter is kept in the URL parameters. When sending a query request, you must include the method name and token information. Example: https://quote.alltick.co/quote-b-api/batch-kline?token=your_tokenFor batch querying the latest K-lines of products, because there are many batch query parameters, they are placed in the body. Only the token parameter is kept in the URL parameters.
Body Request Parameters
Request Parameters
Response Example
Response Result
AllTick Website
Official website: https://alltick.co/
Interface Debug
Open POST /batch-kline Debug Module
Use the debuggable module to fill in parameters and send requests.