Current gas for a chain (paid $0.001)
gasRetrieve current gas prices for a specified blockchain, including base fee, priority fee, and max fee. Optionally determine if the base fee is below a given threshold.
Instructions
PAID $0.001 (x402, USDC on Base). Current gas for a chain via public RPC: base fee + suggested priority + suggested max fee (gwei) at the latest block. If below_gwei is set, also returns whether the base fee is at/below your threshold right now. Read-only. Args: chain (ethereum|base|arbitrum|polygon|bsc|optimism), below_gwei (optional). Without payment returns the x402 challenge; pass x_payment to settle.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | Yes | Chain to read gas for. | |
| x_payment | No | x402 payment payload (base64) for this PAID read. If supplied it is forwarded as the X-PAYMENT header to settle the call and return the real result instead of a 402 challenge. Omit to get the price challenge first. | |
| below_gwei | No | Optional threshold: return a boolean of whether base fee is at/below this many gwei now. |