/v1/chains
Chains Yearn runs on
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/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_..."}
)
Respuesta de ejemplo
Una respuesta real de este endpoint, capturada en la última comprobación de estado.
{
"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
}