黄金读数 / Gold Data Reading · XAU Daily 提供一枚可嵌入的「今日金价」徽标(badge): 一行代码贴到你的网站、博客、GitHub README 或导航页,就能显示 COMEX 金价与沪金 Au99.99 的最新读数与日涨跌。 徽标图由 xaudaily.com 托管并每日自动更新,你不需要重新粘贴代码。
A free, auto-updating gold price badge you can drop into any website, blog or README. One line of HTML shows the latest COMEX gold price and Shanghai Au99.99 with the day's change. The image is hosted by us and kept fresh — there is nothing for you to maintain and nothing to sign up for.
<a href="https://xaudaily.com/?utm_source=widget&utm_medium=embed&utm_campaign=gold-badge" target="_blank" rel="noopener"
title="Gold Data Reading · today's gold price">
<img src="https://xaudaily.com/widget/gold-badge.svg" width="320" height="96"
alt="Today's gold price · xaudaily.com" loading="lazy">
</a>
Dark sites: use gold-badge-dark.svg instead. Markdown (e.g. a GitHub README):
[](https://xaudaily.com/?utm_source=widget&utm_medium=embed&utm_campaign=gold-badge)
Two things that trip people up
1. The link must wrap the image. An SVG loaded via <img> is a passive image:
its own <a> is not clickable, so the credit inside the badge is visible text only. The
clickable link comes from the outer <a> in the snippet above — please don't paste a bare
<img>.
2. Please don't self-host the image. That freezes it at today's price and loses the attribution. Hot-linking is fine and is what the snippet does.
Colour follows the Chinese convention — red = up, green = down — and the badge also carries ▲/▼ arrows so the direction is readable either way. Figures refresh roughly every 30 minutes, with a full rebuild twice a day: these are daily readings, not a real-time tick, so please don't describe them as real-time.
当前徽标内的数据:XAU 4,418.6 USD/oz(日涨跌 +0.84%);沪金 951.12 元/克(日涨跌 +0.52%);数据截至 2026-09-20。
<a href="https://xaudaily.com/?utm_source=widget&utm_medium=embed&utm_campaign=gold-badge" target="_blank" rel="noopener"
title="黄金读数 XAU Daily · 今日金价">
<img src="https://xaudaily.com/widget/gold-badge.svg" width="320" height="96"
alt="黄金读数 XAU Daily 今日金价徽标" loading="lazy">
</a>
<a href="https://xaudaily.com/?utm_source=widget&utm_medium=embed&utm_campaign=gold-badge" target="_blank" rel="noopener"
title="黄金读数 XAU Daily · 今日金价">
<img src="https://xaudaily.com/widget/gold-badge-dark.svg" width="320" height="96"
alt="黄金读数 XAU Daily 今日金价徽标(深色)" loading="lazy">
</a>
[](https://xaudaily.com/?utm_source=widget&utm_medium=embed&utm_campaign=gold-badge)
① SVG 内部的链接点不动,必须由外层 <a> 包裹。
用 <img src="…gold-badge.svg"> 加载的 SVG 在浏览器里是「被动图片」,
它内部的 <a> 不响应点击、光标也不是手型。所以徽标图内部只显示
xaudaily.com 作为可见署名,真正的可点击链接由外层 <a> 提供 ——
请务必用上面第 2 节的写法,不要只贴一个孤立的 <img>。
② 链接请保留 UTM 参数。代码里的
?utm_source=widget&utm_medium=embed&utm_campaign=gold-badge
用来区分「挂件带来的访问」和普通访问,方便我们统计挂件效果。代码块里的链接用的是原始
&,贴进 HTML 或 Markdown 都不会被二次转义(HTML 校验器要求转义时就写
&);去掉参数链接依然可用,但归因会丢失。
③ 图请直接用我们的地址,不要下载后自行托管。徽标每日随数据重新生成, 自托管会看到一张永远停在你下载那天的旧图,也会失去自动更新与来源标注。
④ 署名请勿遮挡或裁剪。徽标右下角的 xaudaily.com 与数据截止日是署名信息,
可以整体缩放,但请不要裁掉、覆盖或用 CSS 隐藏。
徽标沿用本站的涨跌配色:红色 = 上涨,绿色 = 下跌, 即中国用户习惯(与国际市场常见的「绿涨红跌」相反)。 本站面向中文读者,因此不做双配色开关 —— 同一张图在两种语境里混用会被误读。
如果你的站点面向英文/国际读者,请在嵌入处补一句说明(例如「red = up, green = down, China convention」),
或不要把徽标用作涨跌方向的唯一提示。徽标里也有箭头符号 ▲/▼ 辅助表达方向。
—,不会显示过期数字数据由程序从公开数据源采集,仅供研究与信息参考,不构成任何投资建议;本站不对数据的完整性或 准确性作出保证,请以交易所与官方机构公布的数值为准。
徽标可免费用于任何网站、文档与开源项目,无需事先申请。使用条件只有两条:
保留徽标内可见的 xaudaily.com 署名;外层链接指向
xaudaily.com 并保留 UTM 参数。