@@ -16,7 +16,7 @@ class Order:
1616 "quantity" , "filled" , "_remaining" , "avg_fill_price" , "commission" , "realized_pnl" , "_status" ,
1717 "trail_stop_price" , "limit_price" , "aux_price" , "trailing_percent" , "percent_offset" , "action" ,
1818 "order_type" , "time_in_force" , "outside_rth" , "order_legs" , "algo_params" , "algo_strategy" ,
19- "secret_key" , "liquidation" , "discount" , "attr_desc" , "source" , 'adjust_limit' , 'sub_ids' ]
19+ "secret_key" , "liquidation" , "discount" , "attr_desc" , "source" , 'adjust_limit' , 'sub_ids' , "user_mark" ]
2020
2121 def __init__ (self , account , contract , action , order_type , quantity , limit_price = None , aux_price = None ,
2222 trail_stop_price = None , trailing_percent = None , percent_offset = None , time_in_force = None ,
@@ -57,6 +57,7 @@ def __init__(self, account, contract, action, order_type, quantity, limit_price=
5757 - adjust_limit 价格微调幅度(默认为0表示不调整,正数为向上调整,负数向下调整),对传入价格自动调整到合法价位上.
5858 例如:0.001 代表向上调整且幅度不超过 0.1%;-0.001 代表向下调整且幅度不超过 0.1%。默认 0 表示不调整
5959 - sub_ids id list of sub orders.
60+ - user_mark: user's remark
6061 """
6162
6263 self .id = id
@@ -93,6 +94,7 @@ def __init__(self, account, contract, action, order_type, quantity, limit_price=
9394 self .source = kwargs .get ('source' )
9495 self .adjust_limit = kwargs .get ('adjust_limit' )
9596 self .sub_ids = kwargs .get ('sub_ids' )
97+ self .user_mark = kwargs .get ('user_mark' )
9698
9799 def to_dict (self ):
98100 dct = {name : getattr (self , name ) for name in self .__slots__ if name not in ORDER_FIELDS_TO_IGNORE }
0 commit comments