pub mod futures;
use serde::{Deserialize, Serialize};
#[derive(Debug, Deserialize, Serialize)]
#[serde(untagged)]
pub enum SymbolFilter {
PriceFilter(PriceFilter),
PercentPrice(PercentPrice),
PercentPriceBySide(PercentPriceBySide),
LotSize(LotSize),
MinNotional(MinNotional),
Notional(Notional),
IcebergParts(IcebergParts),
MarketLotSize(MarketLotSize),
MaxNumOrders(MaxNumOrders),
MaxNumAlgoOrders(MaxNumAlgoOrders),
MaxNumIcebergOrders(MaxNumIcebergOrders),
MaxPosition(MaxPosition),
TrailingDelta(TrailingDelta),
}
#[derive(Debug, Deserialize, Serialize)]
#[serde(untagged)]
pub enum ExchangeFilter {
ExchangeMaxNumOrders(ExchangeMaxNumOrders),
ExchangeMaxNumAlgoOrders(ExchangeMaxNumAlgoOrders),
ExchangeMaxNumIcebergOrders(ExchangeMaxNumIcebergOrders),
}
#[derive(Debug, Serialize, Deserialize)]
pub struct PriceFilter {
filter_type: String,
min_price: String,
max_price: String,
tick_size: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct PercentPrice {
filter_type: String,
multiplier_up: String,
multiplier_down: String,
avg_price_mins: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct PercentPriceBySide {
filter_type: String,
bid_multiplier_up: String,
bid_multiplier_down: String,
ask_multiplier_up: String,
ask_multiplier_down: String,
avg_price_mins: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct LotSize {
filter_type: String,
min_notional: String,
apply_to_market: bool,
avg_price_mins: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct MinNotional {
filter_type: String,
min_notional: String,
apply_to_market: bool,
avg_price_mins: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Notional {
filter_type: String,
min_notional: String,
apply_min_to_market: bool,
max_notional: String,
apply_max_to_market: bool,
avg_price_mins: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct IcebergParts {
filter_type: String,
limit: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct MarketLotSize {
filter_type: String,
min_qty: String,
max_qty: String,
step_size: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct MaxNumOrders {
filter_type: String,
max_num_orders: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct MaxNumAlgoOrders {
filter_type: String,
max_num_algo_orders: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct MaxNumIcebergOrders {
filter_type: String,
max_num_iceberg_orders: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct MaxPosition {
filter_type: String,
max_position: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct TrailingDelta {
filter_type: String,
min_trailing_above_delta: i64,
max_trailing_above_delta: i64,
min_trailing_below_delta: i64,
max_trailing_below_delta: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ExchangeMaxNumAlgoOrders {
filter_type: String,
max_num_algo_orders: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ExchangeMaxNumOrders {
filter_type: String,
max_num_orders: i64,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct ExchangeMaxNumIcebergOrders {
filter_type: String,
max_num_iceberg_orders: i64,
}