{"uid":"cap_hxhPynClVmkqWEPxlsQEO","slug":"base-gas-budget-check-d02e01c3","name":"Base Gas Budget Check","description":"Check a caller-supplied Base gas price and gas limit against an ETH transaction budget with exact Wei arithmetic. Use immediately after get_base_gas or get_base_estimate_gas to fail closed before signing. Returns estimated fee, budget headroom, and an optional USD estimate for 0.001 USDC via x402 on Base; no live RPC or custody.","url":"https://api.delx.ai/api/v1/x402/base-gas-budget-check","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"eth_usd":{"type":"number","exclusiveMinimum":0},"gas_limit":{"type":"integer","maximum":30000000,"minimum":1},"budget_eth":{"type":"number","minimum":0},"gas_price_gwei":{"type":"number","minimum":0}}},"responseSchema":{"type":"json","example":{"schema":"delx/util-base-gas-budget-check/v1","budget_eth":"0.00001","budget_wei":"10000000000000","headroom_eth":"0.00000832","headroom_wei":"8320000000000","within_budget":true,"estimated_fee_eth":"0.00000168","estimated_fee_usd":"0.00588","estimated_fee_wei":"1680000000000"}},"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_YkW4DZzj0qaoNhgXXWN2K","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":"Validates a caller-supplied Base gas price and gas limit against an ETH transaction budget using exact Wei arithmetic, returning fee estimate, budget headroom, and optional USD estimate.","exampleAgentPrompt":"Before I sign this Base transaction, check if my budget of 0.005 ETH is enough for a gas limit of 200000 at 1.5 gwei — ETH is currently $3200, so give me the USD estimate too.","exampleUseCases":[{"title":"Preflight check before smart contract call","prompt":"I'm about to call a smart contract on Base with a gas limit of 300000 and a gas price of 2 gwei. My ETH budget is 0.01 ETH and ETH is at $3100. Will I have enough headroom, and what's the estimated cost in USD?"},{"title":"Agent transaction safety gate","prompt":"Before my agent signs anything, validate that a gas limit of 150000 at 1.8 gwei fits within a 0.003 ETH budget — I want to know the estimated fee and how much headroom I have left."},{"title":"Gas cost USD estimate for reporting","prompt":"I need to know roughly what a Base transaction with 250000 gas at 2.5 gwei will cost in USD assuming ETH is $3400, and whether it fits inside a 0.008 ETH budget."}],"resultDescription":"Returns the estimated transaction fee in ETH (gas_price_gwei × gas_limit in exact Wei), remaining budget headroom in ETH, a pass/fail budget verdict, and an optional USD cost estimate if eth_usd is supplied. No live RPC calls or custody involved.","failureModes":["gas_limit exceeds 30,000,000 maximum → validation error","gas_price_gwei or budget_eth is negative or zero → rejected by schema","eth_usd not supplied → USD estimate omitted from response","Computed fee exceeds budget_eth → returns fail verdict with negative headroom","Malformed JSON body → 400 bad request"],"whenToPreferThis":"Use this endpoint immediately after fetching live gas data from get_base_gas or get_base_estimate_gas as a fail-closed preflight before signing any Base transaction. Prefer it when you need exact Wei arithmetic validation without making a live RPC call, want an integrated USD cost estimate, or are running an autonomous agent that must gate on budget before committing on-chain actions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T19:13:46.599Z","isFirstParty":false}