use crate::client::BitgetClient;
use anyhow::Result;
use serde::Deserialize;
use std::collections::BTreeMap;
#[derive(Debug, Deserialize)]
pub struct FillResp {
pub trade_id: Option<String>,
pub order_id: Option<String>,
pub price: Option<String>,
pub size: Option<String>,
}
impl BitgetClient {
pub fn get_fills(&self, symbol: &str, order_id: &str) -> Result<String> {
let mut params = BTreeMap::new();
params.insert("symbol".to_string(), symbol.to_string());
params.insert("orderId".to_string(), order_id.to_string());
self.request(
crate::consts::GET,
"/api/mix/v1/order/fills",
¶ms,
false,
)
}
}