@@ -2,7 +2,7 @@ use std::collections::VecDeque;
22
33use chrono:: { DateTime , TimeZone , Utc } ;
44//HACK: Methods should be implemented on the central interface struct, following <https://github.com/wisespace-io/binance-rs>.
5- use color_eyre :: eyre:: Result ;
5+ use eyre:: Result ;
66use serde:: { Deserialize , Serialize } ;
77use serde_json:: { Value , json} ;
88use serde_with:: { DisplayFromStr , serde_as} ;
@@ -122,37 +122,6 @@ pub struct KlineResponse {
122122}
123123//,}}}
124124
125- //// price {{{
126- ////HACK: not sure this is _the_ thing to use for that (throwing away A LOT of data)
127- //pub async fn price(client: &v_exchanges_adapters::Client, pair: Pair) -> Result<f64> {
128- // let params = json!({
129- // "symbol": pair.to_string(),
130- // });
131- //
132- // let r: MarkPriceResponse = client.get("/fapi/v1/premiumIndex", ¶ms, [BinanceOption::HttpUrl(BinanceHttpUrl::FuturesUsdM)]).await.unwrap();
133- // let price = r.index_price; // when using this framework, we care for per-exchange price, obviously
134- // Ok(price)
135- //}
136- //
137- //#[serde_as]
138- //#[derive(Debug, Serialize, Deserialize, Clone)]
139- //#[serde(rename_all = "camelCase")]
140- //pub struct MarkPriceResponse {
141- // pub symbol: String,
142- // #[serde_as(as = "DisplayFromStr")]
143- // pub mark_price: f64,
144- // #[serde_as(as = "DisplayFromStr")]
145- // pub index_price: f64,
146- // #[serde_as(as = "DisplayFromStr")]
147- // pub estimated_settle_price: f64,
148- // #[serde_as(as = "DisplayFromStr")]
149- // pub last_funding_rate: f64,
150- // pub next_funding_time: u64,
151- // pub time: u64,
152- //}
153- //
154- ////,}}}
155-
156125#[ cfg( test) ]
157126mod tests {
158127 #[ test]
0 commit comments