cURL
curl "https://api.ruseo.cn/api/goldprice"
查询今日黄金价格,含银行金条价、黄金回收价、品牌贵金属价
https://api.ruseo.cn/api/goldprice
接口调用前需要确认的核心配置。
/api/goldpricegoldprice必填参数必须传入,示例值可直接用于联调。
免费API不强制要求API Key,但如果您希望统计个人调用次数,请在请求时附加参数 key=您的API_KEY。
注册账号后即可获得API Key。
| 参数名 | 必填 | 类型 | 说明 | 示例值 |
|---|---|---|---|---|
key |
否 | string | 可选参数:携带此参数可统计您的个人调用次数。请注册账号获取API Key。 | YOUR_API_KEY |
优先使用示例地址测试请求参数是否正确。
https://api.ruseo.cn/api/goldprice
curl "https://api.ruseo.cn/api/goldprice"
$url = 'https://api.ruseo.cn/api/goldprice';
$response = file_get_contents($url);
$data = json_decode($response, true);
fetch('https://api.ruseo.cn/api/goldprice')
.then(res => res.json())
.then(data => console.log(data));
实际返回内容以接口脚本处理结果为准。
{
"code": 0,
"msg": "success",
"data": {
"route": "goldprice",
"example": true
}
}
| 参数名 | 类型 | 说明 | 示例值 |
|---|---|---|---|
success |
boolean | 是否成功 | true |
bank_gold_bar_price |
array | 银行投资金条价格 | |
bank_gold_bar_price[].bank |
string | 银行/金条名称 | 工商银行如意金条 |
bank_gold_bar_price[].price |
string | 价格(元/克) | 797.66 |
gold_recycle_price |
array | 黄金回收价格 | |
gold_recycle_price[].gold_type |
string | 品种 | 24K金回收 |
gold_recycle_price[].recycle_price |
string | 回收价(元/克) | 767.0 |
gold_recycle_price[].updated_date |
string | 更新日期 | 2025-07-22 |
precious_metal_price |
array | 品牌贵金属价格 | |
precious_metal_price[].brand |
string | 品牌 | 周大福 |
precious_metal_price[].bullion_price |
string | 金条价(元/克) | 1015 |
precious_metal_price[].gold_price |
string | 黄金价(元/克) | 1015 |
precious_metal_price[].platinum_price |
string | 铂金价(元/克) | 588 |
precious_metal_price[].updated_date |
string | 更新日期 | 2025-07-22 |
点击左侧“发送请求”查看结果...