pub struct ExchangeConfig {Show 18 fields
pub id: String,
pub name: String,
pub api_key: Option<SecretString>,
pub secret: Option<SecretString>,
pub password: Option<SecretString>,
pub uid: Option<String>,
pub account_id: Option<String>,
pub enable_rate_limit: bool,
pub rate_limit: u32,
pub timeout: Duration,
pub connect_timeout: Duration,
pub retry_policy: Option<RetryPolicy>,
pub sandbox: bool,
pub user_agent: Option<String>,
pub proxy: Option<ProxyConfig>,
pub verbose: bool,
pub options: HashMap<String, Value>,
pub url_overrides: HashMap<String, String>,
}Expand description
Exchange configuration
Fields§
§id: StringExchange identifier
name: StringExchange display name
api_key: Option<SecretString>API key for authentication (automatically zeroed on drop)
secret: Option<SecretString>API secret for authentication (automatically zeroed on drop)
password: Option<SecretString>Password (required by some exchanges, automatically zeroed on drop)
uid: Option<String>User ID (required by some exchanges)
account_id: Option<String>Account ID
enable_rate_limit: boolEnable rate limiting
rate_limit: u32Rate limit in requests per second
timeout: DurationRequest timeout (default: 30 seconds)
connect_timeout: DurationTCP connection timeout (default: 10 seconds)
retry_policy: Option<RetryPolicy>Retry policy
sandbox: boolEnable sandbox/testnet mode
user_agent: Option<String>Custom user agent string
proxy: Option<ProxyConfig>HTTP proxy configuration
verbose: boolEnable verbose logging
options: HashMap<String, Value>Custom exchange-specific options
url_overrides: HashMap<String, String>URL overrides for mocking/testing
Implementations§
Source§impl ExchangeConfig
impl ExchangeConfig
Sourcepub fn builder() -> ExchangeConfigBuilder
pub fn builder() -> ExchangeConfigBuilder
Create a new configuration builder
§Example
use ccxt_core::base_exchange::ExchangeConfig;
let config = ExchangeConfig::builder()
.id("binance")
.name("Binance")
.api_key("your-api-key")
.secret("your-secret")
.sandbox(true)
.build();Trait Implementations§
Source§impl Clone for ExchangeConfig
impl Clone for ExchangeConfig
Source§fn clone(&self) -> ExchangeConfig
fn clone(&self) -> ExchangeConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ExchangeConfig
impl Debug for ExchangeConfig
Auto Trait Implementations§
impl Freeze for ExchangeConfig
impl RefUnwindSafe for ExchangeConfig
impl Send for ExchangeConfig
impl Sync for ExchangeConfig
impl Unpin 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