For the complete documentation index, see llms.txt. This page is also available as Markdown.

Account Frontend State Stream

User state snapshot, mainly used by frontend.

Snapshots include active DCA plans in DO (WsDcaOrder). Follow subsequent changes through Account Updates.

Update Speed

  • Pushed on each block that is at least 0.5 seconds since the last push

Subscribe Request

  • Subscribe Schema

See WsUserFrontendStateSubscriptionParams in Schema.

interface SubscribeRequest {
  op: "subscribe";
  id: number | null; // Optional client originated request identifier sent as acknowledgment in the response.
  params: WsUserFrontendStateSubscriptionParams;
}
  • Subscribe Ack Schema

See WsUserFrontendStateSubscriptionResult in Schema.

interface SubscriptionResult {
  op: "subscribe";
  id: number | null; // Optional client originated request identifier sent as acknowledgment in the response.
  result: WsUserFrontendStateSubscriptionResult | null;
  success: boolean; // Indicates if the request was successfully processed by the engine.
  connID: string;
  error: string | null; // Condition: If success is false. Error message.
  time_in: number; // The timestamp when the subscription was received on the wire, just prior to parsing data, in milliseconds.
  time_out: number; // The timestamp when the acknowledgement was sent on the wire, just prior to transmitting data, in milliseconds.
}
  • Example: Subscribe

  • Example: Subscribe Ack

Unsubscribe Request

  • Unsubscribe Schema

See WsUserFrontendStateSubscriptionParams in Schema.

  • Unsubscribe Ack Schema

See WsUserFrontendStateSubscriptionResult in Schema.

  • Example: Unsubscribe

  • Example: Unsubscribe Ack

Snapshot Response

  • Snapshot Schema

See WsSpotState, WsPerpsState in Schema.

  • Example: Snapshot

Last updated