{"uid":"cap_2xQ65y9OwE-599Gf1iQjB","slug":"base-chain-gas-fee-history-988c7d75","name":"Base Chain Gas Fee History","description":"Pay-per-call crypto microdata for trading/onchain AI agents via x402 (USDC on Base): Base gas, token risk, balances, multi-venue prices, Hyperliquid book/funding, kimchi premium. No API keys.","url":"https://kr-x402-mvp.kgy5612.workers.dev/api/chain/fee-history?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"],"type":"string"},"queryParams":{"type":"object","properties":{"gas_limit":{"type":"integer","maximum":30000000,"minimum":21000,"examples":[21000,150000],"description":"Gas units to price (default 21000)"}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"block":37000000,"chain":"base","tiers":{"fast":{"est_cost_usd":0.0007,"max_fee_gwei":0.025,"max_priority_fee_gwei":0.01},"slow":{"est_cost_usd":0.0005,"max_fee_gwei":0.006,"max_priority_fee_gwei":0.001},"standard":{"est_cost_usd":0.0005,"max_fee_gwei":0.011,"max_priority_fee_gwei":0.001}},"sources":["https://mainnet.base.org"],"chain_id":8453,"tx_fields":{"gas":"0x5208","type":"0x2","maxFeePerGas":"0xa7d8c0","maxPriorityFeePerGas":"0xf4240"},"congestion":0.42,"updated_at":"2026-10-29T13:30:00Z","base_fee_gwei":0.005,"gas_price_gwei":0.006,"recommended_tier":"standard","gas_price_wei_hex":"0x5b8d80","est_transfer_cost_eth":1.26e-7,"max_priority_fee_gwei":0.001,"max_priority_fee_wei_hex":"0xf4240"}},"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_ugirMRXEOccodD--r2QrI","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 and historical gas fee estimates for the Base L2 chain, including tiered fee recommendations (slow/standard/fast), congestion level, and EIP-1559 fields.","exampleAgentPrompt":"What are the current gas fees on Base right now — give me the standard and fast tiers with estimated USD cost for a basic ETH transfer of 21000 gas units?","exampleUseCases":[{"title":"Pre-trade gas cost check","prompt":"Before I swap tokens on Base, tell me the current fast-tier gas fee in gwei and how much it'll cost in USD for a 150000 gas transaction."},{"title":"Network congestion monitoring","prompt":"Check if the Base network is congested right now and tell me the recommended fee tier to use so my transaction goes through quickly."},{"title":"DeFi bot fee optimization","prompt":"I need the current EIP-1559 maxFeePerGas and maxPriorityFeePerGas values on Base for a 21000 gas standard transaction so I can set them in my transaction."}],"resultDescription":"Returns a JSON object with current block number, base fee in gwei, gas price in gwei and wei hex, EIP-1559 tx fields (maxFeePerGas, maxPriorityFeePerGas), three fee tiers (slow/standard/fast) each with max_fee_gwei, max_priority_fee_gwei, and est_cost_usd, a congestion score (0-1), a recommended_tier string, estimated ETH transfer cost, sources list, chain_id (8453), and updated_at timestamp.","failureModes":["Upstream Base RPC unavailable — may return stale or error response","Invalid gas_limit value outside 21000–30000000 range returns 400 validation error","Payment failure via x402 (insufficient USDC balance) blocks request","Response may be slightly delayed if Base network is experiencing high load"],"whenToPreferThis":"Choose this endpoint when an AI agent needs real-time Base L2 gas fee data without requiring API key setup — ideal for onchain trading bots, DeFi agents, and wallet automation that pay per call via x402 USDC micropayments. Prefer over free RPCs when structured, tiered fee recommendations with USD cost estimates are needed out of the box.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-31T18:42:02.181Z","isFirstParty":false,"canonicalSlug":"base-chain-gas-fee-history-988c7d75"}