首页 全部接口 API文档 文章 贡献者 友链 赞助 关于
登录/注册

实时金价v1

GET https://apis.whrx.chat/api/jinjia/v1.php

实时金价v1 API接口文档

接口简介

实时金价v1 API是一个用于查询国内各大金店黄金价格和国际黄金白银期货价格的接口。通过调用该接口,用户可以实时获取最新的金价信息。

请求说明

  • 请求地址:https://api.xunjinlu.fun/api/jinjia/v1.php
  • 请求方法:GET
  • 请求头:无特殊要求

请求参数

参数名类型是否必填说明
keystring接口访问密钥

返回参数

参数名类型说明
codeinteger状态码,200表示成功
msgstring状态信息
dataobject返回的数据对象
update_timestring数据更新时间
shopsarray国内各大金店金价信息
futuresarray国际黄金白银期货价格信息
chartsobject金价走势图链接

返回示例

成功示例

{
    "code": 200,
    "msg": "success",
    "data": {
        "update_time": "2026-05-02 18:58:02",
        "shops": [
            {
                "name": "周大福",
                "retail_price": "1419",
                "exchange_price": "978",
                "update_time": "2026-05-02 18:58:02"
            },
            {
                "name": "六福珠宝",
                "retail_price": "1417",
                "exchange_price": "1205",
                "update_time": "2026-05-02 18:58:03"
            },
            {
                "name": "菜百首饰",
                "retail_price": "1388",
                "exchange_price": null,
                "update_time": "2026-05-02 18:58:03"
            }
        ],
        "futures": [
            {
                "name": "国际黄金现货",
                "trade_price": "4614.95",
                "trade_unit": "美元/盎司",
                "convert_price": "1012.9647",
                "convert_unit": "元/克",
                "update_time": "2026-05-02 04:59:58"
            },
            {
                "name": "上海黄金现货",
                "trade_price": "1013.36",
                "trade_unit": "人民币/克",
                "convert_price": "1013.36",
                "convert_unit": "元/克",
                "update_time": "2026-04-30 15:02:10"
            },
            {
                "name": "国际白银现货",
                "trade_price": "75.36",
                "trade_unit": "美元/盎司",
                "convert_price": "16.5412",
                "convert_unit": "元/克",
                "update_time": "2026-05-02 04:59:58"
            },
            {
                "name": "上海白银现货",
                "trade_price": "17954",
                "trade_unit": "人民币/千克",
                "convert_price": "17.954",
                "convert_unit": "元/克",
                "update_time": "2026-04-30 14:43:50"
            }
        ],
        "charts": {
            "intl_gold_realtime": "https://webquotepic.eastmoney.com/GetPic.aspx?token=44c9d251add88e27b65ed86506f6e5da&nid=122.XAU&type=r&imageType=rf",
            "intl_gold_trend": "https://webquoteklinepic.eastmoney.com/GetPic.aspx?nid=122.XAU&type=&unitWidth=-6&ef=&formula=RSI&AT=1&imageType=KXL",
            "intl_silver_realtime": "https://webquotepic.eastmoney.com/GetPic.aspx?token=44c9d251add88e27b65ed86506f6e5da&nid=122.XAG&type=r&imageType=rf",
            "intl_silver_trend": "https://webquoteklinepic.eastmoney.com/GetPic.aspx?nid=122.XAG&type=&unitWidth=-6&ef=&formula=RSI&AT=1&imageType=KXL",
            "shanghai_gold_realtime": "https://webquotepic.eastmoney.com/GetPic.aspx?token=44c9d251add88e27b65ed86506f6e5da&nid=118.SHAU&type=r&imageType=rf",
            "shanghai_gold_trend": "https://webquoteklinepic.eastmoney.com/GetPic.aspx?nid=118.SHAU&type=&unitWidth=-6&ef=&formula=RSI&AT=1&imageType=KXL",
            "shanghai_silver_realtime": "https://webquotepic.eastmoney.com/GetPic.aspx?token=44c9d251add88e27b65ed86506f6e5da&nid=118.SHAG&type=r&imageType=r",
            "comex_gold_realtime": "https://webquotepic.eastmoney.com/GetPic.aspx?imageType=r&type=&token=44c9d251add88e27b65ed86506f6e5da&nid=101.GC00Y",
            "comex_gold_trend": "https://webquoteklinepic.eastmoney.com/GetPic.aspx?nid=101.GC00Y&type=&unitWidth=-6&ef=&formula=RSI&AT=1&imageType=KXL",
            "comex_silver_realtime": "https://webquotepic.eastmoney.com/GetPic.aspx?imageType=r&type=&token=44c9d251add88e27b65ed86506f6e5da&nid=101.SI00Y",
            "comex_silver_trend": "https://webquoteklinepic.eastmoney.com/GetPic.aspx?nid=101.SI00Y&type=&unitWidth=-6&ef=&formula=RSI&AT=1&imageType=KXL"
        }
    },
    "api_info": {
        "developer": "尋鯨錄",
        "blog": "https://www.xunjinlu.fun",
        "api_platform": "https://api.xunjinlu.fun"
    }
}

失败示例

{
    "code": 401,
    "msg": "Unauthorized access"
}

错误码说明

  • 401:未授权访问

调用示例

直接访问链接

实时金价v1 API

cURL命令示例

curl -X GET "https://api.xunjinlu.fun/api/jinjia/v1.php?key=your_key"

JavaScript (fetch) 示例

fetch('https://api.xunjinlu.fun/api/jinjia/v1.php?key=your_key')
  .then(response => response.json())
  .then(data => console.log(data))
  .catch(error => console.error(error));

jQuery AJAX 示例

$.ajax({
  url: 'https://api.xunjinlu.fun/api/jinjia/v1.php?key=your_key',
  type: 'GET',
  dataType: 'json',
  success: function(data) {
    console.log(data);
  },
  error: function(error) {
    console.error(error);
  }
});

Python (requests) 示例

import requests

url = 'https://api.xunjinlu.fun/api/jinjia/v1.php'
key = 'your_key'

response = requests.get(url, params={'key': key})
data = response.json()
print(data)

PHP (curl) 示例

$url = 'https://api.xunjinlu.fun/api/jinjia/v1.php';
$key = 'your_key';

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, ['key' => $key]);
$response = curl_exec($ch);
curl_close($ch);

$data = json_decode($response, true);
print_r($data);

HTML (iframe/img/script标签)