Spot metals API reference
Spot prices for gold, silver, platinum and palladium, plus WTI, Brent and copper reference prices, with units and UTC timestamps.
Authentication and request
Send your API key in the Authorization bearer header. Product overview →
curl "https://api.narwhalapi.com/v1/commodities/spot/XAU/USD" \
--header "Authorization: Bearer $NARWHAL_API_KEY"Operations
| Endpoint | Operation |
|---|---|
GET /v1/commodities/spot/{commodity}/{currency} | Get a spot price or a futures-based reference price. |
GET /v1/commodities/spot/{commodity}/{currency}/bars | Get open, high, low and close bars for gold, silver, platinum, palladium, copper, WTI and BRENT. Copper history is available. |
Parameters
| Field | Meaning |
|---|---|
commodity | Path parameter. XAU, XAG, XPT, XPD, WTI (WTI crude oil), BRENT (Brent crude oil), or XCU (copper). |
currency | Path parameter, uppercase. Gold: USD, AUD, BGN, BRL, CAD, CHF, CNY, CZK, DKK, EUR, GBP, HKD, HUF, IDR, ILS, INR, ISK, JPY, KRW, MXN, MYR, NOK, NZD, PHP, PLN, RON, SEK, SGD, THB, TRY, or ZAR. Silver, platinum, palladium, WTI, BRENT and XCU: USD only. |
unit | Spot and bars. Optional: troy_, gram, kilogram, pound or metric_. The price is per that unit, and unit and unit_ in the answer name it. Gold, silver, platinum, palladium and copper (XCU) take all five; WTI and BRENT are quoted per barrel and take only barrel. Any other value returns 400 unit_. Without unit the answer is as before. |
interval | Bars only. 1m, 5m, 15m, 1h, 4h, or 1d (default). |
start / | Bars only. Both required. UTC times on interval boundaries (4h at 00, 04, 08 and so on; 1d at midnight). Start is inclusive; end is exclusive. |
limit / | Bars only. Default 100, at most 500. Reuse next_cursor with the same query. |
Quote fields
| Field | Meaning |
|---|---|
symbol, currency, unit | The symbol and quote currency. unit is troy_ounce for precious metals, barrel for WTI and BRENT, and pound for XCU. |
commodity_ | commodity_ names the commodity the same way on spot, futures, prediction and physical prices, such as gold or crude-oil. Crude oil also carries benchmark (wti, brent, urals or dubai), and futures carry exchange_, the exchange's standard code. |
unit_ | unit_ is the unit in one standard spelling, such as troy_ounce, barrel or tonne; unit keeps the source's wording. When a price is quoted in cents, price_ is 0.01: multiply the price by it to get the amount in currency. |
price | One positive indicative price as a decimal string. |
timestamp, stale | Quote UTC timestamp and explicit freshness flag. |
bars | Bars only. Closed bars in order from oldest to newest. Each has timestamp (bar start) and open, high, low and close as decimal strings. Gold in currencies other than USD has close only. |
start, end | start and end are returned only when Narwhal changes the requested range. |
next_ | Bars only. Continuation cursor; null when no bars remain. |
Illustrative response for GET /v1/commodities/spot/{commodity}/{currency}.
{
"symbol": "XAU-USD",
"commodity_key": "gold",
"price": "3550.6320",
"currency": "USD",
"unit": "troy_ounce",
"unit_key": "troy_ounce",
"timestamp": "2026-11-20T05:54:00Z",
"stale": false
}{
"symbol": "WTI-USD",
"commodity_key": "crude-oil",
"benchmark": "wti",
"price": "82.5990",
"currency": "USD",
"unit": "barrel",
"unit_key": "barrel",
"timestamp": "2026-11-20T05:52:00Z",
"stale": false
}With unit=gram, a silver quote is priced per gram.
curl "https://api.narwhalapi.com/v1/commodities/spot/XAG/USD?unit=gram" \
--header "Authorization: Bearer $NARWHAL_API_KEY"{
"symbol": "XAG-USD",
"commodity_key": "silver",
"price": "1.31824",
"currency": "USD",
"unit": "gram",
"unit_key": "gram",
"timestamp": "2026-11-21T18:11:00Z",
"stale": false
}A converted price is worked out in exact decimals from the price shown without unit, with 1 troy ounce = 31.1034768 g and 1 pound = 453.59237 g. It keeps as many significant figures as that price (trailing zeros of a whole number do not count), and a price under 10 keeps at least 4 decimals. Halves round up and zeros after the decimal point are dropped. Bars convert open, high, low and close the same way.
Bars response for GET /. start and end are returned only when Narwhal changes the requested range.
{
"symbol": "XAU-USD",
"commodity_key": "gold",
"currency": "USD",
"unit": "troy_ounce",
"unit_key": "troy_ounce",
"bars": [
{
"timestamp": "2026-10-01T00:00:00Z",
"open": "4156.8352",
"high": "4192.5215",
"low": "4139.7787",
"close": "4177.4458"
},
{
"timestamp": "2026-10-02T00:00:00Z",
"open": "4177.2183",
"high": "4225.6497",
"low": "4125.9232",
"close": "4141.5280"
}
],
"next_cursor": null
}Gold in a currency other than USD has close only.
{
"symbol": "XAU-EUR",
"commodity_key": "gold",
"currency": "EUR",
"unit": "troy_ounce",
"unit_key": "troy_ounce",
"bars": [
{
"timestamp": "2026-10-01T00:00:00Z",
"close": "3715.66"
},
{
"timestamp": "2026-10-02T00:00:00Z",
"close": "3680.67"
}
],
"next_cursor": null
}A request may span at most 3 days of 1m bars, 14 days of 5m bars, 60 days of 15m bars; a longer range returns 400 invalid_. Wider intervals have no cap.
Interpreting the data
WTI, BRENT and XCU are reference prices derived from futures markets, not physical spot cargo prices. Display the unit and timestamp with the price. The timestamp is the start of the minute the price belongs to; during the daily 17:00 New York metals pause (21:00 UTC in summer, 22:00 UTC in winter), which is not a market closure, a quote can carry stale: true. A closed market never makes a quote stale: from Friday 17:00 to Sunday 17:00 New York time you get the last price with stale: false. A quote is stale when its price is more than 10 minutes old, counting only open-market time; do not present a stale quote as a fresh market price. An unknown commodity returns 404 commodity_. A known commodity with an unsupported currency returns 404 currency_. Price history is available for gold, silver, platinum, palladium, copper (XCU), WTI and BRENT. We never fill gaps: missing bars stay missing. We keep 1m and 5m bars for 30 days and 15m, 1h, 4h and 1d bars indefinitely. A range outside retention returns an empty bars list, not an error. WTI and BRENT have 15-minute and hourly history from 2020.
Spot prices are live for every account, including accounts that only use free credit. The prices stream has ended; poll this route instead. Prices stream reference →
Errors
400 invalid_for an invalid path value, a start or end that is not on an interval boundary, a missingquery startorendon bars, or a bars range longer than the interval allows.401 invalid_for a missing or invalid Bearer key.api_ key 400 unit_for anot_ supported unitthe commodity cannot be shown in. The detail lists the allowed units for it.404 commodity_for a commodity Narwhal does not serve, andnot_ supported 404 currency_for a currency it does not serve for that commodity.not_ supported 429 rate_when the per-minute limit is reached, orlimit_ exceeded 402 insufficient_when your balance does not cover the call.credits 503 upstream_when price data cannot be read.unavailable
MCP tools
commodities_get_spot_pricecommodities_get_price_historyWas this page helpful?