{"uid":"cap_sUWsg0oiiqcdsUEtzr1hd","slug":"ethereum-solana-gas-price-api-021d66c0","name":"Ethereum & Solana Gas Price API","description":"Current Ethereum gas price, base and priority fee, plus Solana priority fees and the cost of a simple transfer. Use before sending an on-chain transaction.","url":"https://api.agent-data.workers.dev/api/v1/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":{}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"ts":1767225600,"solana":{"base_fee_lamports":5000,"transfer_cost_sol":0.0000052,"median_priority_fee_micro_lamports":1000},"ethereum":{"base_fee_gwei":0.4,"gas_price_gwei":0.42,"priority_fee_gwei":0.02,"transfer_cost_eth":0.0000088}}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lIR_Zgo8Ssd7OIcw6czxv","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns current Ethereum gas price (base fee, priority fee, gas price in gwei) and Solana priority fees and transfer costs, to inform on-chain transaction cost estimates.","exampleAgentPrompt":"Before I submit this Ethereum transaction, can you check the current gas price and tell me what the base fee, priority fee, and estimated transfer cost are right now? Also grab the current Solana priority fee and transfer cost while you're at it.","exampleUseCases":[{"title":"Pre-transaction gas check on Ethereum","prompt":"What's the current Ethereum gas price in gwei — base fee, priority fee, and total — so I can decide if now is a good time to send my transaction?"},{"title":"Solana transfer cost estimation","prompt":"How much SOL will a simple transfer cost me right now, and what's the current median priority fee in micro-lamports on Solana?"},{"title":"Cross-chain fee comparison before DeFi action","prompt":"Can you pull the current gas fees for both Ethereum and Solana so I can compare costs before I decide which chain to use for my swap?"}],"resultDescription":"A JSON object with a Unix timestamp and two sub-objects: 'ethereum' containing base_fee_gwei, gas_price_gwei, priority_fee_gwei, and transfer_cost_eth; and 'solana' containing base_fee_lamports, median_priority_fee_micro_lamports, and transfer_cost_sol.","failureModes":["Upstream RPC node unavailability may return stale or error responses","Network congestion spikes may cause brief data lag","Rate limiting or payment failure (402) if USDC micropayment is not provided","Returned values may be slightly stale during high network volatility"],"whenToPreferThis":"Use this endpoint when an AI agent needs real-time gas cost data for Ethereum or Solana immediately before submitting an on-chain transaction, or when comparing cross-chain transaction costs. Prefer this over manual RPC calls when you need a simple, pre-processed JSON response covering both chains in a single call with no input parameters required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-14T18:35:36.642Z","isFirstParty":false,"canonicalSlug":"ethereum-solana-gas-price-api-021d66c0"}