use std::collections::HashMap;
use serde::{Deserialize, Serialize};
use serde_json::Value;
use strum_macros::{Display, EnumString};
#[derive(Serialize, Deserialize, Display, EnumString)]
pub enum MarketType {
Spot,
Futures,
Swap,
Option,
}
#[derive(Serialize, Deserialize)]
pub struct Fees {
pub maker: f64,
pub taker: f64,
}
#[derive(Serialize, Deserialize)]
pub struct Precision {
pub price: i64,
pub base: i64,
pub quote: Option<i64>,
}
#[derive(Serialize, Deserialize)]
pub struct MinQuantity {
pub base: Option<f64>,
pub quote: Option<f64>,
}
#[derive(Serialize, Deserialize)]
pub struct Market {
pub exchange: String,
pub market_type: MarketType,
pub id: String,
pub pair: String,
pub base: String,
pub quote: String,
pub base_id: String,
pub quote_id: String,
pub active: bool,
pub fees: Fees,
pub precision: Precision,
pub min_quantity: MinQuantity,
pub raw: HashMap<String, Value>,
}