[Fix] OkexfGateway: Fixed typo

This commit is contained in:
nanoric 2019-08-31 06:27:44 +08:00
parent 9f0cd1f472
commit 2a287dacfb

View File

@ -164,7 +164,7 @@ class OkexfRestApi(RestClient):
OKEXF REST API OKEXF REST API
""" """
def __init__(self, gateway: BaseGateway): def __init__(self, gateway: "OkexfGateway"):
"""""" """"""
super(OkexfRestApi, self).__init__() super(OkexfRestApi, self).__init__()
@ -407,8 +407,8 @@ class OkexfRestApi(RestClient):
direction=Direction.SHORT, direction=Direction.SHORT,
volume=int(pos_data["short_qty"]), volume=int(pos_data["short_qty"]),
frozen=float(pos_data["short_qty"]) - float(pos_data["short_avail_qty"]), frozen=float(pos_data["short_qty"]) - float(pos_data["short_avail_qty"]),
price=float(["short_avg_cost"]), price=float(pos_data["short_avg_cost"]),
pnl=float(["realised_pnl"]), pnl=float(pos_data["realised_pnl"]),
gateway_name=self.gateway_name, gateway_name=self.gateway_name,
) )
self.gateway.on_position(pos) self.gateway.on_position(pos)