Connection
Subscribe to a Channel
Send a JSON message to start streaming:Receive Events
Quote Ticks
Quote data is wrapped in adata field containing the upstream quote object:
Order Updates
Sent when an order is opened, modified, or closed. Order data is wrapped in adata field:
Profit Updates
Live equity and P&L, wrapped in adata field:
Heartbeat
Periodic account health snapshot with balance, equity, margin, and position count:New Position
Fires when a new position is opened on the account. The full order object is delivered in thedata field:
Alerts
Register price, spread, or P&L alerts to be notified when conditions are met. Alerts are one-shot: they fire once and are automatically removed.Price Alert
Register a price alert to trigger when a symbol’s price crosses a threshold:Spread Alert
Register a spread alert to trigger when the spread exceeds a threshold in pips:P&L Alert
Register a P&L alert to trigger when account profit crosses a threshold:Cancel Alert
Cancel a previously registered alert before it triggers:Aggregate Feed
Usesubscribe_aggregate to receive aggregate events for selected stream types across every account owned by the API key. This is separate from the normal per-account subscribe message and does not include an account_id field.
Unsubscribe
Available Channels
Aggregate delivery uses
subscribe_aggregate with a channels array instead of a normal channel value.
Multi-Account Streaming
Subscribe to multiple accounts on the same WebSocket:account_id so you can route it to the correct handler.
Error Events
SESSION_ERROR, INVALID_MESSAGE
Keepalive
Full JavaScript Example
Full Python Example
Session Behavior
- Sessions auto-connect when you subscribe. No need to call
/connectfirst. - If the MT5 session drops, the gateway reconnects automatically and resumes streaming.
- On WebSocket disconnect, all subscriptions for that client are cleaned up.
- Upstream quote subscriptions are ref-counted. Multiple clients on the same symbol share one upstream feed.