From 92214950da160d5d7983615bedc46d4e5df77c12 Mon Sep 17 00:00:00 2001 From: "vn.py" Date: Sun, 30 Jun 2019 23:41:15 +0800 Subject: [PATCH] [Mod] flake8 code quality improve --- 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 e140c37f..e6af5faa 100644 --- a/vnpy/gateway/onetoken/onetoken_gateway.py +++ b/vnpy/gateway/onetoken/onetoken_gateway.py @@ -619,7 +619,7 @@ class OnetokenTradeWebsocketApi(WebsocketClient): elif _type == "future": long_position = PositionData( symbol=account_data["contract"], - exchange=Exchange(self.exchange.upper()), + exchange=Exchange(self.exchange.upper()), direction=Direction.LONG, price=account_data["average_open_price_long"], volume=account_data["total_amount_long"], @@ -629,7 +629,7 @@ class OnetokenTradeWebsocketApi(WebsocketClient): ) short_position = PositionData( symbol=account_data["contract"], - exchange=Exchange(self.exchange.upper()), + exchange=Exchange(self.exchange.upper()), direction=Direction.SHORT, price=account_data["average_open_price_short"], volume=account_data["total_amount_short"], @@ -661,7 +661,7 @@ class OnetokenTradeWebsocketApi(WebsocketClient): gateway_name=self.gateway_name ) - if order_data["status"] in ("withdrawn","part-deal-withdrawn"): + if order_data["status"] in ("withdrawn", "part-deal-withdrawn"): order.status = Status.CANCELLED else: if order.traded == order.volume: