{"uid":"cap_ofAbww0GF8DfvZg4tiRsD","slug":"agent402-coin-price-by-contract-0d7f6af1","name":"Agent402 Coin Price by Contract","description":"Live price, market cap, 24h volume and 24h change for ERC-20 / SPL / other chain tokens looked up by CONTRACT ADDRESS on a named platform (ethereum, base, polygon-pos, arbitrum-one, optimistic-ethereum, binance-smart-chain, solana, avalanche, ...). Up to 25 contracts per call, any vs currency (default usd). The address-first sibling of crypto-price: use it when an agent holds a token address from a wallet, a DEX pair or a contract scan and has no coin id.","url":"https://agent402.tools/api/coin-price-by-contract","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":["platform","contracts"],"properties":{"currency":{"type":"string","description":"vs currency (default usd): fiat (usd, eur) or crypto (btc, eth)."},"platform":{"type":"string","description":"Asset platform id: ethereum, base, polygon-pos, arbitrum-one, optimistic-ethereum, binance-smart-chain, solana, avalanche, ... "},"contracts":{"type":"string","description":"Comma-separated contract addresses (max 25). Also accepts an array."}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","required":["source","fetchedAt","cached","platform","currency","count","tokens"],"properties":{"count":{"type":"integer"},"cached":{"type":"boolean"},"source":{"type":"string"},"tokens":{"type":"array","items":{"type":"object"}},"currency":{"type":"string"},"platform":{"type":"string"},"fetchedAt":{"type":"string"}}}}}}},"responseSchema":{"type":"json","example":{"count":1,"cached":false,"source":"coingecko","tokens":[{"price":0.999916,"contract":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","marketCap":73514026487.98,"volume24h":26092767405.46,"lastUpdated":"2026-08-22T13:15:40.000Z","change24hPct":0.0212}],"currency":"usd","platform":"ethereum","fetchedAt":"2026-08-22T13:20:00.000Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.005","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.005/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.005","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm__E_slkTfETihKOmRpTkrt","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.005","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns real-time token prices, market cap, 24h volume, and 24h price change for up to 25 ERC-20/SPL token contracts on a specified blockchain platform.","exampleAgentPrompt":"What's the current price, market cap, and 24h volume for USDC at contract 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 on the Ethereum platform, in USD?","exampleUseCases":[{"title":"DeFi portfolio valuation","prompt":"I need to value my DeFi positions — can you get current prices in USD for these three Ethereum contract addresses: 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48, 0x6b175474e89094c44da98b954eedeac495271d0f, and 0xdac17f958d2ee523a2206206994597c13d831ec7?"},{"title":"Token price alert monitoring","prompt":"Fetch the current price and 24h change percentage for the token at contract 0x2260fac5e5542a773aa44fbcfedf7c193bc2c599 on Ethereum — I want to know if it's moved more than 5% today."},{"title":"Cross-chain price comparison","prompt":"Get me the price in EUR for the token at contract 0x7d1afa7b718fb893db30a3abc0cfc608aacfebb0 on Polygon and the same token at 0x3BA4c387f786bFEE076A58914F5Bd38d668B42c on Ethereum so I can compare them."}],"resultDescription":"Returns a JSON object with an array of token records, each containing: contract address, price in the requested currency, market cap, 24h trading volume, 24h price change percentage, and last-updated timestamp. Also includes metadata such as the data source (CoinGecko), platform, currency, fetch time, and whether the result was served from cache.","failureModes":["Invalid or unrecognized contract address returns empty tokens array","Unsupported platform ID causes validation error","More than 25 contracts in a single request may be rejected","Invalid currency code returns error or defaults to USD","Network timeout from upstream CoinGecko data source","Payment failure (insufficient USDC balance) blocks the call"],"whenToPreferThis":"Use this endpoint when you have one or more specific token contract addresses and need real-time price, market cap, or volume data for tokens on a supported EVM or Solana-compatible chain. It is ideal for DeFi agents, portfolio trackers, and arbitrage monitors that work directly with contract addresses rather than ticker symbols. Prefer this over ticker-based price APIs when you need multi-chain contract-level precision or when the token lacks a widely-recognized symbol.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-14T00:44:44.207Z","isFirstParty":false}