{"uid":"cap_16LqnF1dmcJlf0I_XBGZp","slug":"prices-x402utils-token-price-api-5dc23c67","name":"prices.x402utils Token Price API","description":"Live and historical token prices for agents, any chain: coingecko ids or chain:contract addresses, plus % change over a period. Paid per call via x402 (USDC on Base).","url":"https://prices.x402utils.workers.dev/v1/price-at?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":["coins","timestamp"],"properties":{"coins":{"type":"string","description":"comma-separated coin ids"},"timestamp":{"type":"string","description":"unix seconds"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"prices":{"coingecko:ethereum":{"price":3300.1}},"timestamp":1767225600}},"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_-yUUuZLleQTz2FaJcCBE9","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 live or historical token prices (by CoinGecko ID or chain:contract address) with percentage change over a period, paid per call via x402 (USDC on Base).","exampleAgentPrompt":"What was the price of Ethereum and Bitcoin at unix timestamp 1767225600? Give me their prices in USD using their CoinGecko IDs.","exampleUseCases":[{"title":"DeFi portfolio valuation at snapshot","prompt":"I need the USD prices of ethereum, solana, and uniswap as of unix timestamp 1750000000 so I can calculate what my portfolio was worth at that moment."},{"title":"Historical trade P&L calculation","prompt":"What was the price of the token at contract address ethereum:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 on unix timestamp 1740000000? I want to figure out my profit on a trade I made back then."},{"title":"Multi-chain token price monitoring","prompt":"Fetch me the current prices for coingecko:bitcoin, coingecko:ethereum, and coingecko:chainlink right now — I want to track them for my crypto dashboard."}],"resultDescription":"A JSON object containing a prices map keyed by coin identifier (e.g. 'coingecko:ethereum') with each coin's USD price, plus the unix timestamp of the price data. May also include percentage change over a specified period.","failureModes":["Invalid or unrecognized CoinGecko ID returns an error or missing key in prices map","Malformed chain:contract address format results in lookup failure","Timestamp out of supported historical range may return empty or error","Missing required query params (coins or timestamp) returns a 400 error","Payment failure via x402 (insufficient USDC balance) blocks the request"],"whenToPreferThis":"Choose this endpoint when you need on-demand token price lookups across any chain using either CoinGecko IDs or raw contract addresses, especially in agentic workflows that require paying per call programmatically via x402/USDC on Base. Prefer it over free tier APIs when you need reliable historical price data or multi-chain contract address resolution without API key setup friction.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T00:36:35.819Z","isFirstParty":false,"canonicalSlug":"prices-x402utils-token-price-api-5dc23c67"}