/v1/metals
Live gold/silver/platinum/palladium vs USD
Pruébalo en vivo
10 llamadas gratis al día — sin registro, sin clave API. Pasa por el gateway de oanor.
Funciona. Consigue una clave API y úsala en tu proyecto.
Obtener una clave APIFragmentos de código
curl "https://api.oanor.com/swissquote-api/v1/metals" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/swissquote-api/v1/metals", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/swissquote-api/v1/metals");
curl_setopt($ch, CURLOPT_HTTPHEADER, ["x-oanor-key: oanor_test_..."]);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$out = curl_exec($ch);
import requests
requests.get(
"https://api.oanor.com/swissquote-api/v1/metals",
headers={"x-oanor-key": "oanor_test_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"data": {
"count": 4,
"metals": [
{
"ask": 4173.182,
"bid": 4172.678,
"mid": 4172.93,
"base": "XAU",
"metal": "gold",
"quote": "USD",
"source": "Swissquote",
"spread": 0.504,
"symbol": "XAU",
"timestamp": "2026-06-10T14:02:41.893Z",
"instrument": "XAU/USD",
"spread_pct": 0.012079
},
{
"ask": 65.351,
"bid": 65.3031,
"mid": 65.32705,
"base": "XAG",
"metal": "silver",
"quote": "USD",
"source": "Swissquote",
"spread": 0.0479,
"symbol": "XAG",
"timestamp": "2026-06-10T14:02:41.874Z",
"instrument": "XAG/USD",
"spread_pct": 0.07335
},
{
"ask": 1696.662,
"bid": 1693.438,
"mid": 1695.05,
"base": "XPT",
"metal": "platinum",
"quote": "USD",
"source": "Swissquote",
"spread": 3.224,
"symbol": "XPT",
"timestamp": "2026-06-10T14:02:41.892Z",
"instrument": "XPT/USD",
"spread_pct": 0.190382
},
{
"ask": 1248.29,
"bid": 1244.7,
"mid": 1246.495,
"base": "XPD",
"metal": "palladium",
"quote": "USD",
"source": "Swissquote",
"spread": 3.59,
"symbol": "XPD",
"timestamp": "2026-06-10T14:02:41.654Z",
"instrument": "XPD/USD",
"spread_pct": 0.288423
}
],
"source": "Swissquote",
"quote_currency": "USD"
},
"meta": {
"timestamp": "2026-06-10T14:02:41.984Z",
"request_id": "0cb5b608-a729-4a45-9019-c89bac9e21c8"
},
"status": "ok",
"message": "Metals retrieved successfully",
"success": true
}