[Fix] OkexfGateway: Fixed typo
This commit is contained in:
parent
9f0cd1f472
commit
2a287dacfb
@ -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)
|
||||||
|
Loading…
Reference in New Issue
Block a user