{"uid":"cap_cV29E83hDTJqnf-zz6ibf","slug":"token-price-history-ohlcv-api-379cbd86","name":"Token Price History (OHLCV) API","description":"Invoice-to-JSON, on-chain tools (transaction explainer + payment check, wallet profile, contract ABI, ERC-20 token risk), company contacts and web-to-RAG for AI agents. Pay per call with x402 (USDC on Base). No signup, no API key.","url":"https://freetier-agent-api.pages.dev/api/token-price-history?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"],"type":"string"},"queryParams":{"type":"object","required":["address"],"properties":{"limit":{"type":"string","description":"number of candles, default 30 (day) / 48 (hour)"},"address":{"type":"string","description":"token contract address"},"network":{"enum":["base","ethereum","solana","arbitrum","bsc","polygon","optimism","avalanche"],"type":"string","description":"default base"},"interval":{"enum":["day","hour"],"type":"string","description":"default day"}}}}},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object"}}}}},"responseSchema":{"type":"json","example":{"low":0.00088,"high":0.0011,"count":30,"candles":[{"low":0.0009,"high":0.00097,"open":0.00094,"time":"2026-10-28T00:00:00.000Z","close":0.00092,"volumeUsd":380000}],"interval":"day","changePct":-12.4}},"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_G6a5EIfVwyrIeLkaG-YhO","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 OHLCV candle data (daily or hourly) for a token from its most liquid DEX pool, including period high/low and percent change.","exampleAgentPrompt":"Can you pull the last 30 daily OHLCV candles for the token at contract address 0xabc123... on Ethereum, including the period high, low, and percent change?","exampleUseCases":[{"title":"Track DeFi token price trend","prompt":"Get me the last 60 daily candles for the token at 0x4200000000000000000000000000000000000006 on Base — I want to see the open, close, high, low, volume, and how much it's moved over the period."},{"title":"Hourly price check for Solana token","prompt":"Fetch 48 hourly candles for the Solana token at address So11111111111111111111111111111111111111112 — I need the OHLCV data and the period high and low."},{"title":"Crypto portfolio price history audit","prompt":"What's the 7-day daily price history for the token at contract 0x912CE59144191C1204E64559FE8253a0e49E6548 on Arbitrum? Show me the candles, the overall high and low, and the percent change over the period."}],"resultDescription":"A JSON object containing an array of OHLCV candles (each with open, high, low, close, volumeUsd, and timestamp), the overall period high and low prices, the total candle count, the interval used, and a period change percentage. Data is sourced from the token's most liquid DEX pool via GeckoTerminal.","failureModes":["Token contract address not found on the specified network — returns an error or empty candles array","Unsupported network enum value — returns a validation error","Limit exceeds maximum (180 for daily, 168 for hourly) — may be clamped or return an error","Token has no liquid DEX pool on the selected chain — returns empty or null data","Upstream GeckoTerminal API unavailable — returns a 5xx or timeout error"],"whenToPreferThis":"Choose this endpoint when you need structured OHLCV candlestick price history for a specific token on a supported chain (Base, Ethereum, Solana, Arbitrum, BSC, Polygon, Optimism, Avalanche) sourced from DEX pool data. It is ideal for agents that need price trend analysis, volatility checks, or volume data without requiring a centralized exchange API key. Prefer it over order-book or CEX APIs when the token is primarily traded on DEXes.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-11-01T06:57:39.324Z","isFirstParty":false,"canonicalSlug":"token-price-history-ohlcv-api-379cbd86"}