Skip to content

Commit 7eba013

Browse files
committed
fix: _
1 parent 42a0e95 commit 7eba013

File tree

5 files changed

+11
-6
lines changed

5 files changed

+11
-6
lines changed

v_exchanges/src/binance/mod.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
use crate::core::Exchange;
2+
3+
// But like what do I implement the trait for?

v_exchanges/src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
1-
pub mod core;
1+
pub(crate) mod core;
2+
3+
pub mod binance;

v_exchanges/src/main.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
fn main() {
2+
println!("Hello, world!");
3+
}

v_exchanges_deser/src/binance/futures/market.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ use serde::Serialize;
77

88
use crate::binance::futures::core::*;
99

10-
//HACK: oversimplified
10+
//? should the `symbol` and `tf` be strs, while only the top-most level interface takes in the general interfaces?
1111
pub async fn klines(generic_client: &v_exchanges_adapters::Client, pair: Pair, tf: Timeframe, limit: Option<u16>, start_time: Option<u64>, end_time: Option<u64>) -> Result<Vec<Kline>> {
1212
#[derive(Serialize)]
1313
pub struct KlineParams {

v_exchanges_deser/src/main.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,6 @@ async fn main() {
2222
let mut client = Client::new();
2323
client.update_default_option(BinanceOption::HttpUrl(BinanceHttpUrl::FuturesUsdM));
2424

25-
let pair = v_utils::trades::Pair::new("BTC", "USDT");
26-
let tf = Timeframe::from("1m");
27-
28-
let klines = binance::futures::market::klines(&client, pair, tf, None, None, None).await.unwrap();
25+
let klines = binance::futures::market::klines(&client, ("BTC", "USDT").into(), "1m".into(), None, None, None).await.unwrap();
2926
dbg!(&klines);
3027
}

0 commit comments

Comments
 (0)