{"uid":"cap_xxO3xuNrBNJOX1a5GV8Sd","slug":"base-onchain-twap-quote-swap-price-oracle-85b75c57","name":"Base Onchain TWAP Quote & Swap Price Oracle","description":"Self-computed Base onchain toolkit for AI agents: ERC-20 safety scan, manipulation-resistant TWAP price oracle, gas/fee oracle, calldata decoder, token/address/contract intel, wallet approval-risk audit, and batch token triage — all computed live from raw Base chain, no third-party data.","url":"https://x402-data-api.bodhinindustries.workers.dev/quote","method":"GET","headers":{},"bodySchema":{"type":"object","required":["tokenIn","amountIn","tokenOut"],"properties":{"tokenIn":{"type":"string","description":"Token being sold (Base ERC-20 address)."},"amountIn":{"type":"string","description":"Human amount of tokenIn to swap (e.g. 1.5)."},"tokenOut":{"type":"string","description":"Token being bought (Base ERC-20 address)."}}},"responseSchema":{"type":"object","properties":{"block":{"type":"integer","description":"Base block height"},"route":{"type":"string","description":"human-readable route"},"feeTier":{"type":"integer","description":"best Uniswap v3 fee tier used"},"tokenIn":{"type":"string","description":"token sold"},"amountIn":{"type":"string","description":"input amount (human)"},"tokenOut":{"type":"string","description":"token bought"},"amountOut":{"type":"string","description":"output amount (human, decimal string)"},"computedAt":{"type":"string","description":"ISO-8601 timestamp"},"tokenInSymbol":{"type":"string","description":"symbol"},"executionPrice":{"type":"string","description":"tokenOut per tokenIn at this trade size"},"priceImpactBps":{"type":"integer","description":"price impact vs a ~1/1000-size reference, in bps"},"tokenOutSymbol":{"type":"string","description":"symbol"},"priceImpactWarning":{"type":"boolean","description":"true if impact >= 300 bps (3%)"},"thirdPartyDataUsed":{"type":"boolean","description":"always false"}}},"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_SrYfmsKR3QFjW3_T3ZubB","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":"Returns a manipulation-resistant TWAP-based swap quote between two Base ERC-20 tokens, computed live from raw Base chain data with no third-party dependencies.","exampleAgentPrompt":"How much USDC would I get if I swap 500 WETH (0x4200000000000000000000000000000000000006) for USDC (0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913) on Base right now — and is the price impact more than 3%?","exampleUseCases":null,"resultDescription":"Returns the expected output token amount (amountOut), execution price (tokenOut per tokenIn), price impact in basis points, whether the price impact warning threshold (>=300 bps) is triggered, the best Uniswap v3 fee tier, human-readable route, current Base block height, and computation timestamp — all derived live from on-chain state with no third-party data.","failureModes":["Invalid or non-ERC-20 token address returns an error or empty route","Token pair with no Uniswap v3 liquidity pool returns no route","amountIn of zero or non-numeric string causes a parsing error","Extreme price impact on illiquid pairs may produce unreliable quotes","Network latency on Base RPC may occasionally delay block-level freshness"],"whenToPreferThis":"Use this endpoint when you need a trustless, manipulation-resistant swap quote on Base that is computed entirely from raw on-chain data (no third-party price feeds). It is ideal for agents that need to verify price impact before submitting a trade, confirm the best Uniswap v3 fee tier, or audit a quote without relying on CoinGecko, CoinMarketCap, or any external oracle. Prefer it over off-chain price APIs when on-chain accuracy and TWAP resistance to flash-loan manipulation are required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:45:00.344Z","isFirstParty":false}