Skip to main content

Events subscriptions

Subscribe to events streams

Method name: subscribe

ArgumentDescription
Scope"public" or "private", the client needs to be authenticated to subscribe to a private stream
StreamsArray of strings representing the streams to subscribe to

Request example:

[1,42,"subscribe",["public",["eurusd.trades","eurusd.orderbook","tickers","eurusd.kline-15m"]]]
[1,43,"subscribe",["private",["orders","trades"]]]

Response example:

[2,42,"subscribe",["public",["eurusd.trades","eurusd.orderbook","tickers","eurusd.kline-15m"]]]
[2,43,"subscribe",["private",["orders","trades"]]]

The response returns the list of all current subscriptions for the current connection after the subscription is performed.

Unsubscribe from events streams

Method name: unsubscribe

ArgumentDescription
Scope"public" or "private", the client needs to be authenticated to unsubscribe to a private stream
StreamsArray of strings representing the streams to unsubscribe to

Request:

[1,42,"unsubscribe",["public", ["eurusd.orderbook"]]

Response:

[2,42,"unsubscribe",["public", ["eurusd.trades","tickers"]]]

The response returns the list of remaining subscriptions for the current connection after the unsubscription is performed.