{"uid":"cap_aiCgt2SdtVEgBnXAsg7Xb","slug":"api2ls-com-erc-20-token-usd-price-30a7385e","name":"api2ls.com ERC-20 Token USD Price","description":"Get the live USD price of an ERC-20 token from on-chain DEX liquidity","url":"https://api2ls.com/api/token-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":["address"],"properties":{"chain":{"type":"string","description":"EVM network: base (default), ethereum, optimism, arbitrum, or polygon"},"address":{"type":"string","description":"ERC-20 token contract address (0x…)"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["success","priceUsd"],"properties":{"asOf":{"type":"string"},"chain":{"type":"string"},"symbol":{"type":"string"},"address":{"type":"string"},"success":{"type":"boolean"},"priceUsd":{"type":"string"},"liquidityUsd":{"type":"number"}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","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.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_omX6y6M_DgjRm4cwcjdH-","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns the live USD price of any ERC-20 token by querying on-chain DEX liquidity across major EVM networks","exampleAgentPrompt":"What's the current USD price of the token at contract address 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 on Base — pull it from on-chain DEX liquidity?","exampleUseCases":[{"title":"Portfolio valuation for DeFi holdings","prompt":"I have a DeFi portfolio with several ERC-20 tokens on Arbitrum and Optimism — can you grab the live on-chain USD prices for each contract address so I can see what my holdings are worth right now?"},{"title":"Price check for unlisted token","prompt":"This small-cap token I'm watching isn't on Coinbase or Binance, but it's trading on-chain at 0x6982508145454Ce325dDbE47a25d4ec3d2311933 on Ethereum — what's its current USD price based on DEX liquidity?"},{"title":"DeFi arbitrage opportunity detection","prompt":"Can you pull the live USD prices for these two tokens on Base and Polygon and tell me if there's a meaningful price difference between the same token on each chain right now?"}],"resultDescription":"A JSON object containing success status, the USD price as a string (e.g. '1.0002'), the token symbol, the queried contract address, the chain, current liquidity in USD, and the timestamp of the price reading.","failureModes":["Token contract address not found on specified chain — returns success:false or error","Invalid or malformed contract address (non-0x, wrong length) — likely 400 or error response","Token has no DEX liquidity on the selected chain — price unavailable","Unsupported chain value — query defaults to base or returns an error","Network/RPC connectivity issues causing timeout or stale data"],"whenToPreferThis":"Use this endpoint when you need a real-time, on-chain USD price for any ERC-20 token on major EVM networks (Base, Ethereum, Optimism, Arbitrum, Polygon) and want a price derived from actual DEX liquidity rather than a centralized exchange feed. Ideal for DeFi analytics, portfolio valuation, or any agent workflow that must price arbitrary tokens including those not listed on major CEXes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T18:36:11.941Z","isFirstParty":false}