From 2a287dacfbb38046f3b780806cec69b14b54d5ca Mon Sep 17 00:00:00 2001 From: nanoric Date: Sat, 31 Aug 2019 06:27:44 +0800 Subject: [PATCH] [Fix] OkexfGateway: Fixed typo --- vnpy/gateway/okexf/okexf_gateway.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vnpy/gateway/okexf/okexf_gateway.py b/vnpy/gateway/okexf/okexf_gateway.py index 7d86bbe9..e1b9d3cd 100644 --- a/vnpy/gateway/okexf/okexf_gateway.py +++ b/vnpy/gateway/okexf/okexf_gateway.py @@ -164,7 +164,7 @@ class OkexfRestApi(RestClient): OKEXF REST API """ - def __init__(self, gateway: BaseGateway): + def __init__(self, gateway: "OkexfGateway"): """""" super(OkexfRestApi, self).__init__() @@ -407,8 +407,8 @@ class OkexfRestApi(RestClient): direction=Direction.SHORT, volume=int(pos_data["short_qty"]), frozen=float(pos_data["short_qty"]) - float(pos_data["short_avail_qty"]), - price=float(["short_avg_cost"]), - pnl=float(["realised_pnl"]), + price=float(pos_data["short_avg_cost"]), + pnl=float(pos_data["realised_pnl"]), gateway_name=self.gateway_name, ) self.gateway.on_position(pos)