Connection details
WebSocket host:Message types
There are two types of messages that can be sent to the Stream API:Authentication
To authenticate, clients must send anAuthenticationRequest after connecting. The accessToken is available from the REST API when creating a session.
AuthenticationRequest
Subscription
To subscribe to updates, clients must send aSubscriptionRequest describing the type of update and the IDs they are interested in.
- The
subscriptionTypefield defines the type for which subscription is made. Allowed values are:EventUpdateMarketUpdateMarketPriceUpdate- all price changes in a market, both direct and derived prices (cross matching liquidity)MarketDirectPriceUpdate- direct only price changes in a market (excluding derived prices/cross matching liquidity triggered updates)MarketStatusUpdateOrderUpdateWalletUpdate
- The
subscriptionIdsfield determines the entities to subscribe to. Allowed values are:- For
EventUpdate, it can be set to *- all eventsevent-id- specific events- For
MarketUpdate,MarketPriceUpdate,MarketDirectPriceUpdateandMarketStatusUpdateit can be set to: *- all marketsmarket-id- specific markets
- For
- For
OrderUpdateit can be set to:*order-id— subscribe to updates for an order identified by its id.app-id:*— subscribe to all orders owned byapp-id(only the connection’sapp-idis allowed).app-id:wallet-id— subscribe to all orders owned byapp-idandwallet-id(only the connection’sapp-idis allowed, and the wallet must be owned by thatapp-id).
- For
WalletUpdateit can be set to*- all wallets owned by your appwallet-id- specific wallet owned by your app
Setting
subscriptionId to * means the client will be subscribed to all updates of the given type.SubscriptionRequest
Subscription Limits
To keep the system performance strong for every client, we’re introducing the following limits:- 10 active connections at any one time
- 500 active individual subscriptions at any one time - these can be spread across the number of active connections as needed.
- 500 subscriptions per minute.