Aller au contenu
GET /v1/convert

Convert an amount between any LST and ETH

Essayez-le en direct

10 appels gratuits par jour — sans inscription, sans clé API. Passe par la passerelle oanor.

En-têtes personnalisés (facultatif)
api.oanor.com/lstcompare-api

Ça marche. Récupérez une clé API et utilisez-la dans votre projet.

Obtenez une clé API

Extraits de code

curl "https://api.oanor.com/lstcompare-api/v1/convert" \
  -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/lstcompare-api/v1/convert", {
  headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/lstcompare-api/v1/convert");
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/lstcompare-api/v1/convert",
    headers={"x-oanor-key": "oanor_test_..."}
)

Exemple de réponse

Une réponse réelle de ce endpoint, capturée lors du dernier contrôle de santé.

{
    "data": {
        "to": "reth",
        "from": "wsteth",
        "note": "Converts an amount between any liquid-staking token and ETH (or between two LSTs) at the current on-chain exchange rates. Each token is valued in ETH via its contract rate, then converted to the target. ETH itself is 1. Live, cached ~90s.",
        "amount": 10,
        "result": 10.61454641,
        "source": "Ethereum LST token contracts via public RPC (ethereum-rpc.publicnode.com), keyless",
        "eth_per_to": 1.16524984,
        "eth_per_from": 1.23685985
    },
    "meta": {
        "timestamp": "2026-06-13T04:42:40.336Z",
        "request_id": "238926cc-caea-46bb-8984-6aa5e9587a8f"
    },
    "status": "ok",
    "message": "Conversion retrieved successfully",
    "success": true
}