[Fix] bug when receiving empty offset flag
This commit is contained in:
parent
07b51393dd
commit
c7621cbfa3
@ -447,7 +447,7 @@ class CtpTdApi(TdApi):
|
||||
exchange=exchange,
|
||||
orderid=orderid,
|
||||
direction=DIRECTION_CTP2VT[data["Direction"]],
|
||||
offset=OFFSET_CTP2VT[data["CombOffsetFlag"]],
|
||||
offset=OFFSET_CTP2VT.get(data["CombOffsetFlag"], Offset.NONE),
|
||||
price=data["LimitPrice"],
|
||||
volume=data["VolumeTotalOriginal"],
|
||||
status=Status.REJECTED,
|
||||
|
@ -446,7 +446,7 @@ class CtpTdApi(TdApi):
|
||||
exchange=exchange,
|
||||
orderid=orderid,
|
||||
direction=DIRECTION_CTP2VT[data["Direction"]],
|
||||
offset=OFFSET_CTP2VT[data["CombOffsetFlag"]],
|
||||
offset=OFFSET_CTP2VT.get(data["CombOffsetFlag"], Offset.NONE),
|
||||
price=data["LimitPrice"],
|
||||
volume=data["VolumeTotalOriginal"],
|
||||
status=Status.REJECTED,
|
||||
|
@ -443,7 +443,7 @@ class MiniTdApi(TdApi):
|
||||
exchange=exchange,
|
||||
orderid=orderid,
|
||||
direction=DIRECTION_MINI2VT[data["Direction"]],
|
||||
offset=OFFSET_MINI2VT[data["CombOffsetFlag"]],
|
||||
offset=OFFSET_MINI2VT.get(data["CombOffsetFlag"], Offset.NONE),
|
||||
price=data["LimitPrice"],
|
||||
volume=data["VolumeTotalOriginal"],
|
||||
status=Status.REJECTED,
|
||||
|
Loading…
Reference in New Issue
Block a user