For developers and traders building financial dashboards or algorithmic trading bots, reliable historical candlestick (kline) data is the bedrock of technical analysis. Whether you are backtesting a strategy or visualizing market trends, the Alltick API provides a streamlined REST interface to pull this data across various asset classes.
In this guide, we’ll break down how to use the Alltick kline endpoint, parameter requirements, and how your subscription plan impacts data depth.
Understanding the Alltick Kline Endpoint
The primary endpoint for retrieving historical kline data is:
This interface utilizes a GET method. Unlike standard REST APIs that use simple key-value pairs in the URL, Alltick requires parameters to be passed within a JSON query string.
Request Structure & Parameters
To successfully query the API, you must provide a token for authentication and a query object. Here is the breakdown of the essential parameters:
| Parameter | Type | Description |
| token | String | Your unique API authentication key. |
| code | String | The asset symbol (e.g., BTCUSDT for Crypto, AAPL for Stocks). |
| kline_type | Integer | The timeframe interval (e.g., 8 often represents a Daily interval). |
| kline_timestamp_end | Integer | The ending Unix timestamp for your data range. |
| query_kline_num | Integer | Total number of candlesticks to return in one request. |
| adjust_type | Integer | Specifies price adjustment (e.g., for stock splits or dividends). |
Pro Tip: Always ensure your
kline_timestamp_endis in the correct Unix format (seconds) to avoid empty responses or synchronization errors.
Data Availability by Subscription Tier
The “look-back” period—how far into the past you can query—is determined by your specific Alltick plan. Before building your data pipeline, verify your requirements against these limits:
1. Standard Multi-Asset Plans
These plans are ideal for general market analysis and crypto-focused projects.
- Free & Basic: Access up to 1 year of historical data.
- Premium: Access up to 3 years of historical data.
- Professional: Access up to 5 years of historical data.
2. Regional Stock Plans (HK/CN/US)
If you are subscribed to specific regional stock packages (Hong Kong, China, or US markets), the historical depth is typically limited to the most recent 500 candlesticks. This is generally sufficient for short-term swing trading and intraday analysis.
Why Use Alltick for Historical Data?
Using the quote-b-api/kline endpoint offers several advantages for fintech developers:
- Consistency: Get the same high-quality data used by institutional-grade platforms.
- Scalability: Start for free and upgrade as your backtesting needs grow from 1 year to 5 years of depth.
- Versatility: A single endpoint structure handles everything from Forex and Crypto to Global Equities.
Ready to start coding? Head over to your Alltick dashboard to grab your API token and begin integrating real-time and historical market data into your application today.


