Trades & Candles

Executed trades and OHLCV candlestick aggregations for any market.

GET/markets/{market_id}/trades
sdkclient.markets.trades(market_id, **params)

List executed trades for a market, ordered by execution time.

Parameters
market_idstrrequired
Market UUID.
afterint | str
Trades after this time, exclusive (ms epoch or ISO 8601).
beforeint | str
Trades before this time, exclusive (ms epoch or ISO 8601).
sidestr
"BUY" or "SELL".
min_sizestr
Minimum trade size in USD.
orderstr= "asc"
Sort order.
limitint= 500
Trades per page.
takeint
SDK only. Caps total items returned across pages.
trades = client.markets.trades( "4ee145e2-3fee-5b15-bb95-56a33a292945", after="2026-04-15T01:45:00Z", before="2026-04-15T01:50:00Z", side="BUY", ) df = trades.to_dataframe() print(df[["price", "size", "side"]].head())
jsonResponse
{ "data": [{ "id": "01HQXYZ...", "market_id": "8150b888-67f6-58ed-...", "platform": "polymarket", "price": 0.6200, "size": 150.0000, "side": "BUY", "platform_timestamp": 1710400123456, "collected_at": 1710400123800, "fee_rate_bps": 100 }], "meta": { "cursor": "...", "has_more": true } }
GET/markets/{market_id}/candles
sdkclient.markets.candles(market_id, **params)

OHLCV candlestick data at configurable resolution. Buckets with zero trades are omitted.

Parameters
market_idstrrequired
Market UUID.
resolutionstr= "1m"
Candle interval.
afterint | str
Candles starting at or after this time (ms epoch or ISO 8601).
beforeint | str
Candles starting before this time (ms epoch or ISO 8601).
orderstr= "asc"
Sort order.
limitint= 500
Candles per page.
takeint
SDK only. Caps total items returned across pages.
Resolutions
1s, 5s, 10s, 30s
Sub-minute intervals.
1m, 5m, 15m
Minute intervals.
1h, 4h, 1d
Hourly and daily intervals.
candles = client.markets.candles( "4ee145e2-3fee-5b15-bb95-56a33a292945", resolution="1m", after="2026-04-15T01:45:00Z", before="2026-04-15T01:50:00Z", ) df = candles.to_dataframe() print(df[["open", "high", "low", "close"]].tail())
jsonResponse
{ "data": [{ "open_time": 1710400200000, "close_time": 1710400500000, "open": 0.6200, "high": 0.6350, "low": 0.6180, "close": 0.6300, "vwap": 0.6265, "volume": 4250.0000, "trade_count": 18 }], "meta": { "cursor": "...", "has_more": true } }