فهرست منبع

rest检测仓位标识打印

JiahengHe 1 سال پیش
والد
کامیت
156988aaa1
1فایلهای تغییر یافته به همراه4 افزوده شده و 1 حذف شده
  1. 4 1
      src/core_libs.rs

+ 4 - 1
src/core_libs.rs

@@ -134,7 +134,10 @@ pub async fn init(params: Params,
             let mut core = markt_price_core_arc.lock().await;
             match core.platform_rest.get_position().await {
                 Ok(pos) => {
-                    core.update_position(pos).await;
+                    if pos.len() > 0 {
+                        info!("rest仓位更新...");
+                        core.update_position(pos).await;
+                    }
                 },
                 Err(err) => {
                     error!("rest持仓数据获取异常 {}", err);