Browse Source

优化订单状态的识别错误提示。

skyffire 1 year ago
parent
commit
e7248ffb9b
2 changed files with 9 additions and 0 deletions
  1. 3 0
      strategy/src/bybit_usdt_swap.rs
  2. 6 0
      strategy/src/gate_swap.rs

+ 3 - 0
strategy/src/bybit_usdt_swap.rs

@@ -127,8 +127,11 @@ async fn on_private_data(core_arc_clone: Arc<Mutex<Core>>, ct_val: &Decimal, run
             let mut order_infos:Vec<OrderInfo> = Vec::new();
             for order in orders.order {
                 if order.status == "NULL" {
+                    error!("bybit_usdt_swap 未识别的订单状态:{:?}", response);
+
                     continue;
                 }
+
                 let order_info = OrderInfo {
                     symbol: "".to_string(),
                     amount: order.amount.abs(),

+ 6 - 0
strategy/src/gate_swap.rs

@@ -128,6 +128,12 @@ async fn on_data(core_arc_clone: Arc<Mutex<Core>>,
 
             let mut order_infos:Vec<OrderInfo> = Vec::new();
             for order in orders.order {
+                if order.status == "NULL" {
+                    error!("gate_usdt_swap 未识别的订单状态:{:?}", response);
+
+                    continue;
+                }
+
                 let order_info = OrderInfo {
                     symbol: "".to_string(),
                     amount: order.amount.abs(),