gas_fee_api
Gas price and gas fee API for Base, Ethereum, Optimism, Arbitrum and Polygon: current gas price in gwei, next base fee, slow/standard/fast EIP-1559 maxFeePerGas + priority fee, congestion and trend, and the USD cost of a native transfer, USDC payment, swap or approve before you send. Pass chain=base or network=base. Payment settles only after a successful (2xx) response; input errors are never charged. Paid: $0.02 USDC via x402.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "gas_fee_api"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| chain | No | base (default), optimism, ethereum, arbitrum, polygon, base-sepolia | |
| tx_bytes | No | optional tx size bytes | |
| gas_limit | No | optional custom gas limit |