binance-api-node icon indicating copy to clipboard operation
binance-api-node copied to clipboard

can we make stream subscribing promise based?

Open hp8wvvvgnj6asjm7 opened this issue 3 years ago • 1 comments

function futuresCustomSubStream() => new Promise((rs, rj) => {

 // connect ws
 // on error -> reject
 // on success -> resolve
})

const unsubscribe = await client.ws.futuresCustomSubStream()

hp8wvvvgnj6asjm7 avatar Aug 04 '22 01:08 hp8wvvvgnj6asjm7

#589

hp8wvvvgnj6asjm7 avatar Aug 05 '22 08:08 hp8wvvvgnj6asjm7