Bläddra i källkod

fix faulty parsing while trying to deserialize fetched klines

Berke 1 år sedan
förälder
incheckning
70773a0d03
1 ändrade filer med 6 tillägg och 5 borttagningar
  1. 6 5
      src/data_providers/binance/market_data.rs

+ 6 - 5
src/data_providers/binance/market_data.rs

@@ -647,6 +647,7 @@ mod string_to_f32 {
     }
 }
 
+#[allow(dead_code)]
 #[derive(Deserialize, Debug, Clone)]
 struct FetchedKlines (
     u64,
@@ -655,12 +656,12 @@ struct FetchedKlines (
     #[serde(with = "string_to_f32")] f32,
     #[serde(with = "string_to_f32")] f32,
     #[serde(with = "string_to_f32")] f32,
-    (),
-    (),
-    (),
+    u64,
+    String,
+    u32,
     #[serde(with = "string_to_f32")] f32,
-    (),
-    (),
+    String,
+    String,
 );
 impl From<FetchedKlines> for Kline {
     fn from(fetched: FetchedKlines) -> Self {