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:EventUpdateMarketUpdateMarketPriceUpdateMarketStatusUpdateOrderUpdateWalletUpdate
- The
subscriptionIdsfield determines the entities to subscribe to. Allowed values are:- For
EventUpdate,MarketUpdate,MarketPriceUpdate, andMarketStatusUpdateit can be set to*or amarket-id. - For
OrderUpdateit can be set to:*order-id— subscribe to updates for an order identified by its id.order-app-id:*— subscribe to all orders owned byapp-id(only the connection’sapp-idis allowed).order-app-id:order-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*or awallet-id.
- For
Setting
subscriptionId to * means the client will be subscribed to all updates of the given type.