{"uid":"cap_nwZL5QsPKg1Qeo-2omEg_","slug":"ontario-protocol-base-gas-fee-estimator-a6f19a31","name":"Ontario Protocol Base Gas Fee Estimator","description":"What does a Base transaction cost right now? Base fee, priority-fee p25/p50/p90 over the last 20 blocks, suggested maxFeePerGas and maxPriorityFeePerGas for slow, normal and fast inclusion, an L1 data-fee upper bound, and estimated total cost in wei for an ETH transfer and an ERC-20 transfer, read live from Base RPC with the block number. $0.0015 USDC on Base. Failed read, no charge. No account, no API key. Estimates, not inclusion guarantees. By Ontario Protocol.","url":"https://ontarioprotocol.com/api/x402/base/gas?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","required":["input","output"],"properties":{"input":{"type":"object","required":["queryParams"],"properties":{"queryParams":{"type":"object","properties":{"blocks":{"type":"integer","default":20,"maximum":50,"minimum":5,"description":"Optional number of recent blocks the fee percentiles cover, 5 to 50. Default 20."}},"additionalProperties":false}}},"output":{"type":"object","required":["example"],"properties":{"example":{"type":"object","additionalProperties":true}}}}},"responseSchema":{"example":{"note":"Estimates, not inclusion guarantees. Wei amounts are decimal strings.","block":53049909,"schema":"ontario.base_gas.v1","source":"Base RPC","network":"eip155:8453","read_at":"2026-10-25T00:46:05Z","suggested":{"fast":{"max_fee_per_gas":"15800000","max_priority_fee_per_gas":"5800000"},"slow":{"max_fee_per_gas":"11000000","max_priority_fee_per_gas":"1000000"},"normal":{"max_fee_per_gas":"11000000","max_priority_fee_per_gas":"1000000"}},"assumptions":{"base_fee":"base fee of the next block","blocks_sampled":20,"max_fee_formula":"2 * base_fee + priority_fee","estimate_formula":"gas * (base_fee + p50 tip) + L1 data-fee upper bound","eth_transfer_gas":21000,"erc20_transfer_gas":65000,"priority_fee_method":"median across the sampled blocks of each block's gas-weighted 25th, 50th and 90th percentile tip (eth_feeHistory)","eth_transfer_unsigned_tx_bytes":110,"erc20_transfer_unsigned_tx_bytes":175},"base_fee_wei":"5000000","priority_fee_wei":{"p25":"1000000","p50":"1000000","p90":"5800000"},"estimated_total_wei":{"eth_transfer":"126389167165","erc20_transfer":"390565949161"},"l1_fee_upper_bound_wei":{"eth_transfer":"389167165","erc20_transfer":"565949161"},"estimate_includes_l1_fee":true}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.0015","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.0015/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.0015","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_jftgoud82ZM-qaajAJDhX","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.0015","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns live Base network gas fee data including base fee, priority fee percentiles, suggested maxFeePerGas/maxPriorityFeePerGas for slow/normal/fast inclusion, L1 data fee upper bound, and estimated total transaction costs in wei.","exampleAgentPrompt":"What are the current gas fees on Base — give me the base fee, priority fee percentiles, and the recommended maxFeePerGas and maxPriorityFeePerGas for slow, normal, and fast transactions, sampled over the last 20 blocks?","exampleUseCases":[{"title":"Pre-flight cost check for ETH send","prompt":"Before I send ETH on Base, check the current gas fees and tell me the estimated total cost in wei for an ETH transfer and what maxFeePerGas I should set for normal inclusion."},{"title":"DeFi bot fee optimization","prompt":"My trading bot is about to submit a Base transaction — pull the latest gas fee percentiles and fast-inclusion fee suggestions so it can set an appropriate gas price right now."},{"title":"ERC-20 transfer cost estimation","prompt":"How much will an ERC-20 token transfer on Base cost me in total right now, including the L1 data fee? Sample the last 30 blocks for better accuracy."}],"resultDescription":"A JSON object containing: the current block number, Base network identifier, timestamp, base fee in wei, priority fee p25/p50/p90 across sampled blocks, suggested maxFeePerGas and maxPriorityFeePerGas for slow/normal/fast inclusion, L1 data fee upper bound for ETH and ERC-20 transfers, estimated total transaction cost in wei for both transfer types, and the assumptions used in calculations (gas limits, formula, bytes). All wei amounts are returned as decimal strings.","failureModes":["Base RPC read failure — no charge, endpoint returns an error indicating the live data could not be fetched","Invalid blocks parameter (outside 5–50 range) — likely returns a 400 or validation error","Network connectivity issue to Base RPC — transient failure with no charge per stated policy","Stale or delayed block data during high network congestion — estimates may lag slightly behind true mempool state"],"whenToPreferThis":"Choose this endpoint when you need live, current Base network gas fee data with multi-tier inclusion speed suggestions (slow/normal/fast) and want both L1 and L2 fee components included in a single call. It is particularly useful for agents that need to set EIP-1559 gas parameters before submitting transactions, estimate transaction costs before execution, or display current network fee conditions to users. Prefer it over generic Ethereum gas endpoints because it is Base-specific and accounts for the L1 data fee component unique to Base as an L2.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-30T22:15:32.206Z","isFirstParty":false,"canonicalSlug":"ontario-protocol-base-gas-fee-estimator-a6f19a31"}