DocsDocs

Request spot prices

GET /v1/prices: copy a request for gold, silver and copper spot prices

20 Oct 2026 · 2 min read

GET /v1/prices?symbol=XAU-USD-SPOT gives you the gold spot price in US dollars per troy ounce. Omit symbol to request all spot prices at once. Without a key, the limit is 10 requests a minute per IP. Free and keyless prices are delayed by 15 minutes.

Make a request

Symbols use BASE-QUOTE-CONTRACT, such as XAU-USD-SPOT, XAG-USD-SPOT or XAU-INR-SPOT for gold priced in rupees. Both gold and XAU resolve to XAU-USD-SPOT. Store your key on the server, as the API does not support browser CORS.

Shell
curl "https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT" \  -H "Authorization: Bearer $GOLDPRICE_API_KEY"
JavaScript
const res = await fetch("https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT", {  headers: { Authorization: `Bearer ${process.env.GOLDPRICE_API_KEY}` },})const data = await res.json()if (!res.ok) throw new Error(data.error)
Python
import os, requestsres = requests.get(    "https://api.goldprice.dev/v1/prices?symbol=XAU-USD-SPOT",    headers={"Authorization": f"Bearer {os.environ['GOLDPRICE_API_KEY']}"},    timeout=10,)res.raise_for_status()data = res.json()

Request parameters

NameLocationRequiredDescription
symbolqueryNo (every spot price)BASE-QUOTE-CONTRACT, such as XAU-USD-SPOT
includequeryNoAdditional field groups, such as sources,karat or all

Read the response

This example response was recorded without a key on 19 Oct 2026. Prices use strings to preserve precision. Parse them as decimals.

Response example (19 Oct 2026)
{  "symbols": [    {      "symbol": "XAU",      "quote_currency": "USD",      "unit": "troy_ounce",      "contract_type": "spot",      "price": "4164.22",      "is_stale": false,      "computed_at": "2026-10-19T12:45:06.720397+00:00"    }  ]}
FieldDescription
symbolMetal code: XAU, XAG or HG
quote_currencyCurrency used for the price
unittroy_ounce, or pound for copper
contract_typespot
pricePrice as a decimal string
is_staleTrue if the price is outside its freshness window
computed_atPrice calculation time (UTC)

API errors

StatuserrorCause
400invalid_symbolSymbol is unavailable or does not use BASE-QUOTE-CONTRACT
429rate_limitedKeyless IP exceeded 100 requests in the hour
429rate_limit_exceededMinute limit exceeded for the plan, or per IP without a key
429quota_exceededPlan's monthly request quota exceeded
Error response example
{  "error": "invalid_symbol",  "symbol": "NOPE",  "hint": "expected format BASE-QUOTE-CONTRACT, e.g. XAU-USD-SPOT"}

Request and data limits

Free and keyless prices are delayed by 15 minutes. Without a key, you get 10 requests a minute per IP. A free key includes 5,000 requests a month. Paid plans provide live prices. See free plan limits for all plan limits.

Questions

Is an API key required to get the gold price?

No. /v1/prices allows 10 requests a minute and 100 an hour per IP without a key. A free key gives you your own 5,000 requests a month.

How can I request gold in a different currency?

Set the quote currency in the symbol, such as XAU-INR-SPOT or XAU-JPY-SPOT. Gold prices are available in 31 currencies.

Why does the API return the price as a string?

Strings preserve precision in JSON. For sales or accounting, parse the price as a decimal rather than a float.

Keep reading

Give /v1/prices requests their own quota

Use a free key to move this request off the shared per-IP limit.

Get a free key