pub struct BithumbExchange { /* private fields */ }Expand description
Bithumb exchange implementation with enhanced error handling and configuration
Implementations§
Source§impl BithumbExchange
impl BithumbExchange
Sourcepub fn get_health_metrics(&self) -> (bool, HttpRequestMetrics)
pub fn get_health_metrics(&self) -> (bool, HttpRequestMetrics)
Get connection status and HTTP request metrics
Sourcepub const fn get_config(&self) -> &BithumbConfig
pub const fn get_config(&self) -> &BithumbConfig
Get current configuration
Sourcepub fn supports_symbol(&self, symbol: &str) -> bool
pub fn supports_symbol(&self, symbol: &str) -> bool
Check if exchange supports the given symbol
Sourcepub fn get_min_order_amount(&self, symbol: &str) -> Option<u64>
pub fn get_min_order_amount(&self, symbol: &str) -> Option<u64>
Get minimum order amount for symbol
Sourcepub fn new(api_key: String, secret_key: String) -> Self
pub fn new(api_key: String, secret_key: String) -> Self
Create a new Bithumb exchange instance with default configuration
§Panics
Panics if the exchange cannot be initialized (e.g., HTTP client creation fails).
Use try_new for a non-panicking alternative.
Sourcepub fn try_new(api_key: String, secret_key: String) -> BithumbResult<Self>
pub fn try_new(api_key: String, secret_key: String) -> BithumbResult<Self>
Try to create a new Bithumb exchange instance with default configuration
This is the fallible version of new() that returns a Result instead of panicking.
Sourcepub fn with_config(
api_key: String,
secret_key: String,
config: BithumbConfig,
) -> BithumbResult<Self>
pub fn with_config( api_key: String, secret_key: String, config: BithumbConfig, ) -> BithumbResult<Self>
Create a new Bithumb exchange instance with custom configuration
Sourcepub fn high_frequency(
api_key: String,
secret_key: String,
) -> BithumbResult<Self>
pub fn high_frequency( api_key: String, secret_key: String, ) -> BithumbResult<Self>
Create a new Bithumb exchange instance for high-frequency trading
Trait Implementations§
Source§impl Clone for BithumbExchange
impl Clone for BithumbExchange
Source§fn clone(&self) -> BithumbExchange
fn clone(&self) -> BithumbExchange
Returns a duplicate of the value. Read more
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for BithumbExchange
impl Debug for BithumbExchange
Source§impl Exchange for BithumbExchange
impl Exchange for BithumbExchange
Source§fn place_order<'life0, 'async_trait>(
&'life0 self,
order: Order,
report_tx: Sender<ExecutionReport>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn place_order<'life0, 'async_trait>(
&'life0 self,
order: Order,
report_tx: Sender<ExecutionReport>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Places a new order on the exchange
Source§fn cancel_order<'life0, 'async_trait>(
&'life0 self,
order_id: SmartString,
report_tx: Sender<ExecutionReport>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_order<'life0, 'async_trait>(
&'life0 self,
order_id: SmartString,
report_tx: Sender<ExecutionReport>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cancels an existing order
Source§fn modify_order<'life0, 'async_trait>(
&'life0 self,
_order_id: SmartString,
_new_price: Option<Decimal>,
_new_quantity: Option<Decimal>,
_report_tx: Sender<ExecutionReport>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn modify_order<'life0, 'async_trait>(
&'life0 self,
_order_id: SmartString,
_new_price: Option<Decimal>,
_new_quantity: Option<Decimal>,
_report_tx: Sender<ExecutionReport>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Modifies an existing order
Source§fn cancel_all_orders<'life0, 'async_trait>(
&'life0 self,
_instrument_id: Option<InstrumentId>,
_report_tx: Sender<ExecutionReport>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn cancel_all_orders<'life0, 'async_trait>(
&'life0 self,
_instrument_id: Option<InstrumentId>,
_report_tx: Sender<ExecutionReport>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Cancels all open orders, optionally filtered by instrument
Source§fn get_order_status<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OrderStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_order_status<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OrderStatus>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Retrieves the status of an order
Source§fn connect<'life0, 'async_trait>(
&'life0 self,
_report_sender: Sender<ExecutionReport>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 self,
_report_sender: Sender<ExecutionReport>,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Connects to the exchange
Source§fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Disconnects from the exchange
Source§fn is_connected<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn is_connected<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = bool> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Checks if connected to the exchange
Source§fn get_instruments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SmallVec<[InstrumentId; 32]>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_instruments<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<SmallVec<[InstrumentId; 32]>>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Gets a list of instruments supported by this exchange
Auto Trait Implementations§
impl Freeze for BithumbExchange
impl !RefUnwindSafe for BithumbExchange
impl Send for BithumbExchange
impl Sync for BithumbExchange
impl Unpin for BithumbExchange
impl !UnwindSafe for BithumbExchange
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