Bläddra i källkod

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

skyffire 1 år sedan
förälder
incheckning
e7248ffb9b
2 ändrade filer med 9 tillägg och 0 borttagningar
  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();
             let mut order_infos:Vec<OrderInfo> = Vec::new();
             for order in orders.order {
             for order in orders.order {
                 if order.status == "NULL" {
                 if order.status == "NULL" {
+                    error!("bybit_usdt_swap 未识别的订单状态:{:?}", response);
+
                     continue;
                     continue;
                 }
                 }
+
                 let order_info = OrderInfo {
                 let order_info = OrderInfo {
                     symbol: "".to_string(),
                     symbol: "".to_string(),
                     amount: order.amount.abs(),
                     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();
             let mut order_infos:Vec<OrderInfo> = Vec::new();
             for order in orders.order {
             for order in orders.order {
+                if order.status == "NULL" {
+                    error!("gate_usdt_swap 未识别的订单状态:{:?}", response);
+
+                    continue;
+                }
+
                 let order_info = OrderInfo {
                 let order_info = OrderInfo {
                     symbol: "".to_string(),
                     symbol: "".to_string(),
                     amount: order.amount.abs(),
                     amount: order.amount.abs(),