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
/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/kline - Full URL: https://quote.alltick.co/quote-stock-b-api/kline
- Base Path:
/quote-b-api/kline - Full URL: https://quote.alltick.co/quote-b-api/kline
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=queryDataRequest 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.