From 7ee538125e5831cc2d15f1f37e736f9e31871df8 Mon Sep 17 00:00:00 2001 From: Archer Date: Tue, 16 Apr 2019 15:34:06 +0800 Subject: [PATCH] update: flake8 --- vnpy/gateway/onetoken/onetoken_gateway.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vnpy/gateway/onetoken/onetoken_gateway.py b/vnpy/gateway/onetoken/onetoken_gateway.py index 360c3c39..a0ada054 100644 --- a/vnpy/gateway/onetoken/onetoken_gateway.py +++ b/vnpy/gateway/onetoken/onetoken_gateway.py @@ -171,7 +171,7 @@ class OnetokenRestApi(RestClient): self.account = account self.connect_time = ( - int(datetime.now().strftime("%y%m%d%H%M%S")) * self.order_count + int(datetime.now().strftime("%y%m%d%H%M%S")) * self.order_count ) self.init(REST_HOST, proxy_host, proxy_port) @@ -199,7 +199,7 @@ class OnetokenRestApi(RestClient): """This is for WS Example""" for account_data in data["position"]: _type = account_data['type'] - if 'spot' in _type: #统计balance + if 'spot' in _type: # 统计balance account = AccountData( accountid=account_data["contract"], balance=float(account_data["total_amount"]), @@ -207,7 +207,7 @@ class OnetokenRestApi(RestClient): gateway_name=self.gateway_name ) self.gateway.on_account(account) - elif _type == 'future': #期货合约 + elif _type == 'future': # 期货合约 long_position = PositionData( symbol=account_data["contract"], exchange=Exchange.OKEX, # todo add Exchange