pub struct BitmexExecutionClient { /* private fields */ }
Implementations§
Source§impl BitmexExecutionClient
impl BitmexExecutionClient
Sourcepub fn new(
core: ExecutionClientCore,
config: BitmexExecClientConfig,
) -> Result<Self>
pub fn new( core: ExecutionClientCore, config: BitmexExecClientConfig, ) -> Result<Self>
Creates a new BitmexExecutionClient
.
§Errors
Returns an error if either the HTTP or WebSocket client fail to construct.
Trait Implementations§
Source§impl Debug for BitmexExecutionClient
impl Debug for BitmexExecutionClient
Source§impl ExecutionClient for BitmexExecutionClient
impl ExecutionClient for BitmexExecutionClient
fn is_connected(&self) -> bool
fn client_id(&self) -> ClientId
fn account_id(&self) -> AccountId
fn venue(&self) -> Venue
fn oms_type(&self) -> OmsType
fn get_account(&self) -> Option<AccountAny>
Source§fn generate_account_state(
&self,
balances: Vec<AccountBalance>,
margins: Vec<MarginBalance>,
reported: bool,
ts_event: UnixNanos,
) -> Result<()>
fn generate_account_state( &self, balances: Vec<AccountBalance>, margins: Vec<MarginBalance>, reported: bool, ts_event: UnixNanos, ) -> Result<()>
Generates and publishes the account state event. Read more
Source§fn submit_order(&self, cmd: &SubmitOrder) -> Result<()>
fn submit_order(&self, cmd: &SubmitOrder) -> Result<()>
Submits a single order command to the execution venue. Read more
Source§fn submit_order_list(&self, cmd: &SubmitOrderList) -> Result<()>
fn submit_order_list(&self, cmd: &SubmitOrderList) -> Result<()>
Submits a list of orders to the execution venue. Read more
Source§fn modify_order(&self, cmd: &ModifyOrder) -> Result<()>
fn modify_order(&self, cmd: &ModifyOrder) -> Result<()>
Modifies an existing order. Read more
Source§fn cancel_order(&self, cmd: &CancelOrder) -> Result<()>
fn cancel_order(&self, cmd: &CancelOrder) -> Result<()>
Cancels a specific order. Read more
Source§fn cancel_all_orders(&self, cmd: &CancelAllOrders) -> Result<()>
fn cancel_all_orders(&self, cmd: &CancelAllOrders) -> Result<()>
Cancels all orders. Read more
Source§fn batch_cancel_orders(&self, cmd: &BatchCancelOrders) -> Result<()>
fn batch_cancel_orders(&self, cmd: &BatchCancelOrders) -> Result<()>
Cancels a batch of orders. Read more
Source§fn query_account(&self, _cmd: &QueryAccount) -> Result<()>
fn query_account(&self, _cmd: &QueryAccount) -> Result<()>
Queries the status of an account. Read more
Source§fn query_order(&self, cmd: &QueryOrder) -> Result<()>
fn query_order(&self, cmd: &QueryOrder) -> Result<()>
Queries the status of an order. Read more
Source§impl LiveExecutionClient for BitmexExecutionClient
impl LiveExecutionClient for BitmexExecutionClient
Source§fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn connect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Establishes a connection for live execution. Read more
Source§fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn disconnect<'life0, 'async_trait>(
&'life0 mut self,
) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Disconnects the live execution client. Read more
Source§fn generate_order_status_report<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 GenerateOrderStatusReport,
) -> Pin<Box<dyn Future<Output = Result<Option<OrderStatusReport>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_order_status_report<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 GenerateOrderStatusReport,
) -> Pin<Box<dyn Future<Output = Result<Option<OrderStatusReport>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generates a single order status report. Read more
Source§fn generate_order_status_reports<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 GenerateOrderStatusReport,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrderStatusReport>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_order_status_reports<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 GenerateOrderStatusReport,
) -> Pin<Box<dyn Future<Output = Result<Vec<OrderStatusReport>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generates multiple order status reports. Read more
Source§fn generate_fill_reports<'life0, 'async_trait>(
&'life0 self,
cmd: GenerateFillReports,
) -> Pin<Box<dyn Future<Output = Result<Vec<FillReport>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn generate_fill_reports<'life0, 'async_trait>(
&'life0 self,
cmd: GenerateFillReports,
) -> Pin<Box<dyn Future<Output = Result<Vec<FillReport>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
Generates fill reports based on execution results. Read more
Source§fn generate_position_status_reports<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 GeneratePositionReports,
) -> Pin<Box<dyn Future<Output = Result<Vec<PositionStatusReport>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn generate_position_status_reports<'life0, 'life1, 'async_trait>(
&'life0 self,
cmd: &'life1 GeneratePositionReports,
) -> Pin<Box<dyn Future<Output = Result<Vec<PositionStatusReport>>> + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Generates position status reports. Read more
Source§impl LiveExecutionClientExt for BitmexExecutionClient
impl LiveExecutionClientExt for BitmexExecutionClient
Source§fn get_message_channel(&self) -> UnboundedSender<ExecutionEvent>
fn get_message_channel(&self) -> UnboundedSender<ExecutionEvent>
Gets the message channel for sending execution events.
Source§fn send_order_event(&self, event: OrderEventAny)
fn send_order_event(&self, event: OrderEventAny)
Sends an order event to the execution engine.
Source§fn send_order_status_report(&self, report: OrderStatusReport)
fn send_order_status_report(&self, report: OrderStatusReport)
Sends an order status report to the execution engine.
Source§fn send_fill_report(&self, report: FillReport)
fn send_fill_report(&self, report: FillReport)
Sends a fill report to the execution engine.
Source§fn send_position_status_report(&self, report: PositionStatusReport)
fn send_position_status_report(&self, report: PositionStatusReport)
Sends a position status report to the execution engine.
Source§fn send_mass_status(&self, mass_status: ExecutionMassStatus)
fn send_mass_status(&self, mass_status: ExecutionMassStatus)
Sends a mass status report to the execution engine.
Auto Trait Implementations§
impl !Freeze for BitmexExecutionClient
impl !RefUnwindSafe for BitmexExecutionClient
impl !Send for BitmexExecutionClient
impl !Sync for BitmexExecutionClient
impl Unpin for BitmexExecutionClient
impl !UnwindSafe for BitmexExecutionClient
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left
is true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self
into a Left
variant of Either<Self, Self>
if into_left(&self)
returns true
.
Converts self
into a Right
variant of Either<Self, Self>
otherwise. Read more