pub struct OrderEmulator { /* private fields */ }
Implementations§
Source§impl OrderEmulator
impl OrderEmulator
pub fn new(clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>) -> Self
pub fn set_on_event_handler(&mut self, handler: ShareableMessageHandler)
pub fn subscribed_quotes(&self) -> Vec<InstrumentId>
pub fn subscribed_trades(&self) -> Vec<InstrumentId>
pub fn get_submit_order_commands(&self) -> HashMap<ClientOrderId, SubmitOrder>
pub fn get_matching_core( &self, instrument_id: &InstrumentId, ) -> Option<OrderMatchingCore>
pub fn on_event(&mut self, event: OrderEventAny)
pub const fn on_stop(&self)
pub fn on_reset(&mut self)
pub const fn on_dispose(&self)
pub fn execute(&mut self, command: TradingCommand)
Sourcepub fn handle_submit_order(&mut self, command: SubmitOrder)
pub fn handle_submit_order(&mut self, command: SubmitOrder)
§Panics
Panics if the emulation trigger type is NoTrigger
.
pub fn handle_cancel_order(&mut self, command: CancelOrder)
pub fn update_order(&mut self, order: &mut OrderAny, new_quantity: Quantity)
pub fn on_order_book_deltas(&mut self, deltas: OrderBookDeltas)
pub fn on_quote_tick(&mut self, quote: QuoteTick)
pub fn on_trade_tick(&mut self, trade: TradeTick)
pub fn cancel_order(&mut self, order: &OrderAny)
Sourcepub fn trigger_stop_order(&mut self, order: &mut OrderAny)
pub fn trigger_stop_order(&mut self, order: &mut OrderAny)
§Panics
Panics if the order type is invalid for a stop order.
Sourcepub fn fill_limit_order(&mut self, order: &mut OrderAny)
pub fn fill_limit_order(&mut self, order: &mut OrderAny)
§Panics
Panics if a limit order has no price.
Sourcepub fn fill_market_order(&mut self, order: &mut OrderAny)
pub fn fill_market_order(&mut self, order: &mut OrderAny)
§Panics
Panics if a market order command is missing.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for OrderEmulator
impl !RefUnwindSafe for OrderEmulator
impl !Send for OrderEmulator
impl !Sync for OrderEmulator
impl Unpin for OrderEmulator
impl !UnwindSafe for OrderEmulator
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