Sfoglia il codice sorgente

tocker 的数据分析按照100毫秒聚合数据

hl 1 anno fa
parent
commit
b20d005bc4
1 ha cambiato i file con 2 aggiunte e 1 eliminazioni
  1. 2 1
      src/hl_pr_utile.rs

+ 2 - 1
src/hl_pr_utile.rs

@@ -112,6 +112,7 @@ pub async fn export_ticker(symbol: &str, exchange: &str, time_str: &str, time_in
                     "to":  end_at_ti,
                     "limit": "1000"
                 });
+                get(url, params.to_string(), None).await;
                 let res_data = get(url, params.to_string(), None).await;
                 if res_data.code == "200" {
                     let res_data_str = res_data.data;
@@ -156,7 +157,7 @@ pub async fn export_ticker(symbol: &str, exchange: &str, time_str: &str, time_in
                     }
                 } else {
                     info!("数据请求错误:");
-                    return;
+                    start_at_ti = start_at_ti - time_interval;
                 }
                 start_at_ti = start_at_ti + time_interval ;
             }