{"uid":"cap_1ZfYfzwyl7fYUyhfOPtll","slug":"base-gas-price-history-5e652aa4","name":"Base Gas Price History","description":"Pay-per-call x402 APIs for AI agents: OpenAI-compatible LLM chat, perp funding and arbitrage spreads, crypto prices, gas, FX, Solana SPL mint audit, token price by contract, x402 delivery-receipt verification, web search, clean page extraction, batch tools and deterministic code-security scanning. USDC on Base or Solana, no signup, no API key, from $0.0001 a call.","url":"https://scanpay-edge.alextaghiashvili.workers.dev/api/v1/base-gas-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":{"blocks":{"type":"integer","default":20,"maximum":50,"minimum":5}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"cached":false,"history":[{"number":20000000,"gas_used":10000000,"tx_count":100,"gas_limit":30000000,"timestamp":1720000000,"base_fee_gwei":0.001,"utilization_pct":33.33},{"number":20000001,"gas_used":10000000,"tx_count":100,"gas_limit":30000000,"timestamp":1720000002,"base_fee_gwei":0.001,"utilization_pct":33.33},{"number":20000002,"gas_used":10000000,"tx_count":100,"gas_limit":30000000,"timestamp":1720000004,"base_fee_gwei":0.001,"utilization_pct":33.33},{"number":20000003,"gas_used":10000000,"tx_count":100,"gas_limit":30000000,"timestamp":1720000006,"base_fee_gwei":0.001,"utilization_pct":33.33},{"number":20000004,"gas_used":10000000,"tx_count":100,"gas_limit":30000000,"timestamp":1720000008,"base_fee_gwei":0.001,"utilization_pct":33.33}],"network":"eip155:8453","product":"scanpay.base_gas_history","summary":{"trend_pct":0,"avg_base_fee_gwei":0.001,"max_base_fee_gwei":0.001,"min_base_fee_gwei":0.001,"avg_utilization_pct":33.33,"suggested_max_fee_gwei":0.00125,"suggested_priority_fee_gwei":0.001},"as_of_ms":1720000000000,"to_block":20000004,"price_usd":0.002,"from_block":20000000,"blocks_returned":5,"blocks_requested":5}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_mZFL2T31oc9_YBw6jydv0","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns per-block base fee, gas usage, utilization, and transaction counts for the last N Base (EVM chain 8453) blocks, plus summary statistics and a suggested max fee.","exampleAgentPrompt":"Pull the Base gas price history for the last 30 blocks and tell me the average base fee, current trend, and what max fee I should set for my next transaction.","exampleUseCases":[{"title":"Pre-transaction gas fee check","prompt":"Before I submit this Base transaction, check the last 20 blocks of gas history and tell me the suggested max fee and whether gas is trending up or down."},{"title":"Network congestion monitoring","prompt":"How congested is the Base network right now? Give me the gas utilization and transaction count trends for the past 50 blocks so I can decide whether to wait."},{"title":"DeFi bot gas cost estimation","prompt":"I need to estimate transaction costs on Base for my trading bot — fetch the last 30 blocks of gas history and give me the average, min, and max base fees in gwei."}],"resultDescription":"Returns a JSON object with a per-block history array (block number, timestamp, gas used, gas limit, utilization %, base fee in gwei, tx count) for the requested number of blocks, plus a summary object containing average/min/max base fee, average utilization, trend percentage, suggested max fee, and suggested priority fee — all scoped to the Base network (EIP-155 chain 8453).","failureModes":["blocks parameter below 5 or above 50 returns a validation error","RPC or indexer connectivity issues may return a cached or partial result (cached flag = true)","If the Base node is unavailable, the endpoint may return an error or stale data","Requesting blocks near genesis or during a chain fork may yield incomplete history"],"whenToPreferThis":"Choose this endpoint when you need real-time, per-block gas analytics specifically for the Base L2 network (chain 8453), including trend analysis and actionable fee suggestions. It is preferable over raw RPC calls because it aggregates multi-block statistics and computes a suggested max fee automatically. Use it over generic multi-chain gas APIs when Base-specific granularity and trend data matter.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-02T18:33:25.629Z","isFirstParty":false,"canonicalSlug":"base-gas-price-history-5e652aa4"}