Browse Source

fix faulty parsing while trying to deserialize fetched klines

Berke 1 year ago
parent
commit
70773a0d03
1 changed files with 6 additions and 5 deletions
  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)]
 #[derive(Deserialize, Debug, Clone)]
 struct FetchedKlines (
 struct FetchedKlines (
     u64,
     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,
     #[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,
     #[serde(with = "string_to_f32")] f32,
-    (),
-    (),
+    String,
+    String,
 );
 );
 impl From<FetchedKlines> for Kline {
 impl From<FetchedKlines> for Kline {
     fn from(fetched: FetchedKlines) -> Self {
     fn from(fetched: FetchedKlines) -> Self {