{"uid":"cap_q4KbJPTrLFS03NjZhbrlc","slug":"httpay-gas-compare-api-5c821c43","name":"HTTPay Gas Compare API","description":"Compare real-time gas costs across 10 chains in USD","url":"https://httpay.xyz/api/gas-compare","method":"POST","headers":{},"bodySchema":null,"responseSchema":{"type":"json","example":{"chains":[{"ok":true,"name":"Base","swapUSD":"$0.003200","gasPriceGwei":"0.0050","ethTransferUSD":"$0.000336"},{"ok":true,"name":"Ethereum","swapUSD":"$9.600000","gasPriceGwei":"15.0000","ethTransferUSD":"$1.008000"}],"ethPriceUSD":3200,"cheapestForSwap":"Base","cheapestForTransfer":"Base"}},"example":{"request":{"chains":["base","ethereum"],"operations":["swap","transfer"]},"response":{"meta":{"x402":true,"poweredBy":"Alfred Zhang 🫡"},"chains":[{"ok":false,"name":"Ethereum","error":"Unexpected token '<', \"<!DOCTYPE \"... is not valid JSON"},{"ok":true,"name":"Base","swapUSD":"$0.002012","gasPriceGwei":"0.0060","ethTransferUSD":"$0.000211"},{"ok":true,"name":"Optimism","swapUSD":"$0.000335","gasPriceGwei":"0.0010","ethTransferUSD":"$0.000035"},{"ok":true,"name":"Arbitrum One","swapUSD":"$0.006706","gasPriceGwei":"0.0200","ethTransferUSD":"$0.000704"},{"ok":true,"name":"zkSync Era","swapUSD":"$0.015173","gasPriceGwei":"0.0452","ethTransferUSD":"$0.001593"},{"ok":true,"name":"Linea","swapUSD":"$0.014051","gasPriceGwei":"0.0419","ethTransferUSD":"$0.001475"},{"ok":true,"name":"Polygon zkEVM","swapUSD":"$0.003353","gasPriceGwei":"0.0100","ethTransferUSD":"$0.000352"},{"ok":true,"name":"Scroll","swapUSD":"$0.000040","gasPriceGwei":"0.0001","ethTransferUSD":"$0.000004"},{"ok":true,"name":"Mantle","swapUSD":"$16.765234","gasPriceGwei":"50.0001","ethTransferUSD":"$1.760350"},{"ok":true,"name":"Blast","swapUSD":"$0.000335","gasPriceGwei":"0.0010","ethTransferUSD":"$0.000035"}],"summary":"Cheapest: Scroll ($0.000004/transfer). Most expensive: Mantle ($1.760350/transfer).","updatedAt":"2026-06-12T04:46:47.851Z","ethPriceUSD":1676.52,"cheapestForSwap":"Scroll","cheapestForTransfer":"Scroll"}},"exampleRequest":{"chains":["base","ethereum"],"operations":["swap","transfer"]},"tags":["x402"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_lAMSIGNPau98SKpL27PkS","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Compares current gas prices and transaction costs across EVM chains (Base vs Ethereum) for swaps and ETH transfers","exampleAgentPrompt":"Hey, can you check whether it's cheaper to do a token swap on Base or Ethereum right now, and tell me the actual gas costs in USD for both a swap and a simple ETH transfer on each chain?","exampleUseCases":null,"resultDescription":"Returns a list of chains (Base and Ethereum) with current gas price in Gwei, estimated swap cost in USD, ETH transfer cost in USD, current ETH price in USD, and which chain is cheapest for swaps and transfers.","failureModes":["Gas oracle unavailable for one or more chains — chain entry may show ok:false","Stale gas data if upstream RPC is lagging","Network timeout if Base or Ethereum RPC is unresponsive","Payment failure if x402 USDC payment on Base is not completed"],"whenToPreferThis":"Use this endpoint when an agent needs to decide which EVM chain to route a transaction through to minimize gas costs, or when a user wants a quick real-time cost comparison between Base and Ethereum. Ideal for DeFi automation, cost-optimization workflows, and cross-chain routing decisions.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:57:19.221Z","isFirstParty":false}