hl před 1 rokem
rodič
revize
a3f47a0d6d
1 změnil soubory, kde provedl 4 přidání a 4 odebrání
  1. 4 4
      strategy/src/clear_core.rs

+ 4 - 4
strategy/src/clear_core.rs

@@ -541,8 +541,8 @@ impl ClearCore {
         info!("清仓程序结果 {:?}", result);
         // 判断是否有清仓,是否有异常
         if result.clear_position_num != "0" || result.clear_order_num != "0" || result.clear_other_err{
-            info!("上报了清仓信息!!!")
-            // send_clear_msg_request(&result).await;
+            info!("上报了清仓信息!!!");
+            send_clear_msg_request(&result).await;
             // 上报清仓日志
         }
 
@@ -635,11 +635,11 @@ pub async fn send_clear_msg_request(body_params: &ClearPositionResult) {
     // 创建请求头
     let mut headers = HeaderMap::new();
     headers.insert(CONTENT_TYPE, HeaderValue::from_static("application/json"));
-    headers.insert("token", HeaderValue::from_static("token_value"));
+    headers.insert("report_token", HeaderValue::from_static("r7T$8gBV!f&L@E2+"));
 
     // 发送 POST 请求
     let res = client
-        .post("https://xxxx.com")
+        .post("https://t4lapi.skyfffire.com/api/report/searchPositions")
         .headers(headers)
         .json(body_params)
         .send()