Skip to main content

Price Candles

GET /v1/markets/{condition_id}/candles
Returns OHLCV candlestick data sourced from Polymarket’s CLOB /prices-history endpoint. Useful for backtesting and chart visualization.

Query Parameters

ParameterTypeDefaultDescription
intervalstring1hCandle interval
limitint100Number of candles (1–500)

Available Intervals

IntervalDescription
1m1 minute
5m5 minutes
15m15 minutes
1h1 hour
4h4 hours
1d1 day

Example

curl -H "X-API-Key: $API_KEY" \
  "https://api.polysimulator.com/v1/markets/0x1a2b3c/candles?interval=1h&limit=24"

Response

[
  {
    "timestamp": "2026-02-06T11:00:00Z",
    "open": "0.64",
    "high": "0.67",
    "low": "0.63",
    "close": "0.65",
    "volume": null
  },
  {
    "timestamp": "2026-02-06T10:00:00Z",
    "open": "0.62",
    "high": "0.65",
    "low": "0.61",
    "close": "0.64",
    "volume": null
  }
]
volume may be null for some candles — Polymarket’s CLOB does not always provide volume data for all time intervals.

Backtesting Example

from decimal import Decimal

# Fetch 7 days of hourly candles
candles = requests.get(
    f"{BASE}/v1/markets/0x1a2b3c/candles",
    headers=headers,
    params={"interval": "1h", "limit": 168},
).json()

# Simple moving average crossover
prices = [Decimal(c["close"]) for c in candles]
sma_short = sum(prices[:12]) / 12   # 12-hour SMA
sma_long = sum(prices[:48]) / 48    # 48-hour SMA

if sma_short > sma_long:
    print("Bullish crossover — consider BUY")
else:
    print("Bearish crossover — consider SELL")

Next Steps