Pick what you need and press Send request. The response comes from the same API your project will use.
Preparing playground…
View complete JSON response
Three public endpoints
GET/spot/latest?country=AE
Latest prices
Gold and silver converted into the selected market currency, with units, gold karats, quote time, daily change, and an optional local estimate.
Parameter:country — supported two-letter country code or USD. Defaults to AE.
GET/markets
Supported markets
Discover valid country codes, currencies, symbols, display precision, exchange-rate freshness, and market page links.
Parameters: none.
GET/history?metal=XAU&interval=daily&limit=30
Historical prices
Minimum, average, and maximum historical references in USD per troy ounce, returned oldest to newest.
Parameters:metal = XAU/gold or XAG/silver; interval = daily, monthly, or yearly; optional from/to in yyyy-MM-dd; limit = 1–1000.
INTEGRATION EXAMPLE
Fetch the latest price
Reuse one HTTP client and one response cache in your application. Set a timeout, refresh no faster than every 30 seconds, respect Retry-After, and show the cached quote time when offline.
const response = await fetch(
"https://alyawmgold.com/api/v1/spot/latest?country=SA"
);
if (!response.ok) throw new Error(`API returned ${response.status}`);
const data = await response.json();
const gold = data.metals.gold;
if (gold) {
console.log(gold.units.gram, data.country.currency);
console.log(gold.quoteRecordedAtUtc, gold.isQuoteStale);
}
Your application does not need an AlyawmGold API key. Keep one last successful response so it can remain useful during a temporary connection failure.
Fields you should understand
units.gram
Spot reference per gram in the selected currency.
karats.karat21
21K gold reference per gram. Gold only.
quoteRecordedAtUtc
When the underlying metal quote was recorded.
isQuoteStale
True when an open-period quote is older than expected.
isExchangeRateStale
True when non-USD currency data is missing its time or older than 48 hours.
localGoldEstimate
Optional indicative local estimate. It is not a dealer quote.
Either metal can be null if its feed is temporarily unavailable. Always check before reading its values. Prices exclude dealer spreads, premiums, making charges, taxes, and fees.
Metal observations are sourced from Gold API. AlyawmGold stores observations and adds currency conversion, units, karats, and local estimates. See the terms and data disclaimer.
Cache, limits, and errors
Endpoint
Recommended minimum cache
/spot/latest
30 seconds
/history
5 minutes
/markets
30 minutes
The three public endpoints share 120 requests per minute per caller IP per application instance. Shared networks may share an allowance. On 429, wait for the seconds in Retry-After.
400 Fix invalid input404 Unsupported market429 Slow down503 Retry later
Handled failures use standard Problem Details JSON. Cross-origin browser requests are supported without credentials or a custom identification header.