{"uid":"cap_ZJo8s8YXjxSs73yIZfNEb","slug":"nightshift-labs-base-gas-price-api-283d8be1","name":"Nightshift Labs Base Gas Price API","description":"Base gas snapshot: gas price, base fee, priority fee, 10-block base-fee trend, ETH/USD (Chainlink) and estimated USD cost of an ETH transfer, ERC-20 transfer, swap and contract deploy right now.","url":"https://nightshift-x402.nightshift-labs.workers.dev/v1/base/gas?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":{"gasLimit":{"type":"string","pattern":"^[0-9]{1,9}$","description":"optional: gas units of your own transaction; adds estimatedCost.custom (ETH + USD)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"chain":"base","ethUsd":2259.98,"baseFeeGwei":0.005,"gasPriceGwei":0.006,"estimatedCost":{"ethTransfer":{"eth":1.26e-7,"gas":21000,"usd":0.000285},"erc20Transfer":{"gas":65000,"usd":0.000881}}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.003","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.003/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.003","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_JBDVMbdjVrT05Q_LGs9tL","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.003","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns current gas prices and estimated transaction costs on the Base blockchain, optionally for a custom gas limit.","exampleAgentPrompt":"What are the current gas prices on Base right now, and how much would an ETH transfer and an ERC-20 transfer each cost in USD?","exampleUseCases":[{"title":"Pre-flight gas check before on-chain transaction","prompt":"Before I send this USDC transfer on Base, can you check the current gas price and tell me how much the transaction will cost in USD?"},{"title":"Monitor Base fees for cost-aware automation","prompt":"What's the current gas price on Base and what's the estimated cost of an ERC-20 transfer right now? I want to decide if it's cheap enough to execute my trade."},{"title":"Custom gas limit cost estimation","prompt":"I have a smart contract transaction on Base that uses about 150000 gas units — can you estimate how much that would cost me in ETH and USD at current gas prices?"}],"resultDescription":"A JSON object containing the current Base blockchain chain identifier, ETH/USD price, base fee in gwei, gas price in gwei, and estimated costs (in ETH and USD) for a standard ETH transfer (21,000 gas) and ERC-20 transfer (65,000 gas). If a custom gasLimit query parameter is provided, an additional estimatedCost.custom field is returned with ETH and USD cost for that gas amount.","failureModes":["Network unavailability of Base RPC endpoint returns an error response","Invalid gasLimit format (non-numeric or too large) returns a validation error","Cloudflare Worker timeout if upstream Base node is slow","Payment failure (insufficient USDC balance for x402 micropayment) blocks the call"],"whenToPreferThis":"Use this endpoint when you need real-time gas price data specifically for the Base L2 network, including USD cost estimates for common transaction types (ETH transfer, ERC-20 transfer) or a custom gas limit. Prefer this over generic Ethereum mainnet gas APIs when operating on Base. It is pay-per-call via x402/USDC, making it suitable for autonomous AI agents that handle their own micropayments.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-18T00:42:42.465Z","isFirstParty":false,"canonicalSlug":"nightshift-labs-base-gas-price-api-283d8be1"}