/v1/convert
Convert an amount between any LRT and ETH
Δοκιμάστε το ζωντανά
10 δωρεάν κλήσεις την ημέρα — χωρίς εγγραφή, χωρίς κλειδί API. Μέσω του gateway του oanor.
Δουλεύει. Πάρε ένα κλειδί API και χρησιμοποίησέ το στο έργο σου.
Λάβετε ένα κλειδί APIΑποσπάσματα κώδικα
curl "https://api.oanor.com/lrtcompare-api/v1/convert" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/lrtcompare-api/v1/convert", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/lrtcompare-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/lrtcompare-api/v1/convert",
headers={"x-oanor-key": "oanor_test_..."}
)
Παράδειγμα απόκρισης
Πραγματική απόκριση αυτού του endpoint, από τον τελευταίο έλεγχο υγείας.
{
"data": {
"to": "ezeth",
"from": "weeth",
"note": "Converts an amount between any liquid-restaking token and ETH (or between two LRTs) at the current on-chain exchange rates. Each token is valued in ETH via its rate source, then converted to the target. ETH itself is 1. Live, cached ~90s.",
"amount": 10,
"result": 10.16006896,
"source": "Ethereum LRT rate sources via public RPC (ethereum-rpc.publicnode.com), keyless",
"eth_per_to": 1.07966065,
"eth_per_from": 1.09694267
},
"meta": {
"timestamp": "2026-06-13T04:42:39.613Z",
"request_id": "5e2231c1-e150-4e54-814c-74e3a7e43f61"
},
"status": "ok",
"message": "Conversion retrieved successfully",
"success": true
}