File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -53,7 +53,7 @@ def convert_order(self, quant_order):
5353 price = quant_order .limit ,
5454 amount = quant_order .amount ,
5555 style = (OrderStyle .LIMIT if quant_order .limit > 0 else OrderStyle .MARKET ),
56- status = OrderStatus (quant_order .status . value ),
56+ status = self . _convert_status (quant_order .status ),
5757 add_time = quant_order .add_time ,
5858 )
5959 return common_order
@@ -99,6 +99,13 @@ def _convert_position(quant_position):
9999 position .value = quant_position .value
100100 return position
101101
102+ @staticmethod
103+ def _convert_status (quant_order_status ):
104+ try :
105+ return OrderStatus (quant_order_status .value )
106+ except ValueError :
107+ return OrderStatus .open
108+
102109
103110class JoinQuantLogger (BaseLogger ):
104111 def debug (self , msg , * args , ** kwargs ):
You can’t perform that action at this time.
0 commit comments