pub struct BybitBuilder { /* private fields */ }Expand description
Builder for creating Bybit exchange instances.
Provides a fluent API for configuring all aspects of the Bybit exchange, including authentication, connection settings, and Bybit-specific options.
§Example
use ccxt_exchanges::bybit::BybitBuilder;
let bybit = BybitBuilder::new()
.api_key("your-api-key")
.secret("your-secret")
.testnet(true)
.timeout(30)
.build()
.unwrap();Implementations§
Source§impl BybitBuilder
impl BybitBuilder
Sourcepub fn new() -> BybitBuilder
pub fn new() -> BybitBuilder
Creates a new builder with default configuration.
§Example
use ccxt_exchanges::bybit::BybitBuilder;
let builder = BybitBuilder::new();Sourcepub fn api_key(self, key: impl Into<String>) -> BybitBuilder
pub fn api_key(self, key: impl Into<String>) -> BybitBuilder
Sourcepub fn secret(self, secret: impl Into<String>) -> BybitBuilder
pub fn secret(self, secret: impl Into<String>) -> BybitBuilder
Sourcepub fn testnet(self, enabled: bool) -> BybitBuilder
pub fn testnet(self, enabled: bool) -> BybitBuilder
Enables or disables testnet mode.
When enabled, the exchange will connect to Bybit’s testnet environment instead of the production environment.
§Arguments
enabled- Whether to enable testnet mode.
Sourcepub fn account_type(self, account_type: impl Into<String>) -> BybitBuilder
pub fn account_type(self, account_type: impl Into<String>) -> BybitBuilder
Sets the account type for trading.
Valid values: “UNIFIED”, “CONTRACT”, “SPOT”.
§Arguments
account_type- The account type string.
Sourcepub fn recv_window(self, millis: u64) -> BybitBuilder
pub fn recv_window(self, millis: u64) -> BybitBuilder
Sets the receive window for signed requests.
The receive window specifies how long a request is valid after the timestamp. Default is 5000 milliseconds.
§Arguments
millis- Receive window in milliseconds.
Sourcepub fn timeout(self, seconds: u64) -> BybitBuilder
pub fn timeout(self, seconds: u64) -> BybitBuilder
Sourcepub fn enable_rate_limit(self, enabled: bool) -> BybitBuilder
pub fn enable_rate_limit(self, enabled: bool) -> BybitBuilder
Sourcepub fn proxy(self, proxy: impl Into<String>) -> BybitBuilder
pub fn proxy(self, proxy: impl Into<String>) -> BybitBuilder
Sourcepub fn verbose(self, enabled: bool) -> BybitBuilder
pub fn verbose(self, enabled: bool) -> BybitBuilder
Trait Implementations§
Source§impl Clone for BybitBuilder
impl Clone for BybitBuilder
Source§fn clone(&self) -> BybitBuilder
fn clone(&self) -> BybitBuilder
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 BybitBuilder
impl Debug for BybitBuilder
Source§impl Default for BybitBuilder
impl Default for BybitBuilder
Source§fn default() -> BybitBuilder
fn default() -> BybitBuilder
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for BybitBuilder
impl RefUnwindSafe for BybitBuilder
impl Send for BybitBuilder
impl Sync for BybitBuilder
impl Unpin for BybitBuilder
impl UnwindSafe for BybitBuilder
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