pub struct BinanceExchange {
pub api_key: String,
pub secret_key: String,
/* private fields */
}Expand description
Binance exchange implementation
Fields§
§api_key: StringAPI key for authentication
secret_key: StringSecret key for signing requests
Implementations§
Source§impl BinanceExchange
impl BinanceExchange
Sourcepub fn new(api_key: String, secret_key: String) -> BinanceExchange
pub fn new(api_key: String, secret_key: String) -> BinanceExchange
Create a new Binance exchange instance
Sourcepub fn with_api_url(self, api_url: String) -> BinanceExchange
pub fn with_api_url(self, api_url: String) -> BinanceExchange
Create a new Binance exchange with custom API URL
Sourcepub fn enable_websocket(&self, enable: bool)
pub fn enable_websocket(&self, enable: bool)
Enable WebSocket trading
Sourcepub async fn websocket_client(
&self,
) -> Result<&BinanceWebSocketTradingClient, String>
pub async fn websocket_client( &self, ) -> Result<&BinanceWebSocketTradingClient, String>
Get WebSocket client for advanced usage
Trait Implementations§
Source§impl Exchange for BinanceExchange
impl Exchange for BinanceExchange
Source§fn send_order<'life0, 'async_trait>(
&'life0 self,
order: Order,
) -> Pin<Box<dyn Future<Output = Result<(), OmsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
BinanceExchange: 'async_trait,
fn send_order<'life0, 'async_trait>(
&'life0 self,
order: Order,
) -> Pin<Box<dyn Future<Output = Result<(), OmsError>> + Send + 'async_trait>>where
'life0: 'async_trait,
BinanceExchange: 'async_trait,
Send an order to the exchange
Auto Trait Implementations§
impl Freeze for BinanceExchange
impl !RefUnwindSafe for BinanceExchange
impl Send for BinanceExchange
impl Sync for BinanceExchange
impl Unpin for BinanceExchange
impl !UnwindSafe for BinanceExchange
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