Overview
Receive real-time updates for your account activity through authenticated WebSocket connections. After connecting with valid API credentials, subscribe to the private channels you need (orders, balance, positions).
Available Private Streams
Order Updates
Real-time order status changes and fills
Balance Updates
Account balance changes from trades and transfers
Position Updates
Position changes and profit/loss updates
Account Notifications
Account-level alerts and status updates
Stream Types Overview
| Channel | Description | Auto-Enabled | Authentication |
|---|---|---|---|
orders | Order status changes and fills | ❌ No (subscribe) | Required |
balance | Account balance updates | ❌ No (subscribe) | Required |
positions | Position changes and PnL | ❌ No (subscribe) | Required |
account | Account-level notifications | ❌ No (subscribe) | Required |
Quick Start
Authenticated Connection Setup
RSA Signature Generation
The WebSocket connection requires an RSA signature of the payloadGET:/ws using your private key:
Python RSA Signature Generation
Go RSA Signature Generation
Message Format
All account update messages follow a consistent structure:Common Use Cases
Order Management Systems
Order Management Systems
Monitor order fills, cancellations, and rejections in real-time to maintain accurate order state and trigger appropriate business logic.
Risk Management
Risk Management
Track position changes and unrealized P&L to implement stop-loss mechanisms and position size limits.
Portfolio Monitoring
Portfolio Monitoring
Real-time balance updates enable dynamic portfolio rebalancing and cash management strategies.
Algorithmic Trading
Algorithmic Trading
Use order and position updates to trigger next steps in multi-leg trading strategies and complex order workflows.
Error Handling
Authentication Failed
Authentication Failed
Cause: Invalid API credentials or signatureSolution:
- Verify API key is correct and active
- Check RSA signature generation using correct payload (“GET:/ws”)
- Ensure private key matches the public key associated with your API key
Connection Timeout
Connection Timeout
Cause: Network or server connectivity issuesSolution:
- Implement reconnection logic with exponential backoff
- Monitor connection health with heartbeat
- Handle reconnection state recovery
Rate Limiting
Rate Limiting
Cause: Too many connection attemptsSolution:
- Use single connection per application
- Implement connection pooling
- Add delays between reconnection attempts
Best Practices
State Management
State Management
- Maintain local copies of order and position state
- Handle message ordering and potential duplicates
- Implement proper state reconciliation on reconnection
- Use message timestamps for event sequencing
Performance Optimization
Performance Optimization
- Process updates asynchronously to avoid blocking
- Batch UI updates for high-frequency streams
- Implement efficient data structures for tracking
- Monitor memory usage for long-running connections
Reliability
Reliability
- Implement comprehensive error handling
- Log all account events for audit trails
- Use heartbeat monitoring for connection health
- Plan for graceful degradation during outages
Authentication Requirements
To access private account streams, you need:- Valid API Credentials: Active API key with appropriate permissions
- Proper Signature: RSA signature of the payload “GET:/ws” using your private key
- Correct Headers: Both
X-API-KeyandX-API-Signatureheaders included
Next Steps
- Set up Connection Authentication for private streams
- Learn about specific Order Update message formats
- Explore Balance Update tracking strategies
- Review Position Update monitoring techniques