Chinese Precious Metals Futures Contracts
Chinese Precious Metals Futures Contracts
Documentation
API Introduction
This API is used to query basic information for precious metal futures contracts listed on domestic exchanges. By passing a variety identifier, it returns the corresponding contract code (symbol) and Chinese name (name), helping developers build standardized trading instrument mapping tables.
Use Cases
- Financial Terminal Development: Automatically synchronize lists of major and non-major contracts for gold, silver, etc., from the Shanghai Futures Exchange.
- Quantitative Strategy Systems: Dynamically obtain tradable contract codes to avoid contract expiration errors caused by hardcoding.
- Market Data Display: Provide users with a clear contract selection dropdown menu, displaying standard contract names.
Request and Response Details
- Request Method: POST
- Key Parameters:
symbol(Required), specifies the precious metal variety type. - Response Structure:
code/msg: API status code and description.data.list: An array of contracts, includingsymbol(e.g., AU2412) andname(e.g., Gold 2412).
Integration Recommendations
- Caching Mechanism: Contract lists change infrequently (typically during rollover periods). It is recommended to cache locally for 24 hours to reduce call costs.
- Error Handling: Please validate whether the returned
codeis 200 and handle empty list scenarios appropriately. - Data Mapping: Use the returned
symbolas a unique key to link with real-time market data or historical data APIs.
Integration Examples
Includes ready-to-use Shell, Python, Go, Java, and PHP examples for direct integration.
Request Example
{
"symbol": "国内贵金属品种,详见国内贵金属现货,详见国内贵金属期货"
}Response Example
{
"code": 200,
"msg": "成功",
"taskNo": "668229506174286233793097",
"data": {
"list": [
{
"symbol": "AU0",
"name": "黄金2412"
},
{
"symbol": "AU2412",
"name": "黄金2412"
}
]
}
}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.code | object | {...} |
| properties.code.type | string | number |
| properties.code.example | number | 200 |
| properties.code.description | string | 返回码对应描述 |
| properties.msg | object | {...} |