{"uid":"cap_FPeAOaaZZbB9_SXBrR4zD","slug":"base-gas-price-api-x402-8c821b14","name":"Base Gas Price API (x402)","description":"Live Base mainnet gas: EIP-1559 base fee, low/medium/high priority tiers in gwei, and a transaction cost estimate for any gas limit.","url":"https://base-gas-x402-production.up.railway.app/gas","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"],"type":"string"},"queryParams":{"type":"object","required":[],"properties":{"gasLimit":{"type":"integer","default":21000,"maximum":30000000,"minimum":21000,"description":"Gas units to price the cost estimate against. Defaults to 21000 (a plain ETH transfer). Use ~65000 for an ERC-20 transfer, ~85000 for an NFT mint, ~180000 for a Uniswap swap, or ~1500000 for a contract deploy."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"chain":"base-mainnet","chainId":8453,"gasPrice":"0.014","fetchedAt":"2026-06-22T00:00:00.000Z","blockNumber":"12345678","baseFeePerGas":"0.012","priorityFeePerGas":{"low":"0.001","high":"0.004","medium":"0.002"},"estimatedTransferCost":{"eth":"0.000000294","gwei":"294","gasLimit":21000}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_f3mCpCcbmBcFjtFT_RLdv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns live Base mainnet gas prices including base fee, priority fees, and estimated transfer costs, gated by x402 micropayment.","exampleAgentPrompt":"What's the current gas price on Base mainnet — give me the base fee, low/medium/high priority fees, and how much a standard ETH transfer would cost right now?","exampleUseCases":[{"title":"Real-time gas fee dashboard widget","prompt":"Pull the latest Base mainnet gas prices for me — I need the base fee, priority fee tiers, and estimated cost of a 21,000 gas transfer so I can display them on my DeFi dashboard."},{"title":"Optimal transaction timing for DeFi bot","prompt":"Check the current gas prices on Base — I want to know if the base fee is low enough right now to submit my swap transaction, and what priority fee I should set for a medium-speed confirmation."},{"title":"Gas cost estimate before sending ETH","prompt":"Before I send ETH on Base, can you tell me what the current gas price is and how much the transfer fee will be in both gwei and ETH?"}],"resultDescription":"A JSON object containing chain name and ID (base-mainnet, 8453), current gas price in gwei, base fee per gas, low/medium/high priority fees, the latest block number, estimated transfer cost for a standard 21,000 gas transaction in both ETH and gwei, and a fetchedAt timestamp indicating when the data was retrieved.","failureModes":["Payment not provided or invalid x402 payment header — returns 402 Payment Required","Network connectivity issues fetching live Base RPC data — may return stale or error response","Base RPC node unavailability — upstream error causing failure to retrieve current block data","Malformed request — returns 400 Bad Request if unexpected parameters are sent"],"whenToPreferThis":"Choose this endpoint when you need live, real-time Base mainnet gas data including tiered priority fees and transfer cost estimates. Prefer it over generic Ethereum gas APIs when your transactions target the Base L2 specifically, or when you need a pay-per-call micropayment model (x402) rather than a subscription API key. Ideal for agents that check gas only occasionally and want to avoid recurring subscription costs.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:33:06.933Z","isFirstParty":false}