{"uid":"cap_FNaw2k_-vqR1UibMZzlRU","slug":"phantom-api-polygon-gas-estimate-b86665f3","name":"Phantom API — Polygon Gas Estimate","description":"Lightning-fast access to blockchain data, smart contract insights, and Web3 infrastructure across 57+ networks. Pay-per-call via x402.","url":"https://phantom-api-omega.vercel.app/api/polygon/gas/estimate","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"to":{"type":"string"},"data":{"type":"string"},"from":{"type":"string"},"value":{"type":"string"}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.01","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.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_fbyY1QNtj6VXbiCRXC2Wj","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Estimates gas cost for a transaction on the Polygon network given recipient, data, sender, and value fields","exampleAgentPrompt":"Estimate the gas needed to call this Polygon smart contract — the recipient is 0xAbC...123, the sender is 0xDeF...456, no ETH value being sent, and the calldata is 0xa9059cbb000000...","exampleUseCases":[{"title":"Pre-flight gas check for token transfer","prompt":"Before I send 500 USDC on Polygon from my wallet 0xDeF...456 to 0xAbC...123, can you estimate how much gas that transfer will require so I know if I have enough MATIC?"},{"title":"Smart contract interaction cost estimate","prompt":"I want to call the swap function on a Polygon DEX contract at 0x1234...abcd with this calldata 0x38ed1739... — estimate the gas cost for me before I submit it."},{"title":"Gas budget planning for batch operations","prompt":"I'm planning to run 50 NFT mint transactions on Polygon from address 0xAAA...BBB to contract 0xCCC...DDD with this mint calldata — estimate the gas for a single mint so I can calculate my total budget."}],"resultDescription":"Returns a gas estimate (typically as a hex or integer gas limit) representing the approximate units of gas required to execute the specified transaction on the Polygon network, allowing the caller to set an appropriate gas limit and estimate total fee cost in MATIC.","failureModes":["Invalid or malformed address in 'to' or 'from' fields returns an error","Transaction would revert on-chain causes estimation failure with revert reason","Missing required 'to' field when calling a contract may return an error","Network congestion or RPC node unavailability causes timeout","Insufficient balance simulation causing revert mid-estimation","Malformed calldata in 'data' field causes decode error"],"whenToPreferThis":"Use this endpoint when you need a gas estimate specifically on the Polygon (MATIC) network before submitting a transaction. Prefer this over Ethereum mainnet gas estimators when your contract or token transfer targets Polygon. It is a read-only simulation that costs $0.01 USDC per call via x402, making it suitable for pre-flight checks in automated workflows, DeFi bots, or wallet UIs that need accurate gas limits without risking on-chain reverts.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T13:08:35.863Z","isFirstParty":false}