use serde::Deserialize;
use std::collections::HashMap;
#[derive(Deserialize, Clone, Debug)]
pub struct Trade {
pub coin: String,
pub side: String,
pub px: String,
pub sz: String,
pub time: u64,
pub hash: String,
}
#[derive(Deserialize, Clone, Debug)]
pub struct BookLevel {
pub px: String,
pub sz: String,
pub n: u64,
}
#[derive(Deserialize, Clone, Debug)]
pub struct L2BookData {
pub coin: String,
pub time: u64,
pub levels: Vec<Vec<BookLevel>>,
}
#[derive(Deserialize, Clone, Debug)]
pub struct AllMidsData {
pub mids: HashMap<String, String>,
}
#[derive(Deserialize, Clone, Debug)]
#[serde(rename_all = "camelCase")]
pub struct TradeInfo {
pub coin: String,
pub side: String,
pub px: String,
pub sz: String,
pub time: u64,
pub hash: String,
pub start_position: String,
pub dir: String,
pub closed_pnl: String,
pub oid: u64,
pub crossed: bool,
pub fee: String,
}
#[derive(Deserialize, Clone, Debug)]
pub struct UserData {
pub fills: Vec<TradeInfo>,
}