Skip to main content

GET /kline

Interface Description

This interface can be used to query historical K-lines, but each request can query only one product. It is recommended to cache the queried historical K-lines in a local database. 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: When sending a query request, you must include the method name and token information. Example: https://quote.alltick.co/quote-stock-b-api/kline?token=your_token&query=queryData 2. Request example for Forex, Precious Metals, Cryptocurrencies, Crude Oil, CFD Indices, and Commodities: When sending a query request, you must include the method name and token information. Example: https://quote.alltick.co/quote-b-api/kline?token=your_token&query=queryData

Request Parameters

Query Request Parameters

Response Example

Response Result

Response Data Structure

AllTick Website

Official website: https://alltick.co/

Interface Debug

Open GET /kline Debug Module

Use the debuggable module to fill in parameters and send requests.