Trait ExecutionClient

Source
pub trait ExecutionClient {
Show 16 methods // Required methods 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>; fn generate_account_state( &self, balances: Vec<AccountBalance>, margins: Vec<MarginBalance>, reported: bool, ts_event: UnixNanos, ) -> Result<()>; fn start(&mut self) -> Result<()>; fn stop(&mut self) -> Result<()>; fn submit_order(&self, cmd: &SubmitOrder) -> Result<()>; fn submit_order_list(&self, cmd: &SubmitOrderList) -> Result<()>; fn modify_order(&self, cmd: &ModifyOrder) -> Result<()>; fn cancel_order(&self, cmd: &CancelOrder) -> Result<()>; fn cancel_all_orders(&self, cmd: &CancelAllOrders) -> Result<()>; fn batch_cancel_orders(&self, cmd: &BatchCancelOrders) -> Result<()>; fn query_order(&self, cmd: &QueryOrder) -> Result<()>;
}

Required Methods§

Source

fn is_connected(&self) -> bool

Source

fn client_id(&self) -> ClientId

Source

fn account_id(&self) -> AccountId

Source

fn venue(&self) -> Venue

Source

fn oms_type(&self) -> OmsType

Source

fn get_account(&self) -> Option<AccountAny>

Source

fn generate_account_state( &self, balances: Vec<AccountBalance>, margins: Vec<MarginBalance>, reported: bool, ts_event: UnixNanos, ) -> Result<()>

Generates and publishes the account state event.

§Errors

Returns an error if generating the account state fails.

Source

fn start(&mut self) -> Result<()>

Starts the execution client.

§Errors

Returns an error if the client fails to start.

Source

fn stop(&mut self) -> Result<()>

Stops the execution client.

§Errors

Returns an error if the client fails to stop.

Source

fn submit_order(&self, cmd: &SubmitOrder) -> Result<()>

Submits a single order command to the execution venue.

§Errors

Returns an error if submission fails.

Source

fn submit_order_list(&self, cmd: &SubmitOrderList) -> Result<()>

Submits a list of orders to the execution venue.

§Errors

Returns an error if submission fails.

Source

fn modify_order(&self, cmd: &ModifyOrder) -> Result<()>

Modifies an existing order.

§Errors

Returns an error if modification fails.

Source

fn cancel_order(&self, cmd: &CancelOrder) -> Result<()>

Cancels a specific order.

§Errors

Returns an error if cancellation fails.

Source

fn cancel_all_orders(&self, cmd: &CancelAllOrders) -> Result<()>

Cancels all orders.

§Errors

Returns an error if cancellation fails.

Source

fn batch_cancel_orders(&self, cmd: &BatchCancelOrders) -> Result<()>

Cancels a batch of orders.

§Errors

Returns an error if batch cancellation fails.

Source

fn query_order(&self, cmd: &QueryOrder) -> Result<()>

Queries the status of an order.

§Errors

Returns an error if the query fails.

Implementors§