positions channel streams the open positions held on this account, split into futures and options.
This channel contains account specific data, an authentication token is required in the request.
This channel is currently only available for futures (
derivatives).Subscribe
- Request
- Response
positions subscription, bound to the account of the token used to subscribe. A second subscribe attempt on the same connection is rejected with Already subscribed to positions channel.
Snapshot / Update
The snapshot provides the full set of open positions on the account. Exactly one snapshot is delivered per subscription, before any update. Updates are streamed as positions change. Each update carries the positions affected by that event, not the full account state. A position that has been closed is reported on the update path with asize of 0.
string
Value:
positionsstring
One of:
snapshot, updateobject
string
One of:
Condition: if the snapshot exceeded the maximum message size.The snapshot could not be delivered. The
snapshot_too_largeCondition: if the snapshot exceeded the maximum message size.The snapshot could not be delivered. The
futures and options lists are empty and no time is sent. Resubscribe to request the snapshot again.size and entry_price are sent as JSON numbers. Use a decimal-aware JSON parser if you need to preserve all digits.With margin
Subscribing withwith_margin: true streams an enriched payload sourced from the margin service, adding margin, risk and (for options) greeks figures to each position.
The enriched feed differs from the default feed in three ways:
- No
typefield. Every message is complete per-position state — treat each as a full replace of the account’s positions, not a delta. - No
snapshotcontrol. Each message already carries full state, sosnapshotis not accepted alongsidewith_margin. - Figures are omitted when unavailable. A field whose value is undefined is left out of the row rather than sent as
null. All numeric figures are sent as JSON numbers.
futures and options lists are always present and may be empty, as in the default feed.
string
Value:
positionsobject
string
One of:
snapshot_too_large, margin_unavailableA snapshot_too_large error is delivered in place of the data when the message exceeded the maximum size; the futures and options lists are empty and no time is sent. A margin_unavailable error is delivered if the margin service stops serving this account after the subscription was accepted, and the subscription is closed. Neither error carries a type field.