Chains API

Current gas price

What sending a transaction costs on a chain now: three gas price tiers and the next block's base fee in gwei (just standard and base fee on ARC and RHC), plus the blob base fee on ETH and BNB.

GET/api/external/chain-analysis/gas-price/{chain}

What it returns

What it costs to send a transaction on this chain right now. lowGwei, standardGwei and fastGwei are three price tiers — cheapest-but-slower, the ordinary suggestion, and a price for prompt inclusion — each a full price per unit of gas (base fee plus tip) in GWEI, as a number. baseFeeGwei is the protocol base fee of the NEXT block, which every tier already includes. asOfBlock is the block the tiers were computed at. To price a transaction, multiply a tier by the gas it uses: 21,000 gas at 0.07 gwei is 1,470 gwei = 0.00000147 of the native coin. A baseFeeGwei of 0 is a real zero — BNB charges no base fee, and the chain's own fee history agrees — not a missing value. On ARC and RHC, and whenever the three tiers cannot be read, the answer carries the base fee and standardGwei (the base fee plus the chain's own suggested tip) and lowGwei and fastGwei are null. A tier that could not be established is null, never 0, which would claim the chain is free. This is a snapshot of one moment. blobBaseFeeGwei is a separate price: what one unit of blob gas (the data space rollups post their batches to) costs in the next block, in GWEI. It is not part of any tier and an ordinary transaction does not pay it. It is published on ETH and BNB, the chains here that take blob transactions, and is null on the others and whenever it could not be read. This is a snapshot of one moment: for gas over time use chain-vitals-history with metric=avgGasPriceWei, which answers one daily average per day. Chains: ETH, BNB, BASE, STABLE, ARC, RHC; every other chain returns 400.

Chains

  • BNB Chain BNB
  • Ethereum ETH
  • Stable STABLE
  • Base BASE
  • Robinhood Chain RHC
  • Arc ARC

Request

Send your key in the x-dex-data-key header. Replace each <placeholder> with a real value.

curl -H "x-dex-data-key: $DEXDATA_API_KEY" \
  "https://api.dexdata.io/api/external/chain-analysis/gas-price/BNB"
Parameters
ParameterDescription
chain

path · string · required

ETH, BNB, BASE, STABLE, ARC, RHC; every other chain returns 400.

Response fields

A JSON response. Every field is always present; null means the value could not be established, never zero.

Response fields of Current gas price
FieldType
asOfBlocknumber | null
lowGweinumber | null
standardGweinumber | null
fastGweinumber | null
baseFeeGweinumber | null
blobBaseFeeGweinumber | null

Start building with DexData today

Sign in, create a key and make your first call in a minute. Free credits every month, and you only pay for calls that succeed.

Get a free API key