查询国际金价和国内黄金实时行情,包含最新价格、涨跌幅、开盘价、最高最低价等数据
| 参数名 | 类型 | 必填 | 说明 |
|---|---|---|---|
| 此接口无需请求参数 | |||
| 状态码 | 说明 |
|---|---|
| 200 | 请求成功,服务器已成功处理了请求。 |
| 403 | 服务器拒绝请求。可能是缺少认证凭据或权限不足。 |
| 404 | 请求的资源未找到。请检查请求地址是否正确。 |
| 429 | 请求过于频繁。您已超出速率限制,请稍后再试。 |
| 500 | 服务器内部错误。服务器在执行请求时遇到了问题。 |
此处将显示接口返回结果...
{
"code": 200,
"msg": "数据请求成功",
"data": {
"bank_gold_bar_price": [ // 银行投资金条价格
{
"bank": "农行传世之宝金条",
"price": "805.27"
},
{
"bank": "浦发银行投资金条",
"price": "803.45"
},
{
"bank": "和谐平安金条",
"price": "792.1"
},
{
"bank": "工商银行如意金条",
"price": "797.66"
},
{
"bank": "中国银行金条",
"price": "794.98"
},
{
"bank": "建设银行龙鼎金条",
"price": "797.1"
}
],
"gold_recycle_price": [
{
"gold_type": "24K金回收", // 品种
"recycle_price": "767.0", // 价格
"updated_date": "2025-07-22" // 更新时间
},
{
"gold_type": "18K金回收",
"recycle_price": "571.0",
"updated_date": "2025-07-22"
},
{
"gold_type": "14K金回收",
"recycle_price": "442.0",
"updated_date": "2025-07-22"
},
{
"gold_type": "pd950钯金回收",
"recycle_price": "259.0",
"updated_date": "2025-07-22"
},
{
"gold_type": "pd990钯金回收",
"recycle_price": "270.0",
"updated_date": "2025-07-22"
},
{
"gold_type": "pd999钯金回收",
"recycle_price": "273.0",
"updated_date": "2025-07-22"
},
{
"gold_type": "黄金回收",
"recycle_price": "771.0",
"updated_date": "2025-07-22"
},
{
"gold_type": "925银条回收",
"recycle_price": "7.18",
"updated_date": "2025-07-22"
},
{
"gold_type": "足银回收",
"recycle_price": "8.29",
"updated_date": "2025-07-22"
},
{
"gold_type": "24K金回收",
"recycle_price": "760.0",
"updated_date": "2025-07-21"
}
],
"precious_metal_price": [
{
"brand": "周六福", // 品牌
"bullion_price": "900", // 金条价
"gold_price": "988", // 黄金价
"platinum_price": "621", // 铂金价
"updated_date": "2025-07-22" // 更新日期
},
{
"brand": "老凤祥",
"bullion_price": "966",
"gold_price": "1016",
"platinum_price": "470",
"updated_date": "2025-07-22"
},
{
"brand": "老庙黄金",
"bullion_price": "969",
"gold_price": "1014",
"platinum_price": "470",
"updated_date": "2025-07-22"
},
{
"brand": "菜百首饰",
"bullion_price": "890",
"gold_price": "996",
"platinum_price": "445",
"updated_date": "2025-07-22"
},
{
"brand": "潮宏基",
"bullion_price": "1015",
"gold_price": "1015",
"platinum_price": "588",
"updated_date": "2025-07-22"
},
{
"brand": "金至尊",
"bullion_price": "1015",
"gold_price": "1015",
"platinum_price": "588",
"updated_date": "2025-07-22"
},
{
"brand": "谢瑞麟",
"bullion_price": "952",
"gold_price": "1015",
"platinum_price": "-",
"updated_date": "2025-07-22"
},
{
"brand": "六福珠宝",
"bullion_price": "1015",
"gold_price": "1015",
"platinum_price": "588",
"updated_date": "2025-07-22"
},
{
"brand": "周生生",
"bullion_price": "952",
"gold_price": "1021",
"platinum_price": "588",
"updated_date": "2025-07-22"
},
{
"brand": "周大福",
"bullion_price": "1015",
"gold_price": "1015",
"platinum_price": "-",
"updated_date": "2025-07-22"
},
{
"brand": "周六福",
"bullion_price": "892",
"gold_price": "988",
"platinum_price": "621",
"updated_date": "2025-07-22"
}
]
},
"request_id": ""
}
<?php
$url = 'https://api.luochen.xyz/API/gold_price.php';
$params = [];
$url .= '?' . http_build_query($params);
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
?>
import requests
url = "https://api.luochen.xyz/API/gold_price.php"
params = {
}
response = requests.get(url, params=params)
print(response.text)
const url = new URL('https://api.luochen.xyz/API/gold_price.php');
const params = {
};
Object.keys(params).forEach(key => url.searchParams.append(key, params[key]));
fetch(url)
.then(response => response.text())
.then(data => console.log(data))
.catch(error => console.error('Error:', error));
<!DOCTYPE html>
<html>
<head>
<title>API调用示例</title>
</head>
<body>
<div id="result">加载中...</div>
<script>
fetch('https://api.luochen.xyz/API/gold_price.php')
.then(res => res.text())
.then(data => document.getElementById('result').textContent = data)
.catch(err => console.error(err));
</script>
</body>
</html>
import java.net.http.*;
import java.net.URI;
public class ApiClient {
public static void main(String[] args) throws Exception {
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://api.luochen.xyz/API/gold_price.php"))
.GET()
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}
curl -X GET "https://api.luochen.xyz/API/gold_price.php" \
-H "Accept: application/json"