瀏覽代碼

新增日志,用于检查仓位异常。

skyffire 7 月之前
父節點
當前提交
6ca1609aec
共有 1 個文件被更改,包括 5 次插入5 次删除
  1. 5 5
      strategy/src/core.rs

+ 5 - 5
strategy/src/core.rs

@@ -298,10 +298,10 @@ impl Core {
 
     // #[instrument(skip(self, data, trace_stack), level="TRACE")]
     pub async fn update_local_order(&mut self, data: OrderInfo, trace_stack: TraceStack) {
-        // if data.filled != Decimal::ZERO {
-        //     // info!("\n\n");
-        //     // info!("接收到订单信息①:{:?}", data);
-        // }
+        if data.filled != Decimal::ZERO {
+            info!("\n\n");
+            info!("接收到订单信息①:{:?}", data);
+        }
         /*
          更新订单
             首先直接复写本地订单
@@ -367,7 +367,7 @@ impl Core {
                         let mut filled_order = data.clone();
                         filled_order.side = side.clone();
 
-                        // info!("移除本地订单:{:?}, local_by_orders: {:?}", filled_order, self.local_position_by_orders);
+                        info!("移除本地订单:{:?}, local_by_orders: {:?}", filled_order, self.local_position_by_orders);
                         // 如果是现货交易 还需要修改equity
                         if self.exchange.contains("spot") {
                             // 现货必须考虑fee 买入fee单位为币 卖出fee单位为u