Binance.ws works on localhost but not on production
awf1337
HOBBYOP
2 years ago
.ws work normally on localhost but on productions it just don't work , I neither get an error or something, idk how to debug this
export class BinanceGatewayService implements OnModuleInit {
public binanceClient: any;
constructor(private eventEmitter: EventEmitter2) {
this.binanceClient = Binance();
}
onModuleInit() {
=====> at this line it stop without errors <===
this.binanceClient.ws.candles(Env().binancesymbol, '1m', (candle: any) => { this.eventEmitter.emit( EmitEnum.BINANCECANDLE_1M,
candleFormatterGateway(candle),
);
console.log('\x1b[36m%s', 'Candle price: ', Number(candle?.close));
});
}
4 Replies
awf1337
HOBBYOP
2 years ago
I didn't know it, any work around ? I need an advice, thanks for your answer
awf1337
HOBBYOP
2 years ago
thanks a lot
