Silver Price API live and historical, as JSON
Live and historical silver prices quoted in US dollars per troy ounce. The history endpoint returns 14,488 daily bars back to October 1966. Plain HTTPS with a bearer token, no SDK required.
- Live silver spot with bid, ask and 24-hour change on every plan, Free included
- History from Starter ($9 a month), daily and intraday
- Request it as XAG on /v1/prices and /v1/history/XAG
{
"success": true,
"data": {
"XAG": {
"symbol": "XAG",
"price": 64.30216,
"bid": 63.0161168,
"ask": 64.7844262,
"change24h": -0.03265,
"changePercent24h": -0.0508,
"high24h": 64.32696,
"low24h": 64.28939,
"timestamp": "2026-09-26T18:12:50.484Z",
"exchange": "SPOT",
"marketType": "spot",
"stale": false
}
}
}14,488
Daily silver bars
1966
First daily bar
XAG
Symbol to request
200
Free requests a month, no card
Live price
Get the live silver price
Silver price API in cURL
curl -H "Authorization: Bearer mc_live_YOUR_KEY" \
"https://api.metalcharts.org/v1/prices"Every tracked metal comes back in one response; silver is under data.XAG.
Silver price API in Python
import requests
res = requests.get(
"https://api.metalcharts.org/v1/prices",
headers={"Authorization": "Bearer mc_live_YOUR_KEY"},
timeout=10,
)
res.raise_for_status()
price = res.json()["data"]["XAG"]["price"]
print(f"Silver: ${price}")Uses requests. raise_for_status turns a 401 or 429 into an exception rather than letting a bad payload through.
Silver price API in JavaScript
const res = await fetch(
"https://api.metalcharts.org/v1/prices",
{ headers: { Authorization: "Bearer mc_live_YOUR_KEY" } },
);
if (!res.ok) throw new Error(`HTTP ${res.status}`);
const { data } = await res.json();
console.log(`Silver: ${data.XAG.price}`);Native fetch, so it runs in Node 18 and above. Keep the key on your server; proxy browser requests through it.
Silver price API in PHP
<?php
$ch = curl_init("https://api.metalcharts.org/v1/prices");
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_HTTPHEADER => ["Authorization: Bearer mc_live_YOUR_KEY"],
CURLOPT_TIMEOUT => 10,
]);
$body = curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);
if ($code !== 200) {
throw new RuntimeException("MetalCharts API returned $code");
}
$data = json_decode($body, true);
echo "Silver: " . $data["data"]["XAG"]["price"];Plain cURL with no dependencies. Check the status code, because a failed call still returns a parseable body.
Silver price API in Go
req, _ := http.NewRequest(
http.MethodGet, "https://api.metalcharts.org/v1/prices", nil,
)
req.Header.Set("Authorization", "Bearer mc_live_YOUR_KEY")
resp, err := http.DefaultClient.Do(req)
if err != nil {
return err
}
defer resp.Body.Close()
var out struct {
Data map[string]struct {
Price float64 `json:"price"`
} `json:"data"`
}
if err := json.NewDecoder(resp.Body).Decode(&out); err != nil {
return err
}
fmt.Println("Silver:", out.Data["XAG"].Price)Decoding into a narrow struct keeps the compiler honest about the field you actually use.
History
Historical silver price API
curl -H "Authorization: Bearer mc_live_YOUR_KEY" \
"https://api.metalcharts.org/v1/history/XAG?range=1Y&interval=1d"Set the window with range or explicit start and end dates, and the candle size with interval: 15m, 30m, 45m, 1h, 2h, 4h, 8h, 1d, 1w or 1M. Each point carries open, high, low, close and volume, so it drives a candlestick chart directly. A history call costs 2 weight.
History depth is what separates the plans. Starter ($9 a month) reaches back 1 year, Basic ($29) reaches back 1 year, Pro ($99) reaches back 5 years, and Ultimate ($249) returns the full series.
The symbol is XAG. Passing the metal's name instead returns a 400, the most common mistake on first use.
Endpoints
Endpoints carrying silver
| Endpoint | Returns | From |
|---|---|---|
| GET/v1/prices | Live spot price, 24h change, high and low, plus an indicative bid and ask | Free |
| GET/v1/history/{symbol} | Daily, weekly and monthly candles, plus 15m to 8h intraday | Starter |
| GET/v1/ath/{symbol} | All-time high and the date it was set | Starter |
| GET/v1/instruments | Which symbol each endpoint expects | Free |
Beyond price, silver also appears in
| Endpoint | Returns | From |
|---|---|---|
| GET/v1/comex/inventory?symbol=XAG | COMEX registered and eligible silver stocks | Pro |
| GET/v1/lbma/vault?metal=silver | LBMA London vault holdings | Pro |
| GET/v1/sge/benchmark?metal=silver | Shanghai benchmark fixings | Pro |
| GET/v1/shfe/inventory?symbol=ag | Shanghai Futures Exchange warehouse stocks | Pro |
| GET/v1/cot?metal=XAG | CFTC positioning | Pro |
Plans and limits
What each plan allows
| Plan | Per minuteweight, per API key | Per monthweight, all keys combined | API keys | History |
|---|---|---|---|---|
| Free$0 | 10 | 200200 spot calls | 1 | Live spot only |
| Starter$9/mo | 20 | 10,00010,000 spot calls or 5,000 history calls | 2 | 1 year |
| Basic$29/mo | 30 | 250,000250,000 spot calls or 125,000 history calls | 3 | 1 year |
| Pro$99/mo | 200 | No monthly cap | 10 | 5 years |
| Ultimate$249/mo | 1,000 | No monthly cap | 25 | Full, back to 1966 |
FAQ
Silver API questions
How far back does the silver price history go?
Can I get the gold to silver ratio from the API?
What intraday intervals are available for silver?
What symbol do I use for silver?
More metals
Other metals, same API
- Gold Price API (14,425 daily bars)
- Platinum Price API (5,798 daily bars)
- Palladium Price API (5,799 daily bars)
- Copper Price API (9,776 daily bars)
- All metals, one API