{"uid":"cap_DN7mUUgnHWdhGRNuSo7kp","slug":"agent402-token-price-history-b6cb19e6","name":"Agent402 Token Price History","description":"Historical USD price series for a token, by ticker symbol (ETH, BTC, SOL, ...) or by ERC-20 contract + network, at 5-minute (up to 2 days), hourly (up to 30 days) or daily (up to 365 days) resolution. Returns the points plus first/last/high/low and the percent change over the window - the data behind 'how did this token move over the last N days' without a separate market-data subscription. 404 (not charged) when the token is not in the price feed.","url":"https://agent402.tools/api/token-price-history","method":"POST","headers":{},"bodySchema":{"type":"object","properties":{"days":{"type":"number","description":"Shortcut: window length in days ending now (default 1 for 5m, 7 for 1h, 30 for 1d)."},"symbol":{"type":"string","description":"Ticker symbol (e.g. ETH, BTC). Use this OR contract+network."},"endTime":{"type":"string","description":"ISO-8601 or unix seconds (default now)."},"network":{"type":"string","description":"ethereum / base / polygon / arbitrum / optimism (default ethereum)."},"contract":{"type":"string","description":"0x-prefixed 40-char ERC-20 contract address (with `network`)."},"interval":{"type":"string","description":"5m, 1h, or 1d (default 1d)."},"startTime":{"type":"string","description":"ISO-8601 or unix seconds. Overrides `days`."}}},"responseSchema":{"type":"json","example":{"low":0.99951,"high":0.99982,"last":0.99971,"count":7,"first":0.99966,"points":[{"t":"2026-08-16T00:00:00Z","price":0.99966}],"source":"alchemy","symbol":null,"endTime":"2026-08-22T12:00:00.000Z","network":"ethereum","contract":"0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48","currency":"usd","interval":"1d","changePct":0.005,"fetchedAt":"2026-08-22T12:00:00.000Z","startTime":"2026-08-15T12:00:00.000Z"}},"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.004","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.004/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.004","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_8VWuECd00c4Bc-N0UqTKz","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.004","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Returns historical OHLC-style price data for a cryptocurrency token (by ticker symbol or ERC-20 contract address) over a configurable time window and interval.","exampleAgentPrompt":"Pull the daily price history for ETH on Ethereum over the last 30 days and tell me the highest and lowest prices and the overall percentage change.","exampleUseCases":[{"title":"DeFi token peg monitoring","prompt":"Get the daily price history for USDC on Ethereum over the last 7 days using contract 0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48 and tell me if it ever deviated more than 0.1% from $1."},{"title":"Portfolio performance snapshot","prompt":"Show me the hourly price candles for ETH on Ethereum for the past 7 days — I want to see the high, low, and percentage change over that window."},{"title":"Altcoin launch price analysis","prompt":"Fetch 5-minute price intervals for the token at contract 0xYourTokenAddress on Base starting from 2025-01-10T00:00:00Z through 2025-01-11T00:00:00Z so I can see how it traded in the first 24 hours."}],"resultDescription":"A JSON object containing an array of timestamped price points (each with a Unix-aligned ISO timestamp and USD price), plus aggregate stats: first price, last price, high, low, change percentage, candle count, interval used, start/end times, network, contract address, ticker symbol, currency, data source (Alchemy), and fetch timestamp.","failureModes":["Invalid or unrecognized ticker symbol returns an error or empty result","Contract address not found on the specified network","Mismatched contract+network combination yields no data","startTime after endTime returns a validation error","Unsupported interval value (not 5m, 1h, or 1d) causes a bad request","Token has insufficient on-chain liquidity history for requested range","Payment failure (insufficient USDC balance) blocks the call entirely"],"whenToPreferThis":"Choose this endpoint when you need structured historical token price data (OHLC-style candles) for a specific ERC-20 token or major crypto asset across Ethereum, Base, Polygon, Arbitrum, or Optimism — especially when you want flexible time windows and intervals without needing an API key. Prefer this over generic market data APIs when operating in an agent wallet context (x402/MPP pay-per-call) or when querying tokens by contract address rather than CEX ticker.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-09-15T06:43:54.627Z","isFirstParty":false}