/v1/cheapest
Cheapest rollup right now for a transfer and a swap
Δοκιμάστε το ζωντανά
10 δωρεάν κλήσεις την ημέρα — χωρίς εγγραφή, χωρίς κλειδί API. Μέσω του gateway του oanor.
Δουλεύει. Πάρε ένα κλειδί API και χρησιμοποίησέ το στο έργο σου.
Λάβετε ένα κλειδί APIΑποσπάσματα κώδικα
curl "https://api.oanor.com/l2fees-api/v1/cheapest" \ -H "x-oanor-key: oanor_test_..."
await fetch("https://api.oanor.com/l2fees-api/v1/cheapest", {
headers: { "x-oanor-key": "oanor_test_..." }
});
$ch = curl_init("https://api.oanor.com/l2fees-api/v1/cheapest");
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/l2fees-api/v1/cheapest",
headers={"x-oanor-key": "oanor_test_..."}
)
Παράδειγμα απόκρισης
Πραγματική απόκριση αυτού του endpoint, από τον τελευταίο έλεγχο υγείας.
{
"data": {
"note": "The single cheapest Ethereum layer-2 rollup right now for a simple native transfer and for a token swap, in USD, plus the cheapest overall by median cost — and how much cheaper that is than transacting on Ethereum L1 (l2_saving_vs_l1_pct). The quick 'where should I transact' answer. Live, cached ~60s.",
"source": "growthepie public API (v1/fees/table.json), keyless",
"cheapest_for_swap": {
"name": "OP Mainnet",
"chain": "optimism",
"cost_usd": 8.67e-6
},
"l2_saving_vs_l1_pct": 99.97,
"cheapest_for_transfer": {
"name": "OP Mainnet",
"chain": "optimism",
"cost_usd": 3.99e-5
},
"cheapest_overall_median": {
"name": "OP Mainnet",
"chain": "optimism",
"cost_usd": 1.45e-5
},
"ethereum_l1_median_cost_usd": 0.0443
},
"meta": {
"timestamp": "2026-06-12T19:35:55.250Z",
"request_id": "46684ce6-a121-4e0e-ae81-630cf9813cd7"
},
"status": "ok",
"message": "Cheapest retrieved successfully",
"success": true
}