Collect a live window
ws_collectNeed a quick sample of live market data? Subscribe, collect ticks up to a set duration or count, then return data. Subscriptions are removed after use.
Instructions
One-shot: subscribe, wait up to duration_ms collecting matching ticks (or until max reached), then return them. Subscriptions this call newly creates are removed afterwards. Use this for a quick 'sample N seconds of live data' request.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| product | Yes | Channel: cex (crypto), dex (DEX trades), fx (forex), us (US stocks), tvl (DEX pool TVL). | |
| symbols | Yes | Symbols to (un)subscribe, e.g. ['BTCUSD','ETHUSD']. | |
| duration_ms | No | How long to collect, in ms. Default 3000, max 15000. | |
| max | No | Stop early after this many frames. Default 50. |