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

Websockets did not work

Open kors-opinov8 opened this issue 3 years ago • 0 comments

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

kors-opinov8 avatar Apr 19 '22 14:04 kors-opinov8