{"uid":"cap_vnAvQi-MroOZWb5xygNnq","slug":"onchain-query-api-spot-price-lookup-25fb034a","name":"Onchain Query API – Spot Price Lookup","description":"Pay-per-call EVM chain data for agents: wallet snapshots, ERC-20 token profiles, spot prices, gas markets, transaction decode, and ENS resolution across major EVM chains (base, ethereum, arbitrum, optimism, polygon). Deterministic JSON, no RPC keys or node infra needed.","url":"https://chain.cyberwarex.com/prices?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","HEAD","DELETE"],"type":"string"},"queryParams":{"type":"object","required":["symbols"],"properties":{"symbols":{"type":"string","description":"Comma-separated tickers / CoinGecko ids / 0x addresses (max 20)."}},"additionalProperties":false}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"count":{"type":"integer"},"prices":{"type":"array","items":{"type":"object","properties":{"error":{"type":"string"},"query":{"type":"string"},"source":{"type":"string"},"price_usd":{"type":["number","null"]},"coingecko_id":{"type":"string"},"change_24h_pct":{"type":["number","null"]},"market_cap_usd":{"type":["number","null"]}}}},"resolved":{"type":"integer","description":"How many symbols got a price."}}}}}}},"responseSchema":{"type":"json","example":{"count":2,"prices":[{"query":"eth","source":"coingecko","price_usd":2456.1,"coingecko_id":"ethereum","change_24h_pct":-1.2,"market_cap_usd":296000000000},{"query":"btc","source":"coingecko","price_usd":61230.5,"coingecko_id":"bitcoin","change_24h_pct":0.4,"market_cap_usd":1210000000000}],"resolved":2}},"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_wUXLpeREwiYrwn2lfPVRG","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 current USD spot prices, 24h change, and market cap for one or more crypto assets identified by ticker, CoinGecko ID, or contract address.","exampleAgentPrompt":"What are the current USD prices, 24h change, and market caps for ETH, BTC, and UNI right now?","exampleUseCases":[{"title":"Portfolio value snapshot","prompt":"I hold ETH, SOL, and MATIC — can you look up their current USD prices and 24-hour changes so I can see how my portfolio is doing?"},{"title":"Token due diligence check","prompt":"What's the current USD price and market cap of the token at 0x1f9840a85d5aF5bf1D1762F925BDADdC4201F984 on Ethereum?"},{"title":"DeFi arbitrage signal monitor","prompt":"Fetch me the current spot prices for WBTC, renBTC, and BTC so I can compare them and spot any pricing discrepancies."}],"resultDescription":"A JSON object containing a count of queried symbols, the number successfully resolved, and an array of price records — each with the original query string, source (e.g. coingecko), price_usd, change_24h_pct, market_cap_usd, and coingecko_id. Unresolvable symbols include an error field instead of price data.","failureModes":["Symbol not found or unresolvable — returns an error field on that item rather than price data","More than 20 symbols requested at once — likely returns an error or partial result","Invalid ticker or malformed contract address — may return null price or error","CoinGecko upstream outage — price_usd may be null","Payment not completed (x402) — 402 Payment Required response before data is returned"],"whenToPreferThis":"Choose this endpoint when you need a fast, keyless, pay-per-call USD spot price for one or more crypto assets without managing RPC nodes or API keys. It accepts tickers, CoinGecko IDs, and 0x contract addresses interchangeably and returns market cap and 24h change alongside the price — making it ideal for portfolio snapshots, DeFi agent decision loops, and token enrichment flows. Prefer alternatives if you need historical OHLCV data, order book depth, or non-EVM chain prices.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-01T00:41:51.356Z","isFirstParty":false,"canonicalSlug":"onchain-query-api-spot-price-lookup-729cc975"}