binance-api-node
binance-api-node copied to clipboard
Websockets did not work
import Binance, { Binance as BinanceClient } from 'binance-api-node';
export class BinanceService {
private readonly client: BinanceClient;
private readonly markets: string[];
constructor(apiKey: string, apiSecret: string) {
this.client = Binance({
apiKey,
apiSecret,
})
this.client.ws.depth('ETHBTC', depth => {
console.log(depth)
})
}
}
Actual: Nothing hapenned, but REST endpoints works as well. There is not errors about WS or anything else, nothing hapenned. Expected: there is will be depth in console.log