{"uid":"cap_4X2Bn0z4bOg0zUzTRgr6F","slug":"coingecko-onchain-token-price-optimism-network-5f77db73","name":"CoinGecko Onchain 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/:address","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_bNPT-gmTb3EuP0LO6rGJ2","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 DEX-sourced token price and market data for a given contract address on the Optimism network","exampleAgentPrompt":"What's the current onchain price, 24-hour volume, and market cap for the Optimism token at contract address 0x4200000000000000000000000000000000000042? Pull it from CoinGecko's DEX data.","exampleUseCases":[{"title":"DeFi portfolio price check","prompt":"Can you look up the current DEX price and 24-hour price change for this Optimism token at 0x7F5c764cBc14f9669B88837ca1490cCa17c31607? I want to know if it's moved significantly today."},{"title":"Onchain liquidity monitoring","prompt":"What's the total reserve in USD and 24-hour trading volume for the Optimism token contract 0x4200000000000000000000000000000000000006? I'm trying to assess liquidity before making a trade."},{"title":"Token market cap lookup for research","prompt":"I'm researching an Optimism-based token — can you fetch its current market cap and fully diluted valuation using the contract address 0x68f180fcCe6836688e9084f035309E29Bf0A2095 from CoinGecko's onchain data?"}],"resultDescription":"Returns a JSON object containing the token's current USD price sourced from onchain DEX activity, along with optional fields such as 24-hour trading volume, market capitalization, 24-hour price change percentage, total reserve in USD, and whether inactive sources were included — all keyed by the queried contract address.","failureModes":["Contract address not found on Optimism — returns empty data or 404","Invalid contract address format — returns 400 Bad Request","Token has no recent DEX activity — returns stale or null price","API key missing or invalid — returns 401 Unauthorized","Rate limit exceeded — returns 429 Too Many Requests","Network identifier mismatch (address exists on different chain) — returns no data"],"whenToPreferThis":"Choose this endpoint when you need real-time, onchain DEX-sourced price data specifically for a token on the Optimism network identified by its contract address. It is preferred over CoinGecko's standard token price endpoints when the token may not have a CoinGecko coin ID (only a contract address), or when you specifically need DEX-derived pricing rather than aggregated CEX data. Use it over generic market data APIs when Optimism-specific onchain context (reserve, DEX volume) is required.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-13T18:37:01.740Z","isFirstParty":false}