|
|
@@ -32,8 +32,11 @@ pub fn handle_account_info(response: &ResponseData, _symbol: &String) -> Account
|
|
|
|
|
|
// 处理order信息
|
|
|
pub fn handle_order(res_data: ResponseData, ct_val: Decimal) -> SpecialOrder {
|
|
|
- let res_data_json = res_data.data;
|
|
|
- let order_info = vec![format_order_item(res_data_json.clone(), ct_val)];
|
|
|
+ let res_data_json = res_data.data.as_array().unwrap();
|
|
|
+ let mut order_info = Vec::new();
|
|
|
+ for item in res_data_json.iter() {
|
|
|
+ order_info.push(format_order_item(item["order"].clone(), ct_val));
|
|
|
+ }
|
|
|
SpecialOrder {
|
|
|
name: res_data.label,
|
|
|
order: order_info,
|