{"ret_code":0,"ret_msg":"OK","ext_code":"","ext_info":"","result":[{"order_id":"b683254d-8194-43cb-a26b-8f11779c6ce0
","user_id":3403345,"symbol":"BTCUSDT","side":"Buy","order_type":"Limit","price":4100,"qty":0.002,"time_in_force":"G
oodTillCancel","order_status":"New","last_exec_price":0,"cum_exec_qty":0,"cum_exec_value":0,"cum_exec_fee":0,"order_
link_id":"","reduce_only":false,"close_on_trigger":false,"created_time":"2021-07-15T21:40:36Z","updated_time":"2021-
07-15T21:48:52Z","take_profit":0,"stop_loss":0,"tp_trigger_by":"UNKNOWN","sl_trigger_by":"UNKNOWN"}],"time_now":"162
6408503.618801","rate_limit_status":599,"rate_limit_reset_ms":1626408503610,"rate_limit":600}
pub struct QueryActiveOrderRealTime {
ret_code: usize,
ret_msg: String,
ext_code: String,
ext_info: String,
result: Option<Vec<QueryActiveOrderRealTimeData>>,
time_now: String,
rate_limit_status: usize,
rate_limit_reset_ms: usize,
rate_limit: usize,
}
impl ResultBody for QueryActiveOrderRealTime {}
#[derive(Serialize, Deserialize, Clone, Debug)]
pub struct QueryActiveOrderRealTimeData {
order_id: String,
user_id: usize,
symbol: Symbol,
side: Side,
order_type: OrderType,
price: f64,
qty: f64,
time_in_force: TimeInForce,
order_status: OrderStatus,
last_exec_price: f64,
cum_exec_qty: f64,
cum_exec_value: f64,
cum_exec_fee: f64,
order_link_id: String,
reduce_only: bool,
close_on_trigger: bool,
created_time: String,
updated_time: String,
take_profit: f64,
stop_loss: f64,
tp_trigger_by: String,
sl_trigger_by: String,
}
impl ResultBody for QueryActiveOrderRealTimeData {}
I tried to use these two Struct to parse the json. But I got this ` Error("invalid type: map, expected usize",