Skip to main content
Polymarket’s Crypto Up/Down markets resolve over fixed-length windows: the window’s open price is locked when it starts, the close price is locked when it ends, and the market resolves UP if close > open or DOWN otherwise. Struct exposes the resolution data behind these markets through three sources, all keyed off (symbol, variant, start_time): Each resolution window carries only two prices: the open locked at start_time and the close locked at end_time. When you want a full price chart of the underlying asset to render behind the live indicator, use the asset candlestick endpoint for OHLC bars at standard resolutions.

When to use this

  • Up/Down market dashboards: a row per (asset, variant) showing the current window’s open price, the live spot price, and whether spot is currently above or below open.
  • Resolution monitors: react when a window closes and a market resolves.
  • Past-outcome leaderboards: “BTC 1h windows over the last 24h, which closed UP vs DOWN”.

How a window resolves

Every Up/Down market is keyed by (symbol, variant, start_time):
  • start_time and end_time are Unix milliseconds, end_time - start_time matches the variant length.
  • At start_time, an update_type: "open" event fires with open_price locked in.
  • While the window is live, asset_price_tick events for the same symbol give you spot.
  • At end_time, an update_type: "close" event fires with close_price locked in. The market is now resolved: UP if close_price > open_price, DOWN otherwise.
Supported variant values across the price-history endpoint and the window-updates room: 5m, 15m, 1h, 4h, 1d, 24h.

Step 1: backfill past windows

client.assets.getAssetHistory returns past resolution windows for a (symbol, variant) pair. Each row carries the locked open_price and close_price for that window, which is what determines the UP / DOWN outcome.

Step 2: subscribe to the live spot price

The asset-prices room pushes sub-second ticks (rate: 0.005 credits per message). Use them to show where the asset is right now relative to the current window’s locked open_price.
Each tick carries symbol, price, timestamp_ms, and published_at. Compare price against the open of the current window for the asset you’re watching to render the live UP / DOWN indicator.

Step 3: subscribe to window open and close events

Window updates fire twice per resolution window per (symbol, variant): an open event when the window starts, a close event when it ends. Rate: 0.025 credits per message. At least one of asset_symbols or timeframes is required.
Merge into a per-window map keyed by (symbol, variant, start_time). The open event tells you a new market just kicked off; the close event resolves it.

Charting the underlying price

Window rows give you the open and close only. To draw a full price chart of the underlying asset (the candlestick chart that sits behind the live UP / DOWN indicator), use client.assets.getAssetCandlestick. It returns OHLC bars for the asset’s spot price at a TradingView-style resolution.
Each bar is { o, h, l, c, t }: open, high, low, close, and the bar’s start time in Unix milliseconds. Pair the historical candles with the live asset_price_tick stream: load the chart from this endpoint on mount, then extend the most recent bar as ticks arrive.

Putting it together

The live indicator for the current window is spot.get(symbol) compared against windows.get(currentKey).open_price.

Common combinations

Follow-on

For threshold-based alerts on these resolutions (price crosses, individual window outcomes), see asset-price-tick and asset-price-window-update under the alerts websocket.
Last modified on May 31, 2026