{"uid":"cap_3_ry0sioU9ajgThm9O5Y-","slug":"scrapemole-onchain-dex-price-401e073a","name":"ScrapeMole Onchain DEX Price","description":"Pay-per-call on-chain data for agents on Base and Ethereum, read directly from chain state: Chainlink USD prices (crypto, stablecoins, FX, metals; 10 per call), ERC-20 token info, wallet balances with USD values, transaction lookup with decoded ERC-20 transfers, ENS and Basename resolution (forward and reverse), gas and fee estimates in USD, and Uniswap v3 DEX prices for long-tail tokens (verify a payment arrived). USDC via x402; failed calls are never charged.\n\nPayments: x402 v2, scheme \"exact\", USDC on Base (eip155:8453). The payment is verified before the work and settled only when the response is 200. Terms: https://onchain.scrapemole.workers.dev/terms","url":"https://onchain.scrapemole.workers.dev/v1/dex-price?utm_source=zero.xyz","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":["token"],"properties":{"chain":{"enum":["base","ethereum"],"type":"string","default":"base","description":"Chain."},"token":{"type":"string","examples":["0x940181a94A35A4569E4529A3CDfB74e38FD98631"],"description":"ERC-20 contract address."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"best":{"dex":"uniswap-v3","fee":500,"pool":"0xE5B5f522E98B5a2baAe212d4dA66b865B781DB97","quote":"USDC","depthUsd":257631,"priceInQuote":0.943},"chain":"base","pools":[],"token":"0x940181a94A35A4569E4529A3CDfB74e38FD98631","symbol":"AERO","priceUsd":0.9437,"lowLiquidity":false}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.002","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.002/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.002","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_ANZMqQtOaXi_9RHSc6DdE","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.002","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the current USD price of an ERC-20 token by querying Uniswap v3 liquidity pools on Base or Ethereum","exampleAgentPrompt":"What's the current USD price of the token at contract address 0x940181a94A35A4569E4529A3CDfB74e38FD98631 on Base — pull it from the Uniswap v3 DEX pools and tell me which pool has the best price and how deep the liquidity is.","exampleUseCases":[{"title":"Verify incoming token payment value","prompt":"A user just sent me 500 tokens at contract 0x940181a94A35A4569E4529A3CDfB74e38FD98631 on Base — can you check the current DEX price on Uniswap v3 and tell me the USD value of that payment?"},{"title":"Check long-tail token price before swap","prompt":"Before I swap, what's the best Uniswap v3 price on Ethereum for the token at 0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2, and is there enough liquidity to make it worth it?"},{"title":"Monitor DeFi portfolio token prices","prompt":"I hold tokens at 0x940181a94A35A4569E4529A3CDfB74e38FD98631 on Base — fetch the current on-chain DEX price from Uniswap v3 pools so I can calculate my portfolio value right now."}],"resultDescription":"Returns a JSON object with the token's current USD price, best Uniswap v3 pool details (DEX name, fee tier, pool address, quote token, liquidity depth in USD, price in quote), the chain queried, the token contract address, the token symbol, and a lowLiquidity flag indicating whether the pool has sufficient depth for reliable pricing.","failureModes":["Token contract address not found on the specified chain — returns error or empty pools array","Token has no Uniswap v3 pool and cannot be priced — lowLiquidity flag may be true or no best pool returned","Invalid contract address format — request rejected before charge","Chain parameter mismatch (token exists on Base but Ethereum was specified) — no pool found","Payment failure via x402 — call not executed and not charged","Network/RPC timeout reading chain state — transient error, not charged on failure"],"whenToPreferThis":"Use this endpoint when you need the real-time on-chain DEX price for any ERC-20 token on Base or Ethereum, especially long-tail or newer tokens not listed on centralized exchanges or Chainlink price feeds. It is ideal for verifying the USD value of a token payment, checking liquidity depth before a swap, or pricing any ERC-20 by contract address. Prefer this over Chainlink-based price feeds (available on the same platform) when the token lacks a Chainlink oracle. The pay-per-call model with no charge on failure makes it low-risk for spot checks.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:30:04.421Z","isFirstParty":false,"canonicalSlug":"scrapemole-onchain-dex-price-401e073a"}