{"uid":"cap_mjaRnVuPIewEFaQ010ttY","slug":"defi-shield-hazel-vercel-app-9345084b","name":"DeFi Shield Gas Oracle","description":"","url":"https://defi-shield-hazel.vercel.app/api/mev/gas-oracle","method":"POST","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","bodyType","body","method"],"properties":{"body":{"properties":{}},"type":{"type":"string","const":"http"},"method":{"enum":["POST"],"type":"string"},"bodyType":{"enum":["json","form-data","text"],"type":"string"}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":null,"example":{"request":{"chainId":1,"tokenIn":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","amountIn":"1000000000","tokenOut":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2","slippageTolerance":0.5},"response":{"network":"base","data_age":"2026-06-12T03:59:05.993Z","gas_gwei":{"fast":0.0054,"slow":0.0054,"standard":0.0054},"cache_ttl":300,"eth_price_usd":1670.52,"recommendation":"Base L2 gas is extremely cheap. Execute freely — costs are sub-cent.","estimated_costs":{"swap_usd":{"fast":0.001353,"slow":0.001353,"standard":0.001353,"gas_units":150000},"approve_usd":{"fast":0.000415,"slow":0.000415,"standard":0.000415,"gas_units":46000},"transfer_usd":{"fast":0.000189,"slow":0.000189,"standard":0.000189,"gas_units":21000}},"eth_price_source":"DEX Screener (kyo-finance)","response_time_ms":104}},"exampleRequest":{"chainId":1,"tokenIn":"0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48","amountIn":"1000000000","tokenOut":"0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2","slippageTolerance":0.5},"tags":["x402"],"displayCostAmount":"0.05","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.05/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.05","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_nJIdzJas9CmGSG_TXtZ2R","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.05","costPer":"request","priority":0,"asset":null,"unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns current gas prices with swap cost estimates and timing recommendations for DeFi transactions","exampleAgentPrompt":"What are the current gas prices and how much would a typical token swap cost right now — and should I wait for cheaper gas or execute now?","exampleUseCases":null,"resultDescription":"Returns current gas price levels (base fee, priority fee, gwei estimates), estimated cost for a swap transaction in USD/ETH, and a timing recommendation indicating whether current conditions are favorable, expensive, or neutral for transacting.","failureModes":["Gas oracle data unavailable due to RPC node issues — returns 503","Invalid request body parameters — returns 400 with validation error","Payment not processed — returns 402 requiring x402 payment of $0.05 USDC","Upstream gas price feed timeout — returns 504","Rate limit exceeded — returns 429"],"whenToPreferThis":"Use this endpoint when an agent needs to decide whether to execute a DeFi swap or transaction based on current network congestion and cost. Ideal for transaction routing agents, DeFi bots, or portfolio managers that need to time transactions. Prefer over generic gas APIs when you also need swap-specific cost estimates and actionable timing recommendations bundled together.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T12:54:38.704Z","isFirstParty":false}