Gas Oracle

Real-time gas prices for 6 chains plus a cross-chain index. Direct RPC queries, median aggregation, Ed25519 signed.

Overview

The Gas Oracle queries public RPC endpoints on Ethereum, Base, Arbitrum, Polygon, Optimism, and Solana to return real-time gas prices. Each chain uses 3+ independent RPC providers with median aggregation. All responses include USD-normalized transaction costs using the internal ETH/USD price feed (9 exchanges).

Paid endpoints

EndpointDescriptionL402x402
/oracle/gas/ethereumEthereum mainnet gas price10 sats$0.01
/oracle/gas/baseBase L2 gas price10 sats$0.01
/oracle/gas/arbitrumArbitrum L2 gas price10 sats$0.01
/oracle/gas/polygonPolygon gas price10 sats$0.01
/oracle/gas/optimismOptimism L2 gas price10 sats$0.01
/oracle/gas/solanaSolana transaction cost10 sats$0.01
/oracle/gas/indexCross-chain index — 6 chains ranked cheapest-first50 sats$0.05

Free endpoints

EndpointDescription
/oracle/gas/{chain}/previewUnsigned preview — up to 5 minutes stale
/oracle/gas/index/previewUnsigned cross-chain index preview
/oracle/gas/catalogueSupported chains and metadata

Supported chains

Six chains with aliases: ethereum (eth), base, arbitrum (arb), polygon (poly), optimism (op), solana (sol).

Example request

curl https://api.myceliasignal.com/oracle/gas/ethereum/preview

Response fields

FieldTypeDescription
chainstringChain name
chainIdintegerEIP-155 chain ID
gasPriceGweinumberMedian gas price in gwei
baseFeeGweinumberBase fee in gwei (EIP-1559 chains)
txCostNativenumberStandard transfer cost in native token
txCostUsdnumberStandard transfer cost in USD
nativePriceUsdnumberNative token price in USD
sourcesarrayRPC endpoints queried
sourceCountintegerNumber of sources
methodstringAggregation method (median)

Cross-chain index

The /oracle/gas/index endpoint queries all 6 chains simultaneously and returns them ranked by USD-normalized transaction cost, cheapest first. Useful for agents choosing the most cost-effective chain for a transaction.