{"uid":"cap_tosod9p9szImppFUvAY0E","slug":"nansen-ohlcv-45c08244","name":"Nansen Polymarket OHLCV Candles","description":"Get 1-hour OHLCV (Open, High, Low, Close, Volume) candles for a Polymarket\nprediction market. Candles are computed from on-chain OrderFilled events on Polygon.\n\n**What it helps to answer:**\n\n1. **What is the price history of a prediction market outcome?**\n2. **How has trading volume changed over time?**\n3. **What were the high and low prices in each time period?**","url":"https://api.nansen.ai/api/v1/prediction-market/ohlcv?utm_source=zero.xyz","method":"POST","headers":{},"bodySchema":{"type":"object","title":"OhlcvRequest","required":["market_id"],"properties":{"date":{"anyOf":[{"type":"object","title":"DateRange","properties":{"to":{"anyOf":[{"type":"string"}],"title":"To","examples":["2025-01-31T23:59:59Z"],"description":"End date in ISO 8601 format (e.g., 2025-01-31T23:59:59Z or 2025-01-31)"},"from":{"anyOf":[{"type":"string"}],"title":"From","examples":["2025-01-01T00:00:00Z"],"description":"Start date in ISO 8601 format (e.g., 2025-01-01T00:00:00Z or 2025-01-01)"}},"description":"Date range model matching the API schema."}],"examples":[{"to":"2024-12-31T23:59:59Z","from":"2024-01-01T00:00:00Z"}],"description":"Date range filter (ISO 8601 date-time)"},"sort":{"anyOf":[{"type":"array","items":{"type":"object","title":"OhlcvSortOrder","required":["field","direction"],"properties":{"field":{"enum":["period_start","volume_usd","trade_count"],"type":"string","title":"OhlcvSortField","description":"Sortable fields for OHLCV endpoint."},"direction":{"enum":["ASC","DESC"],"type":"string","title":"SortDirection","description":"Enum for sort directions."}}}}],"title":"Sort","deprecated":true,"description":"Deprecated: use 'order_by' instead."},"order_by":{"anyOf":[{"type":"array","items":{"type":"object","title":"OhlcvSortOrder","required":["field","direction"],"properties":{"field":{"enum":["period_start","volume_usd","trade_count"],"type":"string","title":"OhlcvSortField","description":"Sortable fields for OHLCV endpoint."},"direction":{"enum":["ASC","DESC"],"type":"string","title":"SortDirection","description":"Enum for sort directions."}}}}],"title":"Order By","examples":[[{"field":"period_start","direction":"DESC"}]],"description":"Sort order"},"market_id":{"type":"string","title":"Market Id","examples":["654412"],"maxLength":100,"minLength":1,"description":"Polymarket market ID"},"pagination":{"type":"object","title":"PaginationRequest","properties":{"page":{"type":"integer","title":"Page","default":1,"minimum":1,"description":"Page number (1-based)"},"per_page":{"type":"integer","title":"Per Page","default":10,"maximum":1000,"minimum":1,"description":"Number of records per page (max 1000)"}},"description":"Pagination parameters for API requests."}},"description":"Request for OHLCV endpoint.","additionalProperties":false},"responseSchema":{"type":"object","title":"OhlcvResponse","required":["data"],"properties":{"data":{"type":"array","items":{"type":"object","title":"OhlcvCandle","required":["market_id"],"properties":{"low":{"anyOf":[{"type":"number"}],"title":"Low","examples":[0.48],"description":"Low price"},"high":{"anyOf":[{"type":"number"}],"title":"High","examples":[0.55],"description":"High price"},"open":{"anyOf":[{"type":"number"}],"title":"Open","examples":[0.5],"description":"Open price"},"side":{"anyOf":[{"type":"string"}],"title":"Side","examples":["Yes"],"description":"Side label (Yes/No)"},"close":{"anyOf":[{"type":"number"}],"title":"Close","examples":[0.53],"description":"Close price"},"token_id":{"anyOf":[{"type":"string"}],"title":"Token Id","examples":["71321045679252212"],"description":"CLOB token ID"},"market_id":{"type":"string","title":"Market Id","examples":["654412"],"description":"Market ID"},"volume_usd":{"anyOf":[{"type":"number"}],"title":"Volume Usd","examples":[12500],"description":"Volume in USD"},"trade_count":{"anyOf":[{"type":"integer"}],"title":"Trade Count","examples":[150],"description":"Number of trades"},"period_start":{"anyOf":[{"type":"string","format":"date-time"}],"title":"Period Start","examples":["2024-11-01T00:00:00"],"description":"Candle period start (ISO format)"},"outcome_index":{"anyOf":[{"type":"integer"}],"title":"Outcome Index","examples":[1],"description":"Outcome index (1/2)"},"unique_traders":{"anyOf":[{"type":"integer"}],"title":"Unique Traders","examples":[25],"description":"Unique traders in period"}},"description":"OHLCV candle data from ch_api_pm_ohlcv."},"title":"Data","description":"List of OHLCV candle records"},"pagination":{"type":"object","title":"PaginationInfo","properties":{"page":{"type":"integer","title":"Page","default":1,"minimum":1,"description":"Current page number"},"per_page":{"type":"integer","title":"Per Page","default":10,"maximum":1000,"minimum":1,"description":"Number of records per page"},"is_last_page":{"type":"boolean","title":"Is Last Page","default":true,"description":"Whether this is the last page"}},"description":"Pagination information for API responses."}},"description":"Response for OHLCV endpoint."},"example":null,"exampleRequest":null,"tags":["blockchain","smart-money","wallet","tokens","defi","analytics","profiler","dex","pnl","onchain","prediction-market","data"],"displayCostAmount":"0.01","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.01/call","primary":{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"mpp","network":"tempo","amountUsd":"0.01","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_v8MBvCJYS1Q_uT6c1zlpz","protocol":"mpp","methodType":"crypto","chain":"tempo","mode":"charge","costAmount":"0.01","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":"Nansen","brandSlug":"nansen","brandBaseUrl":"https://nansen.ai","brandDocsUrl":"https://docs.nansen.ai","whatItDoes":"Returns 1-hour OHLCV (Open, High, Low, Close, Volume) price candles for a Polymarket prediction market outcome, derived from on-chain OrderFilled events on Polygon.","exampleAgentPrompt":"Pull the hourly OHLCV candles for Polymarket market ID 654412 from January 1, 2025 to January 31, 2025, sorted by period start descending, so I can chart the price and volume history.","exampleUseCases":null,"resultDescription":"A paginated list of hourly OHLCV candle records, each containing open, high, low, close prices, USD volume, trade count, unique traders, outcome side label (Yes/No), token ID, outcome index, and the ISO-format period start timestamp for that candle.","failureModes":["Missing required market_id returns a 422 validation error","Invalid date format (non-ISO 8601) causes a 422 validation error","market_id not found or with no trading history returns an empty data array","Pagination page out of range returns empty results","is_last_page flag can be used to detect end of data; missing pagination handling may cause infinite loops"],"whenToPreferThis":"Use this endpoint when you need granular hourly price history, volume trends, or candlestick chart data for a specific Polymarket prediction market outcome. Prefer this over snapshot or screener endpoints when time-series price analysis is required rather than a current-state summary.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-12T12:45:16.756Z","isFirstParty":false,"canonicalSlug":"nansen-ohlcv-45c08244"}