Private User Channel
Create a listenKey first:
Response example:
listenKey is valid for 60 minutes by default. Renewal every 30 minutes is recommended.
Renew
Close
Connect to private WebSocket
Compatible JWT connection method:
After authentication succeeds, the server automatically subscribes the connection to the current user’s private channel. No manual subscription is required.
Successful authentication acknowledgement:
Common private events
Private push message wrapper:
REST query endpoints and WebSocket private streams use separate schemas. Clients should parse each schema independently and should not assume field names are identical.
Common differences
Recovery and reconciliation
- Renew the listenKey before expiry and create a new one if renewal fails.
- Reconnect, re-authenticate, and treat the new socket as a new event session.
- Deduplicate events before changing partner balances or order records.
- If events may have been missed, query orders, positions, and account state through REST.
- Follow the connection and heartbeat guide for retry and stale-connection handling.