← Back to the dashboard 中文

Data API

Free · public · CC BY 4.0 · Last updated 2026-09-20

What this is

The site's daily gold and macro readings come with a machine-readable JSON API: the fields are stable, and every field carries its own data source and cut-off date, so AI agents, scripts and researchers can cite them directly — no HTML parsing required.

The numbers the API returns are the same source and the same definitions as the dashboard — one data snapshot, one code path — so there is no such thing as "the API says one thing and the page says another".

Endpoints

EndpointWhat it returnsUpdated
GET /readings.en.json?src=en-dataEnglish readings: field paths are identical to the Chinese version, string values (units, sources, methodology notes) are in English, lang: "en"; the numbers come from the same snapshotTwice daily + prices every 30 minutes
GET /readings.json?src=en-dataAll readings (JSON, about 60 KB) — the Chinese original: the same snapshot and the same numbers, with string values in Chinese onlyTwice daily + prices every 30 minutes
GET /latest.json?src=en-dataSame as /readings.json (alias)Same as above
GET /brief.en.md?src=en-dataThe English brief for the day (Markdown, a few KB)Twice daily
GET /brief.md?src=en-dataThe Chinese plain-text brief of the day's key numbers (Markdown, very small)Twice daily
GET /llms.txt?src=en-dataSite documentation written for large language modelsTwice daily
GET /d/YYYY-MM-DD.html?src=en-dataOne issue's archive page (permanently stable URL, back-referenceable)One new issue daily
GET /d/?src=en-dataThe archive index (crawlers can reach every issue from here)Daily
GET /topic/?src=en-dataIndicator definitions and explainer articlesWeekly
GET /sitemap.xml?src=en-dataThe sitemapDaily

Every endpoint above is shown with this page's own channel tag, ?src=en-data — use your own name instead (see the note under Quick start).

Quick start

$ curl -s "https://xaudaily.com/readings.en.json?src=your-app" | head -40

Python (standard library only):

import json, urllib.request
url = "https://xaudaily.com/readings.en.json?src=your-app"
with urllib.request.urlopen(url, timeout=20) as r:
    d = json.load(r)
print(d["data_asof"], d["readings"]["au"]["last"])
Please keep the ?src= query parameter. It is a channel tag (for example ?src=my-trading-bot): requests that carry it are served with Cache-Control: no-store and go back to the origin every time, which is how we can count "which applications are using this data" — and that count is what lets the site keep offering it for free. Dropping the parameter will not cause an error, but then we cannot count you.

Field structure

readings has 11 keys: gold (COMEX gold), au (SHFE gold), cpi, pce, nfp (nonfarm payrolls), ppi, dxy, gdp, treasury (US Treasuries 10Y/30Y), oil (Brent/WTI), and extra (VIX, SPDR holdings, the federal funds rate, Polymarket decision odds, ADP, Challenger layoffs, central bank gold buying, driver-factor scores, event expectations and more).

Important: the payload shape is not the same for every field — the only thing they share is the "envelope" described below. Before citing a field, check what it actually looks like, and do not assume every field has a value:

FieldPayload shapeUnit
goldrows: a daily OHLC array (elements {"d","o","h","l","c"}, about 120 bars); plus live = the real-time tick ({"last","chg","chg_pct","date","time","source"}). There is no top-level last: for the "current price" use gold.live.last, for the "close" use gold.rows[-1].cthe two are not the same thingUSD/oz
aulast, chg1d (%), spark (recent series)CNY/g
cpi / pce / ppi / nfpmonths[] and vals[] are aligned index by index; plus published and stale% y/y / 10k persons
treasuryy10 / y30, each with dates[], vals[], plus the derived last, chg5, chg20, slope20, trend, pctile52%
oilbrent / wti, same structure as treasuryUSD/barrel
dxydates[] + the matching series (same structure as treasury)index
gdpquarters: an array of objects {"q","val"}not the parallel months[]/vals[] shape, so do not read it the way you read cpi% q/q annualised
extra.vix / extra.spdrvalue + date (SPDR also has changePct)index / tonnes
extra.polymarketcut50, cut25, hold, hike25 … implied probabilities0–1
extra.drivers / extra.eventsA 9-factor rule-based score (-100 bearish to +100 bullish) / event estimates and rangespoints / —

Shared conventions (every field follows these)

Response sample (excerpt — the real payload has more fields)

{
  "schema": "xaudaily.readings/v1",
  "generated_at": "2026-09-19 00:00 JST",
  "data_asof": "2026-09-19 00:00",
  "units": { "gold": "USD/oz", "cpi": "% y/y", "nfp": "10k persons (change in nonfarm payrolls)" },
  "site": { "home": "https://xaudaily.com/", "daily_archive": "https://xaudaily.com/d/2026-09-19.html" },
  "readings": {
    "gold": { "label": "COMEX GC continuous", "unit": "USD/oz", "source": "...", "asOf": "2026-09-18",
              "stale": false,
              "rows": [ { "d": "2026-04-06", "o": 4701.7, "h": 4733.1, "l": 4626.2, "c": 4675.6 } ],
              "live": { "last": 4386.71, "chg": 5.11, "chg_pct": 0.12, "date": "2026-09-18",
                        "time": "23:42:34" } },
    "au":   { "label": "SHFE Au99.99 continuous", "unit": "CNY/g", "source": "...", "asOf": "2026-09-18",
              "last": 951.38, "chg1d": 1.75, "spark": [ 948.2, 949.94 ] },
    "cpi":  { "source": "...", "asOf": "2026-08", "published": "2026-09-11", "stale": false,
              "months": [ "2026-07", "2026-08" ], "vals": [ 3.3, 3.4 ] }
  },
  "meta": { "attribution": "Please credit xaudaily.com as the source." }
}

Update cadence

Embeddable gold badge (free, no sign-up)

If this data is useful to your readers, you can embed a badge that refreshes with the gold price in your site, blog or README: the image is hosted here, so you do not have to maintain anything.

<a href="https://xaudaily.com/en/?utm_source=widget&amp;utm_medium=embed&amp;utm_campaign=gold-badge">
  <img src="https://xaudaily.com/widget/gold-badge.svg" width="320" height="96"
       alt="Today's gold price · Gold Data Reading xaudaily.com">
</a>

Licence and attribution

This site's data is offered under CC BY 4.0: you may use, republish and redistribute it freely, but you must credit the source and include the link.

Recommended attribution format (copy it as-is, and keep the link):

Source: Gold Data Reading, xaudaily.com — https://xaudaily.com/

If you want to republish the data wrapped up as "your own data source", or you need looser terms, email us first: xaudaily@163.com.

Disclaimer

This site does not constitute investment advice and does not tell you what to buy or sell. Every number is programmatically validated and comes from the same source as the dashboard, but no fitness for any particular purpose is guaranteed; you use it at your own risk.

FAQ

Is this API free? Is there a rate limit?

Free, with no sign-up or API key. There is no hard rate limit, but it is a static file served with cache headers, so please do not poll it at high frequency — the data only updates twice a day (price fields every 30 minutes), so minute-level polling achieves nothing.

Why does the response header become no-store when I add ?src=?

Deliberate: requests carrying ?src= bypass the CDN edge cache and go straight to the origin so that we can count usage per channel; without the parameter they follow normal caching (max-age=300), which saves bandwidth.

Can I fetch the data for a past date?

The JSON provides the current day's snapshot only (gold.rows holds about 120 daily bars, so it does carry history of its own). For per-date historical readings use the /d/ archive pages — one permanently stable URL per day. (see the archive)

Can I use this data directly for trading decisions?

Not recommended. It is a daily report rather than a market terminal: two updates a day (prices every 30 minutes), and official statistics lag by nature. It is a better fit for research, dashboards, writing and AI citation.