pub struct CCXTBroker { /* private fields */ }Expand description
CCXT broker client supporting multiple exchanges
Implementations§
Source§impl CCXTBroker
impl CCXTBroker
Sourcepub fn new(config: CCXTConfig) -> Result<Self, BrokerError>
pub fn new(config: CCXTConfig) -> Result<Self, BrokerError>
Create a new CCXT broker for a specific exchange
Trait Implementations§
Source§impl BrokerClient for CCXTBroker
impl BrokerClient for CCXTBroker
Source§fn get_account<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Account, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_account<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Account, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get account information
Source§fn get_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Position>, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn get_positions<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<Vec<Position>, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Get current positions
Source§fn place_order<'life0, 'async_trait>(
&'life0 self,
order: OrderRequest,
) -> Pin<Box<dyn Future<Output = Result<OrderResponse, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn place_order<'life0, 'async_trait>(
&'life0 self,
order: OrderRequest,
) -> Pin<Box<dyn Future<Output = Result<OrderResponse, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Place an order
Source§fn cancel_order<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn cancel_order<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<(), BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Cancel an order
Source§fn get_order<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OrderResponse, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn get_order<'life0, 'life1, 'async_trait>(
&'life0 self,
order_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<OrderResponse, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Get order status
Source§fn list_orders<'life0, 'async_trait>(
&'life0 self,
_filter: OrderFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrderResponse>, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn list_orders<'life0, 'async_trait>(
&'life0 self,
_filter: OrderFilter,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrderResponse>, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
List all orders with optional filter
Source§fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn health_check<'life0, 'async_trait>(
&'life0 self,
) -> Pin<Box<dyn Future<Output = Result<HealthStatus, BrokerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Health check
Auto Trait Implementations§
impl Freeze for CCXTBroker
impl !RefUnwindSafe for CCXTBroker
impl Send for CCXTBroker
impl Sync for CCXTBroker
impl Unpin for CCXTBroker
impl !UnwindSafe for CCXTBroker
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