rusty_bin/monitor/config/exchange.rs
1//! Exchange-related configuration
2use serde::{Deserialize, Serialize};
3use smartstring::alias::String;
4
5/// Exchange configuration container
6#[derive(Debug, Clone, Serialize, Deserialize)]
7pub struct ExchangesConfig {
8 /// List of enabled exchange names
9 pub enabled_exchanges: Vec<String>,
10 /// Binance exchange configuration
11 pub binance: Option<ExchangeConfig>,
12 /// Upbit exchange configuration
13 pub upbit: Option<ExchangeConfig>,
14 /// Bybit exchange configuration
15 pub bybit: Option<ExchangeConfig>,
16 /// Coinbase exchange configuration
17 pub coinbase: Option<ExchangeConfig>,
18 /// Bithumb exchange configuration
19 pub bithumb: Option<ExchangeConfig>,
20}
21
22/// Individual exchange configuration
23#[derive(Debug, Clone, Serialize, Deserialize)]
24pub struct ExchangeConfig {
25 /// Whether this exchange is enabled
26 pub enabled: bool,
27 /// Whether spot trading is enabled for this exchange
28 pub spot_enabled: Option<bool>,
29 /// Whether futures trading is enabled for this exchange
30 pub futures_enabled: Option<bool>,
31 /// Maximum number of symbols to monitor for this exchange
32 pub max_symbols: usize,
33 /// Rate limit per second for this exchange
34 pub rate_limit_per_second: u32,
35 /// Delay in milliseconds before reconnecting on failure
36 pub reconnect_delay_ms: u64,
37 /// Maximum number of reconnection attempts
38 pub max_reconnect_attempts: u32,
39 /// List of symbols to specifically include (empty means all)
40 pub include_symbols: Vec<String>,
41 /// List of symbols to exclude
42 pub exclude_symbols: Vec<String>,
43}