---
title: "Spot metals API reference | Narwhal API"
description: "Spot prices for gold, silver, platinum and palladium, plus WTI, Brent and copper reference prices, with units and UTC timestamps."
url: "https://narwhalapi.com/docs/api/commodities/spot"
---

# 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 →](https://narwhalapi.com/api/commodities/spot.md)

```
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_ounce`, `gram`, `kilogram`, `pound` or `metric_ton`. The price is per that unit, and `unit` and `unit_key` 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_not_supported`. Without `unit` the answer is as before. |
| `interval` | Bars only. 1m, 5m, 15m, 1h, 4h, or 1d (default). |
| `start / end` | 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 / cursor` | 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_key` | `commodity_key` 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_mic`, the exchange's standard code. |
| `unit_key` | `unit_key` 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_scale` 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_cursor` | Bars only. Continuation cursor; null when no bars remain. |

Illustrative response for `GET /v1/commodities/spot/{commodity}/{currency}`.

Quote response

```
{
  "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
}
```

WTI quote response

```
{
  "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.

Quote request per gram

```
curl "https://api.narwhalapi.com/v1/commodities/spot/XAG/USD?unit=gram" \
  --header "Authorization: Bearer $NARWHAL_API_KEY"
```

Quote response per gram

```
{
  "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 /v1/commodities/spot/{commodity}/{currency}/bars`. `start` and `end` are returned only when Narwhal changes the requested range.

Bars response

```
{
  "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.

Bars response in a converted currency

```
{
  "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_query`. 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_not_supported`. A known commodity with an unsupported currency returns 404 `currency_not_supported`. 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 →](https://narwhalapi.com/docs/api/prices-stream.md)
[Error format and credits →](https://narwhalapi.com/docs/errors.md)

## Errors

- `400 invalid_query` for an invalid path value, a start or end that is not on an interval boundary, a missing `start` or `end` on bars, or a bars range longer than the interval allows.
- `401 invalid_api_key` for a missing or invalid Bearer key.
- `400 unit_not_supported` for a `unit` the commodity cannot be shown in. The detail lists the allowed units for it.
- `404 commodity_not_supported` for a commodity Narwhal does not serve, and `404 currency_not_supported` for a currency it does not serve for that commodity.
- `429 rate_limit_exceeded` when the per-minute limit is reached, or `402 insufficient_credits` when your balance does not cover the call.
- `503 upstream_unavailable` when price data cannot be read.

## MCP tools

`commodities_get_spot_price` `commodities_get_price_history`

[Connect through MCP →](https://narwhalapi.com/docs/mcp.md)

Was this page helpful?
