Global Futures Candlestick Charts
Global Futures Candlestick Charts
Documentation
API Introduction
This API provides historical K-line market data for major international futures products. It supports obtaining a complete OHLCV data array, including open, close, high, low, trading volume, and timestamp, by specifying the futures code and time period (e.g., 1-minute, 5-minute, 30-minute, 60-minute, daily K-line, etc.).
Use Cases
- Quantitative Trading Strategy Backtesting: Obtain high-frequency or low-frequency historical data for model training and validation.
- Real-time Market Monitoring: Build international futures charting tools to display price trends across different time dimensions.
- Financial Data Analysis: A fundamental data source for volatility calculation and technical indicator analysis (e.g., MA, MACD).
Request and Response Description
Request Parameters:
symbol(Required): Futures product code, must be filled according to the code table provided by the platform.type(Required): K-line type, supports '0' (Daily K), '1' (1-minute), '5' (5-minute), '30' (30-minute), '60' (60-minute), '120' (120-minute), '240' (240-minute).limit(Optional): Number of data entries to return, defaults to 10.
Response Result:
code/msg: Status code and description, 200 indicates success.fields: Field definition array, order corresponds to values in data rows, typically includes open, close, high, low, change, changeRate, volume, tick_at.lines: Two-dimensional array, each row represents a K-line, numerical order corresponds one-to-one withfields.
Integration Suggestions
- Code Mapping: Please ensure to obtain and maintain the latest futures product code table to ensure the
symbolparameter is accurate. - Period Selection: Choose the appropriate
typebased on business needs; minute-level data is recommended for high-frequency trading, and daily K-lines for trend analysis. - Data Parsing: The returned
linesis a pure numerical array; it needs to be parsed with key-value mapping using thefieldsarray. Note thattick_atis typically a Unix timestamp.
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Request Example
{
"symbol": "期货品种代码,详见代码表",
"type": "k线类型,0:日k,1:1分钟,5:五分钟;30:30分钟,60:60分钟,120:120分钟,240:240分钟",
"limit": "返回条数,默认10"
}Response Example
{
"msg": "成功",
"code": 200,
"taskNo": "906962467150026863697586",
"lines": [
[
2.419,
2.422,
2.422,
2.419,
0,
0.12,
65,
1721696400
]
],
"fields": [
"open",
"close",
"high",
"low",
"change",
"changeRate",
"volume",
"tick_at"
]
}Request Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
| properties | object | {...} |
| properties.symbol | object | {...} |
| properties.symbol.type | string | string |
| properties.symbol.description | string | 期货品种代码,详见代码表 |
| properties.type | object | {...} |
| properties.type.type | string |
Response Fields
The fields below are derived from example JSON for integration reference only.
| Path | Type | Sample |
|---|---|---|
| type | string | object |
| properties | object | {...} |
| properties.msg | object | {...} |
| properties.msg.type | string | string |
| properties.msg.example | string | 成功 |
| properties.msg.description | string | 返回码对应描述 |
| properties.code | object | {...} |