Domestic Futures Contracts
Domestic Futures Contracts
Documentation
API Introduction
This API provides a service for querying basic contract information for the domestic futures market (onshore). Developers can input a standard futures product code (symbol) to retrieve the corresponding contract list, including the contract code and its full Chinese name (e.g., "Shanghai Crude Oil 2407"). The data originates from an upstream service on Alibaba Cloud Marketplace and is suitable for business systems requiring standardized futures product identifiers.
Use Cases
- Financial Terminal Development: Display standardized contract names in trading software or market quote systems.
- Data Cleaning and Mapping: Convert abbreviated codes from internal systems into common Chinese contract names.
- Quantitative Strategy Backtesting: Automatically match historical contract codes and names when building strategies.
- Information Aggregation Platforms: Ensure that displayed futures product names comply with domestic market standards.
Request and Response Description
Request Method: POST Request Parameters:
symbol(Required, string): Futures product code. Refer to official or upstream provided code tables, e.g., "SC0".
Response Results:
code(number): Status code, 200 indicates success.msg(string): Status description.taskNo(string): Unique tracking number for this request.data.list(array): Array of contract lists.symbol(string): Contract code.name(string): Full Chinese contract name, including product type, exchange, and expiry month information.
Integration Suggestions
- Code Standardization: Ensure that the
symbolpassed strictly conforms to the format defined by the upstream service, as it is case-sensitive. Otherwise, the query may return empty results. - Caching Strategy: Futures contract lists change infrequently (mainly during contract rollovers or new listings). It is recommended to cache the returned results locally (e.g., with a TTL of 24 hours) to reduce API call frequency and improve response speed.
- Error Handling: Always check the returned
codefield. If the status code is not 200, log the error or prompt the user based on themsgmessage to avoid null pointer exceptions when directly parsingdata.
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Request Example
{
"symbol": "期货品种代码,详见代码表"
}Response Example
{
"msg": "成功",
"taskNo": "075556736233047430019762",
"code": 200,
"data": {
"list": [
{
"symbol": "SC0",
"name": "上海原油2407"
}
]
}
}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.taskNo | object | {...} |