{"uid":"cap_lQ49KainwFSbYEevR-KZx","slug":"gas-apitoll-cloud-fd153d5a","name":"Base Mainnet Gas Price Oracle (gas.apitoll.cloud)","description":"Base gas oracle / gas price API for AI agents and bots — get the gas price for a transaction on Base in one x402 call. Real-time slow/standard/fast EIP-1559 fee tiers from a live eth_feeHistory call, returned as DROP-IN maxFeePerGas + maxPriorityFeePerGas in wei — plug straight into a viem/ethers transaction, no gwei conversion. Plus base fee, head block, and network fullness. Call it before every Base tx to set a fair fee or wait out congestion.","url":"https://gas.apitoll.cloud/v1/base/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":["blocks"],"properties":{"blocks":{"type":"integer","maximum":50,"minimum":1,"description":"Recent blocks to sample for percentile reward (1..50, clamped). Wider = smoother tiers, narrower = more reactive."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"stats":{"type":"object","required":["blocks_sampled","median_fullness_pct","ts"],"properties":{"ts":{"type":"string","format":"date-time","description":"ISO 8601 timestamp when snapshot was assembled."},"blocks_sampled":{"type":"integer","description":"Number of recent blocks sampled for percentile calculation."},"median_fullness_pct":{"type":"number","description":"Median (gasUsed / gasLimit) × 100 across sampled blocks. 100 = full, 0 = empty."}},"description":"Sampling metadata: block count and median fullness."},"tiers":{"type":"object","properties":{"fast":{"type":"object","required":["max_fee_gwei","max_priority_gwei","maxFeePerGas","maxPriorityFeePerGas"],"properties":{"maxFeePerGas":{"type":"string","description":"DROP-IN: exact maxFeePerGas in wei. tx.maxFeePerGas = BigInt(this)."},"max_fee_gwei":{"type":"number","description":"maxFeePerGas in gwei (human-readable)."},"max_priority_gwei":{"type":"number","description":"maxPriorityFeePerGas (tip) in gwei (human-readable)."},"maxPriorityFeePerGas":{"type":"string","description":"DROP-IN: exact maxPriorityFeePerGas in wei (BigInt-ready)."}}},"slow":{"type":"object","required":["max_fee_gwei","max_priority_gwei","maxFeePerGas","maxPriorityFeePerGas"],"properties":{"maxFeePerGas":{"type":"string","description":"DROP-IN: exact maxFeePerGas in wei. tx.maxFeePerGas = BigInt(this)."},"max_fee_gwei":{"type":"number","description":"maxFeePerGas in gwei (human-readable)."},"max_priority_gwei":{"type":"number","description":"maxPriorityFeePerGas (tip) in gwei (human-readable)."},"maxPriorityFeePerGas":{"type":"string","description":"DROP-IN: exact maxPriorityFeePerGas in wei (BigInt-ready)."}}},"standard":{"type":"object","required":["max_fee_gwei","max_priority_gwei","maxFeePerGas","maxPriorityFeePerGas"],"properties":{"maxFeePerGas":{"type":"string","description":"DROP-IN: exact maxFeePerGas in wei. tx.maxFeePerGas = BigInt(this)."},"max_fee_gwei":{"type":"number","description":"maxFeePerGas in gwei (human-readable)."},"max_priority_gwei":{"type":"number","description":"maxPriorityFeePerGas (tip) in gwei (human-readable)."},"maxPriorityFeePerGas":{"type":"string","description":"DROP-IN: exact maxPriorityFeePerGas in wei (BigInt-ready)."}}}},"description":"Three fee tiers (slow p10, standard p50, fast p90). Each carries human gwei (max_fee_gwei/max_priority_gwei) AND DROP-IN wei (maxFeePerGas/maxPriorityFeePerGas, BigInt-ready) to plug straight into a viem/ethers tx."},"network":{"enum":["base-mainnet","base-sepolia"],"type":"string","description":"Network identifier (Base mainnet or testnet)"},"base_fee_wei":{"type":"string","description":"Base fee in wei (exact, BigInt-ready decimal string)."},"block_number":{"type":"integer","description":"Latest sampled block number (the head)."},"base_fee_gwei":{"type":"number","description":"EIP-1559 base fee for the next block (gwei, human-readable)."}}}}}}},"responseSchema":{"type":"json","example":{"stats":{"ts":"2026-05-28T15:42:30.000Z","blocks_sampled":20,"median_fullness_pct":31.5},"tiers":{"fast":{"max_fee_gwei":0.0163,"max_priority_gwei":0.01},"slow":{"max_fee_gwei":0.0083,"max_priority_gwei":0.002},"standard":{"max_fee_gwei":0.0103,"max_priority_gwei":0.004}},"network":"base-mainnet","block_number":16842103,"base_fee_gwei":0.0042}},"example":{"request":{"input":{"type":"http","method":"GET","queryParams":{"blocks":20}}},"response":{"stats":{"ts":"2026-06-10T04:32:29.659Z","blocks_sampled":20,"median_fullness_pct":8.66},"tiers":{"fast":{"max_fee_gwei":0.0125,"max_priority_gwei":0.005},"slow":{"max_fee_gwei":0.0075,"max_priority_gwei":0},"standard":{"max_fee_gwei":0.0086,"max_priority_gwei":0.0011}},"network":"base-mainnet","block_number":47138301,"base_fee_gwei":0.005}},"exampleRequest":{"blocks":20},"tags":["x402"],"displayCostAmount":"0.001","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"settled","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_0SoSyJcrLWbZZSK3XV4br","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 real-time EIP-1559 gas fee tiers (slow/standard/fast) plus base fee, latest block number, and median block fullness for the Base mainnet.","exampleAgentPrompt":"What are the current slow, standard, and fast gas fee tiers on Base mainnet right now? Sample the last 20 blocks so I can decide whether to send my transaction immediately or wait.","exampleUseCases":[{"title":"DeFi swap timing optimizer","prompt":"Check the current gas fees and block fullness on Base right now. If the fast tier is under 5 gwei, go ahead and execute my swap immediately — otherwise, queue it for later when the network is less congested."},{"title":"Batch transaction cost estimator","prompt":"I need to send 10 transactions to Base over the next hour. Get me the current slow, standard, and fast gas tiers so I can estimate the total cost and decide which fee tier minimizes my spending without missing my deadline."},{"title":"Network congestion alert system","prompt":"Pull the latest Base mainnet gas snapshot including block fullness. If median block fullness is above 80%, alert me that the network is congested and I should increase my priority fee by 10% to ensure faster confirmation."}],"resultDescription":"A JSON object with three EIP-1559 fee tiers (slow=p10, standard=p50, fast=p90), each containing max_fee_per_gas and max_priority_fee_per_gas in gwei; the predicted next-block base fee in gwei; the latest sampled block number; and stats including timestamp, number of blocks sampled, and median block fullness percentage.","failureModes":["RPC node unavailable — upstream eth_feeHistory call fails, returns 5xx","Invalid blocks parameter (outside 1-50 range) — request rejected or clamped","Network misconfiguration — may return data for wrong chain if Base RPC is temporarily rerouted","Rate limiting or payment failure — 402 response if x402 payment not processed","Empty or sparse block history — tiers may be unreliable if Base has low recent activity"],"whenToPreferThis":"Use this endpoint when you need real-time, EIP-1559-aware gas estimates specifically for the Base mainnet (Coinbase L2), with p10/p50/p90 fee tiers and block congestion signals. Prefer this over generic Ethereum gas APIs when building Base-native dApps, DeFi bots, or transaction schedulers that need structured slow/standard/fast tiers and block fullness context rather than a single gas price value.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:36:22.745Z","isFirstParty":false}