International Futures Contracts
International Futures Contracts
Documentation
API Introduction
This API is used to query all tradable contract codes under a specified international futures product. Developers can pass a standard product code (e.g., GASO) to obtain a complete list of contracts, including main contracts and far-month contracts, suitable for market system initialization and contract switching logic.
Use Cases
- Market Software Development: Automatically retrieve all active contracts under a specific product to build a watchlist.
- Quantitative Strategy Backtesting: Batch retrieve historical contract codes to ensure data continuity for backtesting.
- Trading Terminal Integration: Provide users with a contract selector, displaying currently tradable monthly contracts.
Request and Response Description
- Request Method: POST
- Core Parameter:
symbol(Required), the futures product code, must be passed referencing the code table provided by the platform. - Response Result: On success,
codeis 200, and thedata.listarray contains all contract code strings for that product (e.g.,["GASO2408", "GASO2409"]).
Integration Suggestions
- Caching Mechanism: Contract lists change infrequently, so it is recommended to cache results locally or in Redis to reduce redundant calls.
- Code Validation: Please ensure that the
symbolpassed is a valid international product code, otherwise an empty list or error code may be returned. - Error Handling: Be sure to parse the
codeandmsgfields and handle non-200 status codes by retrying or logging.
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Request Example
{
"symbol": "期货品种代码,详见代码表"
}Response Example
{
"msg": "成功",
"code": 200,
"taskNo": "906962467150026863697586",
"data": {
"list": [
"GASO",
"GASO2408",
"GASO2409",
"GASO2410",
"GASO2411",
"GASO2412",
"GASO2501",
"GASO2502",
"GASO2503",
"GASO2504",
"GASO2505",
"GASO2506",
"GASO2507",
"GASO2508",
"GASO2509",
"GASO2510",
"GASO2512"
]
}
}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 | 期货品种代码,详见代码表 |
| required | array | "symbol" |
| required[] | string | symbol |
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 | {...} |