{"uid":"cap_h_ZMonlP5c-guxiSxZs1P","slug":"coingecko-onchain-dex-token-price-optimism-network-119c5426","name":"CoinGecko Onchain DEX Token Price – Optimism Network","description":"Query onchain DEX token price & market data based on the provided token contract addresses on a network.","url":"https://pro-api.coingecko.com/api/v3/x402/onchain/simple/networks/optimism/token_price/probe","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input","output"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","properties":{"include_24hr_vol":{"type":"boolean"},"mcap_fdv_fallback":{"type":"boolean"},"include_market_cap":{"type":"boolean"},"include_inactive_source":{"type":"boolean"},"include_24hr_price_change":{"type":"boolean"},"include_total_reserve_in_usd":{"type":"boolean"}}}},"additionalProperties":false},"output":{"type":"object","required":["type","example"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"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_kYTQLVYT9jKQV7LR372VB","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 DEX token price and market data for tokens on the Optimism network, queried by contract address.","exampleAgentPrompt":"Can you pull the current onchain DEX price and 24-hour volume for the OP token at contract address 0x4200000000000000000000000000000000000042 on Optimism using CoinGecko?","exampleUseCases":[{"title":"DeFi portfolio price tracking","prompt":"What's the current DEX price and market cap for the token at contract 0x7F5c764cBc14f9669B88837ca1490cCa17c31607 on Optimism? Also include the 24-hour price change."},{"title":"Arbitrage opportunity detection","prompt":"Fetch me the onchain DEX price and 24-hour trading volume for these two Optimism token contracts — 0x4200000000000000000000000000000000000042 and 0xDA10009cBd5D07dd0CeCc66161FC93D7c9000da1 — so I can compare them for an arbitrage check."},{"title":"DeFi liquidity reserve monitoring","prompt":"Check the total reserve in USD and current price on the DEX for the token at contract 0x8700dAec35aF8Ff88c16BdF0418774CB3D7599B4 on Optimism — I want to see if liquidity is healthy enough to trade."}],"resultDescription":"Returns a JSON object containing the USD price of the queried token(s) sourced from onchain DEX data on the Optimism network, with optional fields including 24-hour trading volume, market capitalization, 24-hour price change percentage, and total reserve in USD. Data reflects real-time DEX liquidity pool pricing.","failureModes":["Invalid or unrecognized contract address returns empty or null price data","Token not listed on any Optimism DEX returns no data","Network-specific endpoint only covers Optimism — requests for other chains will require different endpoints","Rate limiting or payment failure results in 402 or 429 error","Inactive token sources excluded unless include_inactive_source is set to true"],"whenToPreferThis":"Use this endpoint when you need real-time onchain DEX token prices specifically on the Optimism (OP) network and have a token contract address. Prefer this over CoinGecko's standard token price endpoints when you need DEX-sourced liquidity data (not CEX prices) or when the token is only traded onchain. Choose network-specific sibling endpoints for Base, Ethereum, or other chains.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T12:46:17.014Z","isFirstParty":false}