Hi, I’m writing a client in Rust and all Endpoints seem to work, except this one:
GET /fapi/v1/lvtKlines
Anyone else with this issue? Does it work for you?
Hi, I’m writing a client in Rust and all Endpoints seem to work, except this one:
GET /fapi/v1/lvtKlines
Anyone else with this issue? Does it work for you?
Hey,
Could you provide more details on how you’re making the request? For example, which base URL are you using? What does the full URL request look like?
sure:
pub async fn get_fapi_v1_lvt_klines(&self, symbol:&str, interval:binance::Interval, start_time: impl Into <Option<u64>>, end_time: impl Into <Option<u64>>, limit: impl Into <Option<u16>>) -> Result<Vec<binance::get_fapi_v1_lvt_klines::Response>, reqwest::Error> {
let mut params:Vec<(&str, String)> = vec![];
params.push(("symbol", symbol.to_string()));
params.push(("interval", interval.to_string()));
if let Some(start_time) = start_time.into() {
params.push(("startTime", start_time.to_string()));
}
if let Some(end_time) = end_time.into() {
params.push(("endTime", end_time.to_string()));
}
if let Some(limit) = limit.into() {
params.push(("limit", limit.to_string()));
}
self
.deserialize(
self
.get("https://fapi.binance.com/fapi/v1/lvtKlines", params)
.await?)
.await
}
```rust
async fn get(&self, url:&str, params:impl Into <Option<Vec<(&str, String)>>>) -> Result<reqwest::Response, reqwest::Error> {
let Binance { client, .. } = self;
client
.get(url)
.header("X-MBX-APIKEY", &self.api_key)
.query(¶ms.into())
.send()
.await
}