diff --git a/vnpy/gateway/binance/binance_gateway.py b/vnpy/gateway/binance/binance_gateway.py index b2936948..b60b3f7b 100644 --- a/vnpy/gateway/binance/binance_gateway.py +++ b/vnpy/gateway/binance/binance_gateway.py @@ -107,8 +107,6 @@ class BinanceGateway(BaseGateway): self.market_ws_api = BinanceDataWebsocketApi(self) self.rest_api = BinanceRestApi(self) - self.event_engine.register(EVENT_TIMER, self.process_timer_event) - def connect(self, setting: dict): """""" key = setting["key"] @@ -121,6 +119,8 @@ class BinanceGateway(BaseGateway): proxy_host, proxy_port) self.market_ws_api.connect(proxy_host, proxy_port) + self.event_engine.register(EVENT_TIMER, self.process_timer_event) + def subscribe(self, req: SubscribeRequest): """""" self.market_ws_api.subscribe(req)