pub struct BitgetBuilder { /* private fields */ }Expand description
Builder for creating Bitget exchange instances.
Provides a fluent API for configuring all aspects of the Bitget exchange, including authentication, connection settings, and Bitget-specific options.
§Example
use ccxt_exchanges::bitget::BitgetBuilder;
let bitget = BitgetBuilder::new()
.api_key("your-api-key")
.secret("your-secret")
.passphrase("your-passphrase")
.sandbox(true)
.timeout(30)
.build()
.unwrap();Implementations§
Source§impl BitgetBuilder
impl BitgetBuilder
Sourcepub fn new() -> BitgetBuilder
pub fn new() -> BitgetBuilder
Creates a new builder with default configuration.
§Example
use ccxt_exchanges::bitget::BitgetBuilder;
let builder = BitgetBuilder::new();Sourcepub fn api_key(self, key: impl Into<String>) -> BitgetBuilder
pub fn api_key(self, key: impl Into<String>) -> BitgetBuilder
Sourcepub fn secret(self, secret: impl Into<String>) -> BitgetBuilder
pub fn secret(self, secret: impl Into<String>) -> BitgetBuilder
Sourcepub fn passphrase(self, passphrase: impl Into<String>) -> BitgetBuilder
pub fn passphrase(self, passphrase: impl Into<String>) -> BitgetBuilder
Sets the passphrase for authentication.
Bitget requires a passphrase in addition to API key and secret.
§Arguments
passphrase- The passphrase string.
Sourcepub fn sandbox(self, enabled: bool) -> BitgetBuilder
pub fn sandbox(self, enabled: bool) -> BitgetBuilder
Enables or disables sandbox/demo mode.
When enabled, the exchange will connect to Bitget’s demo environment instead of the production environment.
§Arguments
enabled- Whether to enable sandbox mode.
Sourcepub fn product_type(self, product_type: impl Into<String>) -> BitgetBuilder
pub fn product_type(self, product_type: impl Into<String>) -> BitgetBuilder
Sets the product type for trading.
Valid values: “spot”, “umcbl” (USDT-M futures), “dmcbl” (Coin-M futures).
§Arguments
product_type- The product type string.
Sourcepub fn timeout(self, seconds: u64) -> BitgetBuilder
pub fn timeout(self, seconds: u64) -> BitgetBuilder
Sourcepub fn recv_window(self, millis: u64) -> BitgetBuilder
pub fn recv_window(self, millis: u64) -> BitgetBuilder
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 enable_rate_limit(self, enabled: bool) -> BitgetBuilder
pub fn enable_rate_limit(self, enabled: bool) -> BitgetBuilder
Sourcepub fn proxy(self, proxy: impl Into<String>) -> BitgetBuilder
pub fn proxy(self, proxy: impl Into<String>) -> BitgetBuilder
Sourcepub fn verbose(self, enabled: bool) -> BitgetBuilder
pub fn verbose(self, enabled: bool) -> BitgetBuilder
Trait Implementations§
Source§impl Clone for BitgetBuilder
impl Clone for BitgetBuilder
Source§fn clone(&self) -> BitgetBuilder
fn clone(&self) -> BitgetBuilder
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more