@@ -42,7 +42,7 @@ class Contract {
4242 utility::string_t right;
4343 int multiplier = 0 ;
4444 utility::string_t contract_month;
45- long contract_id;
45+ long contract_id = 0 ;
4646 utility::string_t identifier;
4747 utility::string_t market;
4848};
@@ -63,21 +63,21 @@ class Order {
6363
6464 Contract contract;
6565 utility::string_t account;
66- long id;
67- long order_id;
66+ long id= 0 ;
67+ long order_id= 0 ;
6868 /* * 订单类型, 'MKT' 市价单 / 'LMT' 限价单 / 'STP' 止损单 / 'STP_LMT' 止损限价单 / 'TRAIL' 跟踪止损单 **/
6969 utility::string_t order_type;
7070 /* * 交易方向, 'BUY' / 'SELL' **/
7171 utility::string_t action;
7272 /* * 下单数量 **/
73- long total_quantity;
73+ long total_quantity= 0 ;
7474 /* * 限价单价格 **/
75- double limit_price;
75+ double limit_price= 0 ;
7676 /* * 在止损单中, 表示触发止损单的价格, 在移动止损单中, 表示跟踪的价差 **/
77- double aux_price;
78- double trail_stop_price;
79- double trailing_percent;
80- double percent_offset;
77+ double aux_price= 0 ;
78+ double trail_stop_price= 0 ;
79+ double trailing_percent= 0 ;
80+ double percent_offset= 0 ;
8181 /* * 有效期,'DAY' 日内有效 / 'GTC' good till cancel / 'GTD' good till date **/
8282 utility::string_t time_in_force;
8383 /* * 是否允许盘前盘后交易(outside of regular trading hours 美股专属). True 允许, False 不允许 **/
@@ -88,7 +88,7 @@ class Order {
8888 */
8989 bool adjust_limit;
9090 utility::string_t user_mark;
91- long expire_time;
91+ long expire_time= 0 ;
9292
9393 // 订单状态
9494 utility::string_t status;
0 commit comments