{"uid":"cap_oOB8x1boiDXscwOmN7dJq","slug":"agentindex-x402-gas-price-7d1850c4","name":"AgentIndex x402 Gas Price","description":"Read the live gas price, EIP-1559 base fee and estimated native-transfer cost on Base, Ethereum, Polygon, Arbitrum or Optimism. No RPC key or account. Try GET /gas-price/sample.","url":"https://x402.agentindex.world/gas-price?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"network":{"enum":["base","ethereum","polygon","arbitrum","optimism"],"type":"string","description":"EVM network to read; defaults to Base."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["network","block_number","gas_price","native_transfer_estimate"],"properties":{"network":{"type":"object"},"base_fee":{"type":["object","null"]},"gas_price":{"type":"object"},"block_number":{"type":"integer"},"x402_receipt":{"type":"object"},"native_transfer_estimate":{"type":"object"}}}}}}},"responseSchema":{"type":"json","example":{"network":{"key":"base","name":"Base","caip2":"eip155:8453"},"base_fee":{"wei":"900000","gwei":0.0009},"gas_price":{"wei":"1000000","gwei":0.001},"block_number":51500000,"native_transfer_estimate":{"symbol":"ETH","fee_wei":"21000000000","gas_limit":21000,"fee_native":2.1e-8}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"unknown","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.001/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.001","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_iVw3mOs1d4eJ53Zs5W0m7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.001","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns current gas price, base fee, and estimated native transfer cost for a specified EVM network (Base, Ethereum, Polygon, Arbitrum, Optimism).","exampleAgentPrompt":"What's the current gas price on Base right now — give me the gwei figure and an estimate for what a plain ETH transfer would cost?","exampleUseCases":[{"title":"Pre-transaction gas check on Arbitrum","prompt":"Before I send this transaction, can you check what the current gas price is on Arbitrum and estimate what a native ETH transfer would cost in wei?"},{"title":"Multi-chain gas comparison for DeFi routing","prompt":"I need to compare gas fees right now — can you pull the current gas price and base fee on Ethereum vs Polygon so I can decide which chain is cheaper to use?"},{"title":"Gas monitoring for automated agent wallet ops","prompt":"Check the current gas price on Base and tell me the block number we're at — I want to know if gas is low enough to proceed with my scheduled on-chain action."}],"resultDescription":"A JSON object containing the network identity (key, name, CAIP-2 identifier), current gas price in both wei and gwei, base fee (if EIP-1559 supported), current block number, and a native transfer estimate including symbol, fee in wei, gas limit, and fee in native token units. Also includes an x402 payment receipt.","failureModes":["Unsupported or misspelled network enum value returns a 400 or validation error","Network RPC temporarily unavailable results in 503 or timeout","Missing required method or type field in input returns schema validation error","Insufficient USDC balance or failed x402 payment results in 402 Payment Required"],"whenToPreferThis":"Choose this endpoint when an AI agent needs real-time EVM gas data across Base, Ethereum, Polygon, Arbitrum, or Optimism — especially when operating in a pay-per-call context via x402/USDC on Base. Prefer it over general blockchain APIs when the agent already has x402 payment infrastructure and needs lightweight, structured gas reads without a full node or heavy SDK dependency.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-02T06:31:32.064Z","isFirstParty":false,"canonicalSlug":"agentindex-x402-gas-price-7d1850c4"}