Room ID: polymarket_asset_window_updates
Endpoint: wss://api.struct.to/ws
Rate: 0.025 credits per message
Stream candle open and close events for crypto assets. At least one of asset_symbols or timeframes is required.
Subscribe
You must provide at least one filter. Specify the assets you want to track and the candle timeframes you are interested in.
Filters
| Filter | Type | Required | Description |
|---|
asset_symbols | string[] | At least one filter required | Asset symbols to track, e.g. ["BTC", "ETH"] |
timeframes | string[] | At least one filter required | One or more of 5m, 15m, 1h, 4h, 1d, 24h |
Example
{
"type": "join_room",
"payload": {
"room_id": "polymarket_asset_window_updates"
}
}
{
"type": "room_message",
"payload": {
"room_id": "polymarket_asset_window_updates",
"message": {
"action": "subscribe",
"asset_symbols": ["BTC"],
"timeframes": ["1h"]
}
}
}
Response
{
"type": "asset_window_updates_stream_subscribe_response",
"room_id": "polymarket_asset_window_updates",
"data": {
"asset_symbols": ["BTC"],
"timeframes": ["1h"]
}
}
Events
asset_price_window_update
{
"type": "asset_price_window_update",
"room_id": "polymarket_asset_window_updates",
"data": {
"event_type": "window_update",
"symbol": "BTC",
"variant": "5m",
"start_time": 1743499700000,
"end_time": 1743500000000,
"open_price": 97200.0,
"close_price": 97250.50,
"update_type": "open",
"published_at": 1743500000000
}
}