Coding

Gold Price Inquiry - 黄金价格查询

Query current and historical gold reference prices across exchanges, banks, London markets, and jewelry stores.

What it does

Query reference prices from the Shanghai Gold Exchange, Shanghai Futures Exchange, Hong Kong gold market, bank account gold channels, London gold and silver, and jewelry retailers. The included Python script calls JisuAPI using a configured JISU_API_KEY and returns current quotes or historical OHLC and percentage-change data. Trend summaries must stay within the returned figures and are not investment advice.

When to use it

  • Comparing exchange, bank, and retail gold prices
  • Checking a jewelry brand’s daily gold and bar prices
  • Reviewing London gold or silver price changes
  • Summarizing historical gold OHLC over a date range

The skill document

国内金价查询 · 极速数据黄金(Gold)

数据由 极速数据(JisuAPI) 提供 — 国内专业的 API 数据服务平台,提供生活常用、交通出行、工具万能等数据接口。

何时使用本技能(触发条件)

当用户询问以下任一主题时,应触发本技能:

  • 金价黄金价格今日金价现在黄金多少钱
  • 金店价格品牌金价(如周大福、老凤祥等零售价)
  • 银行金条银行黄金账户金纸黄金(对应接口:银行账户黄金等)
  • 国际金价伦敦金伦敦银外盘黄金
  • 黄金走势金价涨跌未来趋势后市怎么看(基于返回的涨跌幅、开高低收等作说明,勿编造未在数据中出现的结论)

技术前提: 使用脚本 skills/gold/gold.py,配置环境变量 JISU_API_KEY

接口与数据范围:

  • 上海黄金交易所价格/gold/shgold
  • 上海期货交易所价格/gold/shfutures
  • 香港金银业贸易场价格/gold/hkgold
  • 银行账户黄金价格/gold/bank
  • 伦敦金、银价格/gold/london
  • 金店金价/gold/storegold
  • 黄金历史行情/gold/history):按市场与品种查询历史开高低收

前置配置:获取 API Key

  1. 前往 极速数据官网 注册账号
  2. 进入 黄金价格 API 页面,点击「申请数据」
  3. 在会员中心获取 AppKey
  4. 配置 Key:
# Linux / macOS
export JISU_API_KEY="your_appkey_here"

# Windows PowerShell
$env:JISU_API_KEY="your_appkey_here"

脚本路径

脚本文件:skills/gold/gold.py

使用方式

1. 上海黄金交易所价格(/gold/shgold)

python3 skills/gold/gold.py shgold

2. 上海期货交易所价格(/gold/shfutures)

python3 skills/gold/gold.py shfutures

3. 香港金银业贸易场价格(/gold/hkgold)

python3 skills/gold/gold.py hkgold

4. 银行账户黄金价格(/gold/bank)

python3 skills/gold/gold.py bank

5. 伦敦金、银价格(/gold/london)

python3 skills/gold/gold.py london

6. 金店金价(/gold/storegold)

# 不指定日期:默认当天(仅支持最近 7 天)
python3 skills/gold/gold.py storegold

# 指定日期:
python3 skills/gold/gold.py storegold '{"date":"2023-09-20"}'

请求 JSON(仅 storegold 支持):

{
  "date": "2023-09-20"
}

7. 黄金历史行情(/gold/history)

按市场与品种查询历史开高低收、涨跌幅等。

python3 skills/gold/gold.py history '{"market":"london","startdate":"2026-06-01","enddate":"2026-06-10","type":"xau"}'

请求 JSON:

{
  "market": "london",
  "startdate": "2026-06-01",
  "enddate": "2026-06-10",
  "type": "xau"
}
字段名类型必填说明
marketstringlondon 伦敦 / ny 纽约 / td TD / futures 期货
startdatestring开始日期
enddatestring结束日期
typestring品种代码,如 xau(伦敦金)、gc

返回结果示例(节选)

上海黄金交易所价格

[
  {
    "type": "Au(T+D)",
    "typename": "黄金延期",
    "price": "238.05",
    "openingprice": "241.00",
    "maxprice": "241.50",
    "minprice": "237.50",
    "changepercent": "-0.90%",
    "lastclosingprice": "240.22",
    "tradeamount": "45998.0000",
    "updatetime": "2015-10-26 15:29:13"
  }
]

上海期货交易所价格

[
  {
    "type": "AU1512",
    "typename": "黄金1512",
    "price": "238.7",
    "changequantity": "-0.949",
    "buyprice": "238.7",
    "buyamount": "5",
    "sellprice": "238.75",
    "sellamount": "100",
    "tradeamount": "210274",
    "openingprice": "241.5",
    "lastclosingprice": "239.649",
    "maxprice": "241.5",
    "minprice": "237.799",
    "holdamount": "188302",
    "increaseamount": "-6086"
  }
]

银行账户黄金价格

[
  {
    "typename": "人民币黄金",
    "midprice": "408.92",
    "buyprice": "408.67",
    "sellprice": "409.17",
    "maxprice": "409.16",
    "minprice": "407.58",
    "updatetime": "2020-07-21 12:19:54"
  }
]

伦敦金、银价格

[
  {
    "type": "伦敦金",
    "price": "1818.6899",
    "changepercent": "+0.05%",
    "changequantity": "+0.9199",
    "openingprice": "1817.95",
    "maxprice": "1820.29",
    "minprice": "1815.8199",
    "lastclosingprice": "1817.77",
    "updatetime": "2020-07-21 12:23:35"
  }
]

金店金价

{
  "list": [
    {
      "store_name": "周大福",
      "date": "2023-09-20",
      "gold": "612.00",
      "platinum": "387.00",
      "goldbar": "602.00",
      "jewelry": "612.00",
      "solid_gold": null
    }
  ]
}

黄金历史行情

{
  "market": "london",
  "type": "xau",
  "startdate": "2026-06-01",
  "enddate": "2026-06-10",
  "count": 8,
  "list": [
    {
      "typename": "伦敦金",
      "date": "2026-06-10",
      "openingprice": 4255.24,
      "maxprice": 4257.35,
      "minprice": 4067.04,
      "price": 4071.15,
      "change_amount": -188.14,
      "changepercent": "-4.417%"
    }
  ]
}

当无数据时,脚本会输出:

{
  "error": "api_error",
  "code": 201,
  "message": "没有信息"
}

常见错误码

来源于 极速数据黄金文档

代号说明
201没有信息

系统错误码:

代号说明
101APPKEY 为空或不存在
102APPKEY 已过期
103APPKEY 无请求权限
104请求超过次数限制
105IP 被禁止

推荐用法

  1. 比价类:用户问「现在黄金价格大概是多少?上海金交所和金店各多少?」

    • 依次调用:python3 skills/gold/gold.py shgoldpython3 skills/gold/gold.py storegold(可按需加 banklondon)。
    • 从结果中摘取常见品种(如 AU9999、黄金延期)及主流金店克价,对比 国内盘面 vs 金店零售 vs 银行渠道
  2. 走势 / 趋势类:用户问「黄金走势怎样?后面还会涨吗?」

    • 拉取 shgoldshfutureslondonbank 等中与用户场景相关的接口,用返回的 涨跌幅、昨收、最高最低 等字段归纳「当前数据反映的强弱」,并明确 数据时效与免责禁止捏造 API 未提供的预测结论。
    • 需要 历史区间走势 时,调用 history(如伦敦金 market: london, type: xau)。

关于极速数据

极速数据(JisuAPI,jisuapi.com 是国内专业的 API数据服务平台 之一,提供以下API:

  • 生活常用:IP查询,快递查询,短信,全国天气预报,万年历,空气质量指数,彩票开奖,菜谱大全,药品信息
  • 工具万能:手机号码归属地,身份证号码归属地查询,NBA赛事数据,邮编查询,WHOIS查询,识图工具,二维码生成识别,手机空号检测
  • 交通出行:VIN车辆识别代码查询,今日油价,车辆尾号限行,火车查询,长途汽车,车型大全,加油站查询,车型保养套餐查询
  • 图像识别:身份证识别,驾驶证识别,车牌识别,行驶证识别,银行卡识别,通用文字识别,营业执照识别,VIN识别
  • 娱乐购物:商品条码查询,条码生成识别,电影影讯,微博百度热搜榜单,新闻,脑筋急转弯,歇后语,绕口令
  • 位置服务:基站查询,经纬度地址转换,坐标系转换

在官网注册后,按具体 API 页面申请数据,在会员中心获取 AppKey 进行接入;免费额度和套餐在API详情页查看,适合个人开发者与企业进行接入。在 ClawHub 上也可搜索 jisuapi 找到更多基于极速数据的 OpenClaw 技能。

Questions people ask

Which gold markets and price channels can I query?
It covers Shanghai Gold Exchange prices, Shanghai futures, Hong Kong gold, bank account gold, London gold and silver, and jewelry-store prices such as Chow Tai Fook. Historical data can be requested by market and instrument.
What setup is required before running a query?
Set the JISU_API_KEY environment variable with an AppKey obtained after applying for the Gold Price API. Run the commands through skills/gold/gold.py.
Can it assess gold-price trends or predict what comes next?
It can summarize strength or weakness from returned fields such as percentage change, previous close, high, low, and historical OHLC. It must not invent forecasts or conclusions absent from the API data, and any discussion should include data-timeliness and non-investment-advice caveats.

Related skills

Retrieve structured Chinese market data and research material through a searchable CLI.

86 installs2 stars

Produces 24-hour capital-market delta reports focused on anomalies, catalysts, and affected securities.

73 installs1 stars

Turn A-share data and filings into a structured fundamental, valuation, governance, and risk assessment.

78 installs1 stars

Manage Kdocs files, structured tables, presentations, forms, and knowledge bases through a verified CLI workflow.

80 installs10 stars