# Precious Metals API
> Live precious and industrial metal spot prices as an API — gold, silver, platinum, palladium and copper — with optional currency conversion via European Central Bank rates. Get the live USD spot price of any metal and convert it into any major currency; list them all at once; compute the value of a quantity of metal; or read the classic gold/silver and gold/platinum ratios traders watch. Built for trading, jewellery, treasury and dashboard apps. The commodities and precious-metals layer, live and key-free — distinct from generic ticker-quote APIs.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/metals-api/..."
```

## Pricing
- **Free** (Free) — 400 calls/Mo, 5 req/s
- **Starter** ($9/Mo) — 12,000 calls/Mo, 15 req/s
- **Pro** ($23/Mo) — 58,000 calls/Mo, 30 req/s
- **Business** ($53/Mo) — 290,000 calls/Mo, 50 req/s

## Endpoints

### Metals

#### `GET /v1/convert` — Value of a quantity of metal

**Parameters:**
- `symbol` (query, required, string) — Metal symbol Example: `XAU`
- `amount` (query, required, string) — Quantity (in the metal's unit) Example: `2`
- `currency` (query, optional, string) — Currency Example: `EUR`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metals-api/v1/convert?symbol=XAU&amount=2&currency=EUR"
```

**Response:**
```json
{
    "data": {
        "name": "Gold",
        "unit": "troy ounce",
        "amount": 2,
        "symbol": "XAU",
        "currency": "EUR",
        "unit_price": 3758.8341,
        "total_value": 7517.67
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:24.239Z",
        "request_id": "dbc60e3e-ffd7-4eb5-981e-fa72064499fd"
    },
    "status": "ok",
    "message": "Conversion retrieved successfully",
    "success": true
}
```

#### `GET /v1/list` — All metals at once

**Parameters:**
- `currency` (query, optional, string) — Currency, e.g. EUR Example: `USD`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metals-api/v1/list?currency=USD"
```

**Response:**
```json
{
    "data": {
        "count": 5,
        "metals": [
            {
                "name": "Gold",
                "unit": "troy ounce",
                "price": 4337.7002,
                "symbol": "XAU",
                "price_usd": 4337.7002,
                "updated_at": "2026-06-09T03:03:08Z"
            },
            {
                "name": "Silver",
                "unit": "troy ounce",
                "price": 67.831,
                "symbol": "XAG",
                "price_usd": 67.831,
                "updated_at": "2026-06-09T03:03:08Z"
            },
            {
                "name": "Platinum",
                "unit": "troy ounce",
                "price": 1765,
                "symbol": "XPT",
                "price_usd": 1765,
                "updated_at": "2026-06-09T03:03:11Z"
            },
            {
                "name": "Palladium",
                "unit": "troy ounce",
                "price": 1247,
                "symbol": "XPD",
                "price_usd": 1247,
                "updated_at": "2026-06-09T03:03:10Z"
            },
            {
                "name": "Copper",
                "unit": "pound",
                "price": 6.2313,
                "symbol": "HG",
                "price_usd": 6.2313,
                "updated_at": "2026-06-09T03:03:10Z"
            }
        ],
        "currency": "USD"
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:24.699Z",
        "request_id": "c584469d-c754-4a7b-b73e-f1d9b72ea06
…(truncated, see openapi.json for full schema)
```

#### `GET /v1/metal` — Spot price of a metal

**Parameters:**
- `symbol` (query, required, string) — XAU | XAG | XPT | XPD | HG (or gold/silver/…) Example: `XAU`
- `currency` (query, optional, string) — Currency, e.g. EUR Example: `USD`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metals-api/v1/metal?symbol=XAU&currency=USD"
```

**Response:**
```json
{
    "data": {
        "name": "Gold",
        "unit": "troy ounce",
        "price": 4337.7002,
        "symbol": "XAU",
        "currency": "USD",
        "price_usd": 4337.7002,
        "updated_at": "2026-06-09T03:03:08Z"
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:24.821Z",
        "request_id": "95a6504b-55b2-4641-90b7-11024f0fa7ff"
    },
    "status": "ok",
    "message": "Metal spot retrieved successfully",
    "success": true
}
```

#### `GET /v1/ratio` — Gold/silver and gold/platinum ratios

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metals-api/v1/ratio"
```

**Response:**
```json
{
    "data": {
        "note": "Gold/silver ratio = ounces of silver to buy one ounce of gold; a classic relative-value gauge.",
        "gold_usd": 4337.7,
        "silver_usd": 67.83,
        "updated_at": "2026-06-09T03:03:08Z",
        "platinum_usd": 1765,
        "gold_silver_ratio": 63.95,
        "gold_platinum_ratio": 2.458
    },
    "meta": {
        "timestamp": "2026-06-09T03:03:24.929Z",
        "request_id": "dee84d21-b9df-4fb3-bfab-24ea578c60aa"
    },
    "status": "ok",
    "message": "Ratios retrieved successfully",
    "success": true
}
```

### Meta

#### `GET /v1/meta` — Service metadata

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/metals-api/v1/meta"
```

**Response:**
```json
{
    "data": {
        "metals": [
            {
                "name": "Gold",
                "unit": "troy ounce",
                "symbol": "XAU"
            },
            {
                "name": "Silver",
                "unit": "troy ounce",
                "symbol": "XAG"
            },
            {
                "name": "Platinum",
                "unit": "troy ounce",
                "symbol": "XPT"
            },
            {
                "name": "Palladium",
                "unit": "troy ounce",
                "symbol": "XPD"
            },
            {
                "name": "Copper",
                "unit": "pound",
                "symbol": "HG"
            }
        ],
        "source": "gold-api.com (spot) + ECB/Frankfurter (FX), live",
        "service": "metals-api",
        "endpoints": {
            "GET /v1/list": "All metals at once (currency=).",
            "GET /v1/meta": "This document.",
            "GET /v1/metal": "Spot price of a metal (symbol=XAU|XAG|XPT|XPD|HG, currency=USD|EUR|…).",
            "GET /v1/ratio": "Gold/silver and gold/platinum ratios.",
            "GET /v1/convert": "Value of a quantity (symbol=, amount=, currency=)."
        },
        "description": "Live precious & industrial metal spot prices (gold, silver, platinum, palladium, copper) from gold-api, with optional currency conversion via ECB rates. Get one metal's spot (in any currency), list all, value a quantity, or read the gold/silver and gold/platinum 
…(truncated, see openapi.json for full schema)
```


---
Marketplace page: https://www.oanor.com/api/metals-api
OpenAPI spec: https://www.oanor.com/api/metals-api/openapi.json
