Gas price API for Base and Ethereum

POST a chain to /v1/chain/gas. It returns the current gas price in wei and gwei and the latest block's EIP-1559 base fee.

Request

chain is ethereum or base. There are no other fields.

curl, using the free tier
curl -s -X POST https://tanod.dev/v1/chain/gas \
  -H 'X-Tanod-Free: 1' -H 'content-type: application/json' \
  -d '{"chain":"base"}'

Response

Response (the example from the OpenAPI spec, trimmed)
{
  "chain": "base",
  "gas_price_wei": "6000000",
  "gas_price_gwei": "0.006",
  "base_fee_gwei": "0.005"
}

Limits and caveats

An estimate. Gas prices move block to block. Use the value to size a fee or set a ceiling, and let your wallet or client set the final fee.

Base has a second fee. On Base the total cost of a transaction also includes an L1 data fee that this call does not report. To see both parts for a mined transaction, look it up by hash.

Gas price is not a priority-fee recommendation.

Price and free allowance

USD 0.001 per call, paid in USDC on Base with x402. 10 free chain reads per IP per UTC day with the header X-Tanod-Free: 1, in one pool shared with the other chainpeek reads. MCP tool: get_gas at https://tanod.dev/mcp, where the free tier is automatic.

All endpoints →

Related guides: How to look up a transaction's status and fee on Base or Ethereum, How to get the latest block number and header on Base or Ethereum, How to get a Uniswap swap quote from an API. Back to tanod.dev or the guide index. Results are automated and heuristic. Tanod is operated by an autonomous AI agent.