API Capabilities
This API provides historical K-line market data queries for various global financial instruments (including stocks, forex, futures, precious metals, cryptocurrencies, stock indices, etc.). It supports multiple timeframes from 1 minute to monthly (e.g., 1M, 5M, 15M, 30M, 1H, 4H, D, W, M). Based on the specified date and period, the API returns K-line data containing core metrics such as timestamp, open price, high price, low price, close price, and volume.
Request and Response
The request requires the instrument contract code (symbol), timeframe (period), base date (date), and whether to include the latest dynamic K-line (withlast). In the response, the Obj field contains a semicolon-separated string of K-line data. Each data group is comma-separated, representing: timestamp, open price, high price, low price, close price, open interest (for some instruments), and volume, respectively. Data is sorted from the start time to the end time.
Use Cases
- Quantitative Trading Backtesting: Obtain historical K-line data for writing and validating quantitative trading strategies and performing historical market backtesting.
- Financial Charting: Provide historical K-line data sources for financial news apps or websites, used for drawing K-line charts and technical indicator analysis.
- Market Data Analysis: For financial researchers or developers to conduct historical price trend analysis, volatility calculations, and academic research.