瀏覽代碼

fix faulty parsing while trying to deserialize fetched klines

Berke 1 年之前
父節點
當前提交
70773a0d03
共有 1 個文件被更改,包括 6 次插入5 次删除
  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 {