International Precious Metals Futures Contracts
International Precious Metals Futures Contracts
Documentation
API Introduction
This API is used to query the futures contract code list for international precious metals (e.g., Silver SI). Developers can pass a specified precious metal variety identifier (symbol) to obtain an array of all tradable futures contract codes for that variety, assisting in building trading instrument selectors or market data subscription foundations.
Use Cases
- Financial Terminal Development: Dynamically load corresponding futures contract options when users choose to view market data for a certain precious metal category.
- Quantitative Trading Systems: Obtain full contract codes during the initialization phase for subsequent historical data retrieval or real-time market data subscriptions.
- Investment Education Platforms: Display the structure of precious metal futures contracts expiring in different months, helping users understand rollover rules.
Request and Response Details
- Request Method: POST
- Core Parameters:
symbol(Required), string type, representing the international precious metal variety code (e.g., "SI" for Silver). Ensure the passed code complies with international common standards or upstream supported enumeration values. - Response Result:
code: Status code, 200 indicates success.data.list: A string array containing all futures contract codes for the variety (e.g., "SI2411", "SI2501", etc., usually composed of variety code + year/month).taskNo: Unique tracking ID for this request, facilitating troubleshooting.
Integration Recommendations
- Caching Strategy: Futures contract lists change infrequently (typically during contract rollovers or new contract listings). It is recommended to cache the results locally (e.g., for 24 hours) to reduce API call frequency and improve response speed.
- Parameter Validation: The frontend should restrict the input range of
symbol, only allowing known precious metal variety codes to avoid invalid requests. - Error Handling: Please handle exceptional cases based on the
codeandmsgfields, especially when an unsupported variety code is passed, the API might return a non-200 status code or an empty list.
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": "251234402215985750524304",
"data": {
"list": [
"SI",
"SI2411",
"SI2412",
"SI2501",
"SI2503",
"SI2505",
"SI2507",
"SI2509",
"SI2512"
]
}
}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 | {...} |