account.margin is a private account-scoped channel. Authentication: realtime ticket, sent in an auth frame before subscribing. Payload schema: RealtimeAccountMarginPayload. Source status: digest. Authenticate the socket with a realtime ticket and wait for auth_ok before you send the subscribe envelope below; a subscribe sent earlier is refused as unauthorized. The socket authentication flow covers minting, rotation and expiry.

Subscribe envelope

Send this exact JSON shape. requestId is required and there is no action field. The series field is not sent for this channel.

Accepted frame

The subscription is active only after a matching realtime-subscription-accepted/v1 frame arrives.

Data frame

The envelope is realtime-stream/v1; its payload validates against RealtimeAccountMarginPayload.

Worked example

  1. Send the subscribe envelope with request id subscribe-account-margin.
  2. Wait for the accepted frame with the same request id; receiving any other frame does not prove this subscription.
  3. Process the data frame at sequence 1 and validate its payload as RealtimeAccountMarginPayload.