gepangpang 11 mesi fa
parent
commit
75960fd890

+ 2 - 3
derive/src/bitget_swap_export.rs

@@ -69,9 +69,8 @@ impl ExportConnector for BitgetSwapExport {
                 let last_time = trades_info.last().unwrap()["cTime"].as_str().unwrap().parse::<i64>().unwrap().to_i64().unwrap();
                 if last_time < start_time {
                     data_array = data_array.iter().filter(|item| {
-                        NaiveDateTime::parse_from_str(item.last().unwrap(), "%Y-%m-%d %H:%M:%S%.3f")
-                            .unwrap()
-                            .timestamp_millis() > start_time
+                        let times = NaiveDateTime::parse_from_str(item.last().unwrap(), "%Y-%m-%d %H:%M:%S%.3f").unwrap().timestamp_millis();
+                        times - 8 * 3600 * 1000 > start_time
                     }).cloned().collect();
                     break;
                 }

+ 1 - 1
derive/tests/bitget_swap_export_test.rs

@@ -14,6 +14,6 @@ async fn test_get_self_exchange() {
     global::log_utils::init_log_with_trace();
 
     let mut export = test_new_export(ExportEnum::BitgetSwap).await;
-    let export_trades = export.export_trades("bitget_02", SYMBOL.to_string(), 1733824800000, 1733882400000, 100).await;
+    let export_trades = export.export_trades("bitget_02", SYMBOL.to_string(), 1733907600000, 1733968800000, 100).await;
     trace!(?export_trades);
 }