{"uid":"cap_9XfKgMALjSrnBrBEEn6ea","slug":"optimism-token-price-api-op-mainnet-e07a4dcd","name":"Optimism Token Price API (OP Mainnet)","description":"Spot token price in USD on OP Mainnet, read from SushiSwap and Uniswap v3 fee tiers pools at call time. Returns priceUsd, the routed pair, backing liquidityUsd, confidence and blockNumber. Requires ?symbol=TICKER (e.g. OP) or ?token=0xADDRESS. Errors: 400 missing_symbol|unknown_token, 404 no_reliable_price when pools are too thin, 502 upstream_read_failed. Depth is /liquidity; a size-aware quote is /slippage. Chain-pinned; bare /price = BSC.","url":"https://x402.donnyautomation.com/optimism/price","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","required":["symbol"],"properties":{"symbol":{"type":"string","description":"Token symbol on OP Mainnet (e.g. WETH, OP, WBTC, USDC, USDT, DAI)."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"ts":"2026-07-31T00:00:00.000Z","chainId":10,"network":"optimism"}},"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_F1PsW82sfLi9I024QQpZp","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 real-time USD spot price for any ERC-20 token on Optimism (OP Mainnet) by ticker symbol or contract address, sourced live from SushiSwap and Uniswap v3 pools.","exampleAgentPrompt":"What's the current USD price of OP on Optimism right now — and how deep is the liquidity backing that quote?","exampleUseCases":[{"title":"Trading bot price feed on Optimism","prompt":"My trading bot needs the live USD price of WETH on OP Mainnet right now — include the pool pair it's reading from and the confidence rating so I know the quote is solid."},{"title":"Arbitrage opportunity check across L2s","prompt":"What is the current USD spot price of WBTC on Optimism? I want to compare it against prices on other chains to find arbitrage spreads."},{"title":"DeFi dashboard token valuation","prompt":"Can you pull the real-time price of the OP token in USD on Optimism Mainnet for my portfolio dashboard? I need the liquidity depth too so I can flag thin-pool prices."}],"resultDescription":"Returns priceUsd (current USD spot price), the DEX trading pair used to derive the quote (e.g. WETH/USDC on Uniswap v3), the USD liquidity backing the pool, and a confidence rating indicating how reliable the price is relative to pool depth.","failureModes":["Token symbol not found or not traded on OP Mainnet DEXs — returns error or null price","Thin or zero liquidity pool — returns low confidence rating, indicating price may be unreliable","Contract address invalid or not an ERC-20 on Optimism — returns error","No active SushiSwap or Uniswap v3 pool exists for the token — price unavailable","Payment not processed (x402) — request blocked before reaching price logic"],"whenToPreferThis":"Use this endpoint when you need a real-time, on-chain USD price for any ERC-20 token on Optimism (OP Mainnet) — especially when you need confidence ratings and liquidity depth alongside the price, rather than just a raw number. Prefer this over centralized price APIs when you need decentralized, DEX-sourced quotes directly from SushiSwap and Uniswap v3 pools on Optimism. Ideal for trading bots, price oracles, and DeFi dashboards operating on the Optimism L2.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T18:42:31.883Z","isFirstParty":false}