/v1/chains
Chains Yearn runs on
Provalo dal vivo
10 chiamate gratuite al giorno — senza registrazione, senza chiave API. Passa dal gateway oanor.
Funziona. Prendi una chiave API e usala nel tuo progetto.
Ottieni una chiave APIFrammenti di codice
curl "https://api.oanor.com/yearn-api/v1/chains" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/yearn-api/v1/chains", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/yearn-api/v1/chains");
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/yearn-api/v1/chains",
headers={"x-oanor-key": "oanor_test_..."}
)
Risposta di esempio
Una risposta reale di questo endpoint, acquisita dall'ultimo health check.
{
"data": {
"count": 8,
"chains": [
{
"name": "Ethereum",
"chain_id": 1
},
{
"name": "Optimism",
"chain_id": 10
},
{
"name": "Gnosis",
"chain_id": 100
},
{
"name": "Polygon",
"chain_id": 137
},
{
"name": "Sonic",
"chain_id": 146
},
{
"name": "Fantom",
"chain_id": 250
},
{
"name": "Base",
"chain_id": 8453
},
{
"name": "Arbitrum",
"chain_id": 42161
}
],
"source": "Yearn (yDaemon)"
},
"meta": {
"timestamp": "2026-06-10T22:58:15.907Z",
"request_id": "4c67b01e-5ddb-4181-9ac5-633f55e8ba89"
},
"status": "ok",
"message": "Chains retrieved successfully",
"success": true
}