-
-
Notifications
You must be signed in to change notification settings - Fork 288
Description
https://binance-docs.github.io/apidocs/spot/en/#websocket-market-streams
Binance has this option:
**Live Subscribing/Unsubscribing to streams
The following data can be sent through the websocket instance in order to subscribe/unsubscribe from streams. Examples can be seen below.
The id used in the JSON payloads is an unsigned INT used as an identifier to uniquely identify the messages going back and forth.
In the response, if the result received is null this means the request sent was a success.**
Subscribe to a stream
Request
{
"method": "SUBSCRIBE",
"params":
[
"btcusdt@aggTrade",
"btcusdt@depth"
],
"id": 1
}
Unsubscribe to a stream
Request
{
"method": "UNSUBSCRIBE",
"params":
[
"btcusdt@depth"
],
"id": 312
}
Does your library have such an implementation? (I did not find it), if not, can you add it? Because as I understand it, if, for example, I call subscribeAggregateTrades 20 times for different coins, then I will open 20 connections, and the limit for binance seems to be 5
but I would like to be able to add and remove coins in an already open connection (for example, listen to 100 coins, then add 2 more, or remove 5)
thank you in advance