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 offDocumentation Index
Fetch the complete documentation index at: https://docs.struct.to/llms.txt
Use this file to discover all available pages before exploring further.
(symbol, variant, start_time):
| Need | Source |
|---|---|
| Past window results (open, close, outcome) | client.assets.getAssetHistory |
| Live in-window asset price | polymarket_asset_prices (asset_price_tick) |
| Window open and close events | polymarket_asset_window_updates (asset_price_window_update) |
start_time and the close at end_time.
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_timeandend_timeare Unix milliseconds,end_time - start_timematches thevariantlength.- At
start_time, anupdate_type: "open"event fires withopen_pricelocked in. - While the window is live,
asset_price_tickevents for the samesymbolgive you spot. - At
end_time, anupdate_type: "close"event fires withclose_pricelocked in. The market is now resolved: UP ifclose_price > open_price, DOWN otherwise.
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 lockedopen_price.
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.
(symbol, variant, start_time). The open event tells you a new market just kicked off; the close event resolves it.
Putting it together
spot.get(symbol) compared against windows.get(currentKey).open_price.
Common combinations
| Goal | Subscribe payload |
|---|---|
| Multi-timeframe Up/Down board for one asset | polymarket_asset_window_updates, asset_symbols=["BTC"], timeframes=["5m","1h","1d"] |
| All assets on one timeframe | polymarket_asset_window_updates, timeframes=["1h"] (no asset_symbols) |
| Live spot for every tracked asset | polymarket_asset_prices with no asset_symbols |
| Backfill long-window outcomes | getAssetHistory({ asset_symbol: "ETH", variant: "1d" }) |
Follow-on
For threshold-based alerts on these resolutions (price crosses, individual window outcomes), seeasset-price-tick and asset-price-window-update under the alerts websocket.