Content-Type: text/event-stream). Both futures streams require a session — the astra_session cookie or Authorization: Bearer <token>.
Futures endpoints
There are two futures user streams. For market making, prefer the account stream — one connection covers all your futures markets.- All markets (recommended)
- Single market
What it carries
Orderbook
Single-market stream only. Deltas carry changed levels;
size: "0" means the level was removed.Your trades
id, orderId, marketId, side, price, quantity, liquidity (maker/taker), createdAt.Your positions
id, marketId, side, quantity, entryPrice, realizedPnl, status; deltas carry upserts and removedIds.Event model
Every message is an envelope:
The
Perp… names are legacy; these are the futures streams.
On the account stream, eventSeq increases by exactly one per event — a jump means you missed data, so reconnect and re-snapshot. A : heartbeat comment arrives after 5 seconds without events. On the single-market stream eventSeq is not contiguous and there is no heartbeat, so rely on reconnect-on-drop.
Consume it
EventSource cannot send an Authorization header, so a bot reads the stream with fetch:
JavaScript
Option fills
There is no public fill stream for options. Reconcile option fills and inventory by polling:GET {API_BASE}/options/trades/me?since=<RFC 3339 timestamp>— your option fills since a point in time (up to 500).GET {API_BASE}/positions/me— your option positions.GET {API_BASE}/portfolio/balances/stream— pushes an update whenever your balances change, a useful trigger to re-read fills.
Reconcile futures with pull endpoints
The futures stream is push-first, but you can reconcile at any time:GET {API_BASE}/fut/positions— your positions.GET {API_BASE}/fut/orders/open— your resting orders.GET {API_BASE}/fut/trades— your fills.GET {API_BASE}/portfolio/balances— balances, NLV, and margin.