China Precious Metals Quotes
China Precious Metals Quotes
Documentation
API Introduction
This API provides real-time market quote data for major domestic precious metal varieties (e.g., Gold Deferred, Silver T+D). By passing a specific precious metal code (symbol), you can obtain multi-dimensional market indicators including current price, bid/ask spread, rise/fall percentage, trading volume, and open interest. Data is sourced from legitimate domestic trading markets.
Use Cases
- Financial News Applications: Provide real-time precious metal market display modules for apps or websites.
- Investment Analysis Systems: Serve as a data source for quantitative strategies or technical analysis, monitoring price fluctuations and trading activity.
- Enterprise Risk Management: Help gold-related businesses monitor raw material cost fluctuations in real-time, assisting procurement and sales decisions.
Request and Response Details
- Request Method: POST
- Core Parameters:
symbol(Required), specifies the precious metal variety code to query. It should refer to the standard coding specifications for domestic precious metal spot or futures. - Response Data:
data.price: Current latest transaction price.data.change/data.changeRate: Absolute and percentage change compared to yesterday's closing price.data.bid/data.ask: Bid 1 price and Ask 1 price, reflecting immediate liquidity.data.volume/data.hold: Daily trading volume and total open interest, indicating market activity.data.update_time: Data update timestamp, ensuring timeliness assessment.
Integration Recommendations
- Code Mapping: Establish a mapping table between internal business varieties and the API's
symbolparameter in advance to avoid hardcoding. - Caching Strategy: Given the high-frequency changes in market data but without millisecond-level trading requirements, it is recommended to set up second-level caching on the client or server to reduce invalid requests.
- Error Handling: Validate the returned
codeand design logging and retry mechanisms whenmsgindicates an error.
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": "138485498227260625726111",
"data": {
"presettle": 614.51,
"ask_vol": 3,
"change": 3.71,
"bid_vol": 1,
"hold": 236472,
"volume": 13396,
"update_time": 1731090599,
"high": 619.7,
"low": 614.2,
"price": 618.22,
"name": "黄金延期",
"ask": 618.68,
"preclose": 612.87,
"bid": 616.02,
"changeRate": 0.6,
"value": 8273493248,
"open": 614.3
}
}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 | {...} |