1-hour OHLCV candles for Polymarket prediction markets, computed from on-chain Polygon data.
What it does
This endpoint returns 1-hour OHLCV (Open, High, Low, Close, Volume) candle data for Polymarket prediction markets. Candles are computed from on-chain OrderFilled events on Polygon, providing historical price and volume data for any prediction market outcome.
The endpoint accepts a POST request with a required `market_id` parameter (the Polymarket market ID) and optional date range, pagination, and sort parameters. Each candle includes the market ID, CLOB token ID, side (Yes/No), outcome index, period start timestamp, open/high/low/close prices, USD volume, trade count, and unique trader count. The endpoint is part of Nansen's broader API (v1) which covers blockchain analytics including smart money tracking, wallet profiling, token screening, and prediction market intelligence across multiple chains.
Pricing is $0.01 per call via the x402 protocol, or 10 credits on the free tier / 1 credit on the pro tier using Nansen's credit system. The API uses API key authentication (header: `apiKey`) and enforces per-second and per-minute rate limits. The endpoint returned HTTP 402 on probe, confirming it is live and accepting payment-gated requests.
Capabilities
Use cases
- —Retrieve historical price candles for a Polymarket prediction market outcome
- —Analyze trading volume trends over time for prediction markets
- —Build charting UIs for prediction market outcomes
- —Backtest prediction market trading strategies using OHLCV data
- —Monitor price movements and trader activity in specific Polymarket markets
Fit
Best for
- —Agents or apps needing structured OHLCV data for Polymarket markets
- —Quantitative analysis of prediction market pricing
- —Building dashboards that display prediction market price history
Not for
- —Real-time sub-second prediction market data (candles are 1-hour resolution)
- —Non-Polymarket prediction platforms (this endpoint is Polymarket-specific)
- —Free bulk data export (each call costs credits or $0.01 via x402)
Quick start
curl -X POST https://api.nansen.ai/api/v1/prediction-market/ohlcv \
-H 'Content-Type: application/json' \
-H 'apiKey: YOUR_API_KEY' \
-d '{"market_id": "654412", "pagination": {"page": 1, "per_page": 10}}'Example
Request
{
"date": {
"to": "2024-11-30T23:59:59Z",
"from": "2024-11-01T00:00:00Z"
},
"order_by": [
{
"field": "period_start",
"direction": "DESC"
}
],
"market_id": "654412",
"pagination": {
"page": 1,
"per_page": 10
}
}Response
{
"data": [
{
"low": 0.48,
"high": 0.55,
"open": 0.5,
"side": "Yes",
"close": 0.53,
"token_id": "71321045679252212",
"market_id": "654412",
"volume_usd": 12500,
"trade_count": 150,
"period_start": "2024-11-01T12:00:00",
"outcome_index": 1,
"unique_traders": 25
}
],
"pagination": {
"page": 1,
"per_page": 10,
"is_last_page": false
}
}Endpoint
Quality
Full OpenAPI 3.1 schema with detailed request/response models, clear endpoint description, x402 payment info ($0.01/call), and confirmed live 402 response. Minor deductions: no crawled docs beyond the OpenAPI spec, and the specific OhlcvRequest/OhlcvResponse component schemas reference $ref types that are fully resolved in the spec.
Warnings
- —No external documentation pages were reachable beyond the OpenAPI spec (docs/pricing/README all returned 404).
- —The probe confirmed a 402 response but no WWW-Authenticate header was parsed, so the exact x402 challenge format is not captured.
Citations
- —Endpoint returns 1-hour OHLCV candles computed from on-chain OrderFilled events on Polygonhttps://api.nansen.ai
- —Pricing is $0.01 per call via x402 protocol, 10 credits free tier / 1 credit pro tierhttps://api.nansen.ai
- —OpenAPI spec version 3.1.0 with full schema definitions for OhlcvRequest and OhlcvResponsehttps://api.nansen.ai