pub struct ExchangeConfig {
pub name: String,
pub api_key: Option<String>,
pub api_secret: Option<String>,
pub testnet: bool,
pub rest_url: Option<String>,
pub ws_url: Option<String>,
pub rate_limit: RateLimitConfig,
}Expand description
Exchange connection configuration.
Configures connection parameters for a specific cryptocurrency exchange.
§Security Note
API secrets should never be committed to configuration files. Use environment variables instead:
VELORA_EXCHANGES_<NAME>_API_KEYVELORA_EXCHANGES_<NAME>_API_SECRET
§Example
[exchanges.binance]
name = "binance"
testnet = true
rate_limit.requests_per_second = 10
rate_limit.orders_per_second = 5Fields§
§name: StringExchange name (e.g., “binance”, “coinbase”)
api_key: Option<String>API key (optional for public data)
Env: VELORA_EXCHANGES_
api_secret: Option<String>API secret (optional for public data)
Env: VELORA_EXCHANGES_
testnet: boolUse testnet/sandbox environment
Env: VELORA_EXCHANGES_
rest_url: Option<String>Custom REST API URL (overrides default)
ws_url: Option<String>Custom WebSocket URL (overrides default)
rate_limit: RateLimitConfigRate limiting configuration
Trait Implementations§
Source§impl Clone for ExchangeConfig
impl Clone for ExchangeConfig
Source§impl Debug for ExchangeConfig
impl Debug for ExchangeConfig
Source§impl<'de> Deserialize<'de> for ExchangeConfig
impl<'de> Deserialize<'de> for ExchangeConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for ExchangeConfig
impl RefUnwindSafe for ExchangeConfig
impl Send for ExchangeConfig
impl Sync for ExchangeConfig
impl Unpin for ExchangeConfig
impl UnsafeUnpin for ExchangeConfig
impl UnwindSafe for ExchangeConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more