$ man gas-now-base
/gas-now-base(1)
PRICE / CALL
$0.02
USDC · base mainnet · scheme: exact
METHOD
POST
CLUSTER
edgemarketCATEGORY
utilities
STATUS
● live
NAME
gas-now-base — gas oracle / eip-1559 fee estimator
SYNOPSIS
POST https://x402.org/v1/gas-now-base
Content-Type: application/json
X-PAYMENT: <signed-transferWithAuthorization>
{ ... }↳ first call →
402 Payment Required. Sign USDCtransferWithAuthorization, retry with theX-PAYMENT header.DESCRIPTION
Gas oracle / EIP-1559 fee estimator. Real-time base fee + priority fee for Base / Ethereum / Optimism / Arbitrum / Polygon. USD-cost estimates for native transfer, USDC transfer, ERC-20 approve, Uniswap V2/V3 swap, NFT mint, contract deploy.
INPUT — request schema
| property | type | description | req? |
|---|---|---|---|
| chain | string | EVM L1/L2 to read gas from. Default 'base'. enum: base · ethereum · optimism · arbitrum · polygon | optional |
OUTPUT — response shape
| field | type | description |
|---|---|---|
| chain | string | Chain name (base, ethereum, optimism, arbitrum, or polygon). |
| chain_id | string | EVM chain ID as a string (e.g. 8453 for Base, 1 for Ethereum, 137 for Polygon). |
| block_number | string | Latest block number used to read the base fee, as a decimal string. |
| block_timestamp | number | Unix timestamp (seconds) of the latest block sampled for the fee reading. |
| block_iso_timestamp | string | ISO 8601 timestamp of the latest block sampled for the fee reading. |
| block_age_seconds | number | Seconds elapsed between the sampled block and the response time, for staleness checks. |
| base_fee_gwei | number | Current EIP-1559 base fee for the chain, in gwei. |
| priority_fee_suggestion_gwei | number | Suggested priority (tip) fee in gwei for timely inclusion in the next block. |
| total_recommended_gwei | number | Recommended max fee per gas in gwei (base fee plus priority fee suggestion). |
| legacy_gas_price_gwei | number | Legacy (non-1559) gas price in gwei for transactions that don't set fee caps. |
| native_token | string | Symbol of the chain's native gas token (ETH, MATIC, etc.). |
| native_token_price_usd | number | Spot USD price of the native gas token used to derive USD cost estimates. |
| cost_estimates | object | USD cost estimates per common action (native transfer, USDC transfer, ERC-20 approve, swap, NFT mint, deploy). |
| rpc_url | string | Public RPC endpoint used to query the chain's latest block and base fee. |
EXAMPLES — two ways to call
EXAMPLE 1 · curl
curl -X POST https://x402.org/v1/gas-now-base \
-H 'Content-Type: application/json' \
-d '{ }'first response =
402 Payment Required with payment requirements; sign + retry with X-PAYMENT.EXAMPLE 2 · mcp
# install once claude mcp add x402 --command "npx x402-deployer-mcp" # then ask Claude Code: # "use the gas-now-base tool to ..."
MCP server handles payment automatically — your coding agent just calls the tool by name.
METADATA
- tags
- gascryptobaseethereuml2fee
- methods
- POST
- cluster
- edgemarket
- price
- $0.02 USDC per call
ADJACENT — other endpoints in edgemarket
| endpoint | description | price |
|---|---|---|
| defi-llama-protocol | DefiLlama protocol lookup — TVL, chain breakdown, current TVL, 24h/7d/30d changes, audits, parent protocol, categories. | $0.02 |
| gas-price | Gas price API / EIP-1559 fee estimator / Base + Ethereum + Optimism + Arbitrum gas tracker / pre-tx cost estimator. | $0.02 |
| token-price | Crypto token price API / CoinGecko wrapper. | $0.02 |
| tx-receipt-decode | EVM transaction receipt decoder / log decoder / event log reader / Etherscan tx debug / receipt parser / Basescan tx explainer / tenderly… | $0.02 |
| tx-simulate-swap | Tx simulate swap / pre-trade quote / DEX swap simulator / 1inch + LlamaSwap quote / would-it-succeed check. | $0.02 |
| bridge-rates | Cross-chain bridge rate aggregator. | $0.03 |
| dao-proposal-monitor | Snapshot.org DAO proposal monitor. | $0.03 |
| ens-resolve | ENS resolver / Ethereum Name Service lookup. | $0.03 |
SEE ALSO