Skip to main content

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 /kline interface 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-kline interface to batch request the latest 2 K-lines for multiple products and update the database with the data.
This approach can quickly update the latest K-lines while avoiding frequency restrictions caused by frequent historical K-line requests.

Request Frequency

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 API Endpoint: 2. Forex, Precious Metals, Cryptocurrencies, Crude Oil, CFD Indices, and Commodities API Endpoint:

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_token

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.

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.