Closed skliarovartem closed 1 year ago
You shouldn't need to override the urls. The WS client handles this for you. Here's an example for USD Futures: https://github.com/tiagosiebler/awesome-crypto-examples/blob/master/src/exchanges/binance/account-events/futures-balance-update.ts#L20-L68
Another example here: https://github.com/tiagosiebler/binance/blob/master/examples/ws-userdata.ts#L116
Awesome!
As I understand subscribeUsdFuturesUserDataStream
works for USDT-M. Is it possible also to subscribe to COIN-M?
Many thanks!
Hmm unfortunately I haven't implemented COIN-M yet... https://github.com/tiagosiebler/binance/blob/master/src/websocket-client.ts#L1845-L1869
It should be relatively straight forward by adapting what subscribeUsdFuturesUserDataStream() does into what the docs say for COIN-M
Ok, I have created a fork and implemented there subscribeCoinFuturesUserDataStream
of course rest client is empty right now, I use direct requests...
Ok, I have created a fork and implemented there
subscribeCoinFuturesUserDataStream
of course rest client is empty right now, I use direct requests...
Cool, will you be making a pull request or would you prefer me to do it? Yes, the rest client for coinm is still a bit empty, it was only recently started by another user, but we can start adding methods to it for any needed endpoints.
ok, I will make pr, but next week
Supported since a few releases ago
Trying to connect to futures websockets:
And getting error:
{ wsKey: 'spot_userData', error: "Unexpected '<'" }