pub struct TwapAlgorithm {
pub core: ExecutionAlgorithmCore,
/* private fields */
}Expand description
Time-Weighted Average Price (TWAP) execution algorithm.
Executes orders by evenly spreading them over a specified time horizon, at regular intervals. The algorithm receives a primary order and spawns smaller child orders that are executed at regular intervals.
Fields§
§core: ExecutionAlgorithmCoreThe algorithm core.
Implementations§
Source§impl TwapAlgorithm
impl TwapAlgorithm
Sourcepub fn new(config: TwapAlgorithmConfig) -> Self
pub fn new(config: TwapAlgorithmConfig) -> Self
Creates a new TwapAlgorithm instance.
Methods from Deref<Target = DataActorCore>§
Sourcepub fn mem_address(&self) -> String
pub fn mem_address(&self) -> String
Returns the memory address of this instance as a hexadecimal string.
Sourcepub fn state(&self) -> ComponentState
pub fn state(&self) -> ComponentState
Returns the actors state.
Sourcepub fn timestamp_ns(&self) -> UnixNanos
pub fn timestamp_ns(&self) -> UnixNanos
Returns a UNIX nanoseconds timestamp from the actor’s internal clock.
Sourcepub fn clock(&mut self) -> RefMut<'_, dyn Clock + 'static>
pub fn clock(&mut self) -> RefMut<'_, dyn Clock + 'static>
Returns the clock for the actor (if registered).
§Panics
Panics if the actor has not been registered with a trader.
Sourcepub fn clock_rc(&self) -> Rc<RefCell<dyn Clock>>
pub fn clock_rc(&self) -> Rc<RefCell<dyn Clock>>
Returns a clone of the reference-counted clock.
§Panics
Panics if the actor has not yet been registered (clock is None).
Sourcepub fn cache(&self) -> Ref<'_, Cache>
pub fn cache(&self) -> Ref<'_, Cache>
Returns a read-only reference to the cache.
§Panics
Panics if the actor has not yet been registered (cache is None).
Sourcepub fn cache_rc(&self) -> Rc<RefCell<Cache>>
pub fn cache_rc(&self) -> Rc<RefCell<Cache>>
Returns a clone of the reference-counted cache.
§Panics
Panics if the actor has not yet been registered (cache is None).
Sourcepub fn register(
&mut self,
trader_id: TraderId,
clock: Rc<RefCell<dyn Clock>>,
cache: Rc<RefCell<Cache>>,
) -> Result<(), Error>
pub fn register( &mut self, trader_id: TraderId, clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, ) -> Result<(), Error>
Register the data actor with a trader.
§Errors
Returns an error if the actor has already been registered with a trader or if the provided dependencies are invalid.
Sourcepub fn register_warning_event(&mut self, event_type: &str)
pub fn register_warning_event(&mut self, event_type: &str)
Register an event type for warning log levels.
Sourcepub fn deregister_warning_event(&mut self, event_type: &str)
pub fn deregister_warning_event(&mut self, event_type: &str)
Deregister an event type from warning log levels.
pub fn is_registered(&self) -> bool
Sourcepub fn shutdown_system(&self, reason: Option<String>)
pub fn shutdown_system(&self, reason: Option<String>)
Sends a shutdown command to the system with an optional reason.
§Panics
Panics if the actor is not registered or has no trader ID.
Sourcepub fn subscribe_data(
&mut self,
handler: TypedHandler<dyn Any>,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_data( &mut self, handler: TypedHandler<dyn Any>, data_type: DataType, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering data subscriptions from the trait.
§Panics
Panics if the actor is not properly registered.
Sourcepub fn subscribe_quotes(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<QuoteTick>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_quotes( &mut self, topic: MStr<Topic>, handler: TypedHandler<QuoteTick>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering quotes subscriptions from the trait.
Sourcepub fn subscribe_instruments(
&mut self,
pattern: MStr<Pattern>,
handler: TypedHandler<dyn Any>,
venue: Venue,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_instruments( &mut self, pattern: MStr<Pattern>, handler: TypedHandler<dyn Any>, venue: Venue, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering instruments subscriptions from the trait.
Sourcepub fn subscribe_instrument(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<dyn Any>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_instrument( &mut self, topic: MStr<Topic>, handler: TypedHandler<dyn Any>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering instrument subscriptions from the trait.
Sourcepub fn subscribe_book_deltas(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<OrderBookDeltas>,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
managed: bool,
params: Option<Params>,
)
pub fn subscribe_book_deltas( &mut self, topic: MStr<Topic>, handler: TypedHandler<OrderBookDeltas>, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, managed: bool, params: Option<Params>, )
Helper method for registering book deltas subscriptions from the trait.
Sourcepub fn subscribe_book_at_interval(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<OrderBook>,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZero<usize>>,
interval_ms: NonZero<usize>,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_book_at_interval( &mut self, topic: MStr<Topic>, handler: TypedHandler<OrderBook>, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, interval_ms: NonZero<usize>, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering book snapshots subscriptions from the trait.
Sourcepub fn subscribe_trades(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<TradeTick>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_trades( &mut self, topic: MStr<Topic>, handler: TypedHandler<TradeTick>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering trades subscriptions from the trait.
Sourcepub fn subscribe_bars(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<Bar>,
bar_type: BarType,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_bars( &mut self, topic: MStr<Topic>, handler: TypedHandler<Bar>, bar_type: BarType, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering bars subscriptions from the trait.
Sourcepub fn subscribe_mark_prices(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<MarkPriceUpdate>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_mark_prices( &mut self, topic: MStr<Topic>, handler: TypedHandler<MarkPriceUpdate>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering mark prices subscriptions from the trait.
Sourcepub fn subscribe_index_prices(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<IndexPriceUpdate>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_index_prices( &mut self, topic: MStr<Topic>, handler: TypedHandler<IndexPriceUpdate>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering index prices subscriptions from the trait.
Sourcepub fn subscribe_funding_rates(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<FundingRateUpdate>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_funding_rates( &mut self, topic: MStr<Topic>, handler: TypedHandler<FundingRateUpdate>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering funding rates subscriptions from the trait.
Sourcepub fn subscribe_option_greeks(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<OptionGreeks>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_option_greeks( &mut self, topic: MStr<Topic>, handler: TypedHandler<OptionGreeks>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering option greeks subscriptions from the trait.
Sourcepub fn subscribe_instrument_status(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<dyn Any>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_instrument_status( &mut self, topic: MStr<Topic>, handler: TypedHandler<dyn Any>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering instrument status subscriptions from the trait.
Sourcepub fn subscribe_instrument_close(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<dyn Any>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_instrument_close( &mut self, topic: MStr<Topic>, handler: TypedHandler<dyn Any>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for registering instrument close subscriptions from the trait.
Sourcepub fn subscribe_option_chain(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<OptionChainSlice>,
series_id: OptionSeriesId,
strike_range: StrikeRange,
snapshot_interval_ms: Option<u64>,
client_id: Option<ClientId>,
)
pub fn subscribe_option_chain( &mut self, topic: MStr<Topic>, handler: TypedHandler<OptionChainSlice>, series_id: OptionSeriesId, strike_range: StrikeRange, snapshot_interval_ms: Option<u64>, client_id: Option<ClientId>, )
Helper method for subscribing to option chain snapshots from the trait.
Sourcepub fn subscribe_order_fills(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<OrderEventAny>,
)
pub fn subscribe_order_fills( &mut self, topic: MStr<Topic>, handler: TypedHandler<OrderEventAny>, )
Helper method for registering order fills subscriptions from the trait.
Sourcepub fn subscribe_order_cancels(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<OrderEventAny>,
)
pub fn subscribe_order_cancels( &mut self, topic: MStr<Topic>, handler: TypedHandler<OrderEventAny>, )
Helper method for registering order cancels subscriptions from the trait.
Sourcepub fn unsubscribe_data(
&mut self,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_data( &mut self, data_type: DataType, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from data.
Sourcepub fn unsubscribe_instruments(
&mut self,
venue: Venue,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_instruments( &mut self, venue: Venue, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from instruments.
Sourcepub fn unsubscribe_instrument(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_instrument( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from instrument.
Sourcepub fn unsubscribe_book_deltas(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_book_deltas( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from book deltas.
Sourcepub fn unsubscribe_book_at_interval(
&mut self,
instrument_id: InstrumentId,
interval_ms: NonZero<usize>,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_book_at_interval( &mut self, instrument_id: InstrumentId, interval_ms: NonZero<usize>, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from book snapshots at interval.
Sourcepub fn unsubscribe_quotes(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_quotes( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from quotes.
Sourcepub fn unsubscribe_trades(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_trades( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from trades.
Sourcepub fn unsubscribe_bars(
&mut self,
bar_type: BarType,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from bars.
Sourcepub fn unsubscribe_mark_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_mark_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from mark prices.
Sourcepub fn unsubscribe_index_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_index_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from index prices.
Sourcepub fn unsubscribe_funding_rates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_funding_rates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from funding rates.
Sourcepub fn unsubscribe_option_greeks(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_option_greeks( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from option greeks.
Sourcepub fn unsubscribe_instrument_status(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_instrument_status( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from instrument status.
Sourcepub fn unsubscribe_instrument_close(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_instrument_close( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Helper method for unsubscribing from instrument close.
Sourcepub fn unsubscribe_option_chain(
&mut self,
series_id: OptionSeriesId,
client_id: Option<ClientId>,
)
pub fn unsubscribe_option_chain( &mut self, series_id: OptionSeriesId, client_id: Option<ClientId>, )
Helper method for unsubscribing from option chain snapshots.
Sourcepub fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
pub fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
Helper method for unsubscribing from order fills.
Sourcepub fn unsubscribe_order_cancels(&mut self, instrument_id: InstrumentId)
pub fn unsubscribe_order_cancels(&mut self, instrument_id: InstrumentId)
Helper method for unsubscribing from order cancels.
Sourcepub fn request_data(
&self,
data_type: DataType,
client_id: ClientId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_data( &self, data_type: DataType, client_id: ClientId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
Sourcepub fn request_instrument(
&self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_instrument( &self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
Sourcepub fn request_instruments(
&self,
venue: Option<Venue>,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_instruments( &self, venue: Option<Venue>, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
Sourcepub fn request_book_snapshot(
&self,
instrument_id: InstrumentId,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_book_snapshot( &self, instrument_id: InstrumentId, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
Helper method for requesting book snapshot.
§Errors
Returns an error if input parameters are invalid.
Sourcepub fn request_quotes(
&self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_quotes( &self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
Sourcepub fn request_trades(
&self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_trades( &self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
Sourcepub fn request_funding_rates(
&self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_funding_rates( &self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
Helper method for requesting funding rates.
§Errors
Returns an error if input parameters are invalid.
Trait Implementations§
Source§impl DataActor for TwapAlgorithm
impl DataActor for TwapAlgorithm
Source§fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>, Error>
fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>, Error>
Source§fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<(), Error>
fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<(), Error>
Source§fn on_time_event(&mut self, event: &TimeEvent) -> Result<(), Error>
fn on_time_event(&mut self, event: &TimeEvent) -> Result<(), Error>
Source§fn on_data(&mut self, data: &CustomData) -> Result<(), Error>
fn on_data(&mut self, data: &CustomData) -> Result<(), Error>
Source§fn on_signal(&mut self, signal: &Signal) -> Result<(), Error>
fn on_signal(&mut self, signal: &Signal) -> Result<(), Error>
Source§fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<(), Error>
fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<(), Error>
Source§fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<(), Error>
fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<(), Error>
Source§fn on_book(&mut self, order_book: &OrderBook) -> Result<(), Error>
fn on_book(&mut self, order_book: &OrderBook) -> Result<(), Error>
Source§fn on_quote(&mut self, quote: &QuoteTick) -> Result<(), Error>
fn on_quote(&mut self, quote: &QuoteTick) -> Result<(), Error>
Source§fn on_trade(&mut self, tick: &TradeTick) -> Result<(), Error>
fn on_trade(&mut self, tick: &TradeTick) -> Result<(), Error>
Source§fn on_bar(&mut self, bar: &Bar) -> Result<(), Error>
fn on_bar(&mut self, bar: &Bar) -> Result<(), Error>
Source§fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<(), Error>
fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<(), Error>
Source§fn on_index_price(
&mut self,
index_price: &IndexPriceUpdate,
) -> Result<(), Error>
fn on_index_price( &mut self, index_price: &IndexPriceUpdate, ) -> Result<(), Error>
Source§fn on_funding_rate(
&mut self,
funding_rate: &FundingRateUpdate,
) -> Result<(), Error>
fn on_funding_rate( &mut self, funding_rate: &FundingRateUpdate, ) -> Result<(), Error>
Source§fn on_option_greeks(&mut self, greeks: &OptionGreeks) -> Result<(), Error>
fn on_option_greeks(&mut self, greeks: &OptionGreeks) -> Result<(), Error>
Source§fn on_option_chain(&mut self, slice: &OptionChainSlice) -> Result<(), Error>
fn on_option_chain(&mut self, slice: &OptionChainSlice) -> Result<(), Error>
Source§fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<(), Error>
fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<(), Error>
Source§fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<(), Error>
fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<(), Error>
Source§fn on_order_filled(&mut self, event: &OrderFilled) -> Result<(), Error>
fn on_order_filled(&mut self, event: &OrderFilled) -> Result<(), Error>
Source§fn on_order_canceled(&mut self, event: &OrderCanceled) -> Result<(), Error>
fn on_order_canceled(&mut self, event: &OrderCanceled) -> Result<(), Error>
Source§fn on_historical_data(
&mut self,
data: &(dyn Any + 'static),
) -> Result<(), Error>
fn on_historical_data( &mut self, data: &(dyn Any + 'static), ) -> Result<(), Error>
Source§fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<(), Error>
fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<(), Error>
Source§fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<(), Error>
fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<(), Error>
Source§fn on_historical_funding_rates(
&mut self,
funding_rates: &[FundingRateUpdate],
) -> Result<(), Error>
fn on_historical_funding_rates( &mut self, funding_rates: &[FundingRateUpdate], ) -> Result<(), Error>
Source§fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<(), Error>
fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<(), Error>
Source§fn on_historical_mark_prices(
&mut self,
mark_prices: &[MarkPriceUpdate],
) -> Result<(), Error>
fn on_historical_mark_prices( &mut self, mark_prices: &[MarkPriceUpdate], ) -> Result<(), Error>
Source§fn on_historical_index_prices(
&mut self,
index_prices: &[IndexPriceUpdate],
) -> Result<(), Error>
fn on_historical_index_prices( &mut self, index_prices: &[IndexPriceUpdate], ) -> Result<(), Error>
Source§fn handle_time_event(&mut self, event: &TimeEvent)
fn handle_time_event(&mut self, event: &TimeEvent)
Source§fn handle_data(&mut self, data: &CustomData)
fn handle_data(&mut self, data: &CustomData)
Source§fn handle_signal(&mut self, signal: &Signal)
fn handle_signal(&mut self, signal: &Signal)
Source§fn handle_instrument(&mut self, instrument: &InstrumentAny)
fn handle_instrument(&mut self, instrument: &InstrumentAny)
Source§fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)
fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)
Source§fn handle_book(&mut self, book: &OrderBook)
fn handle_book(&mut self, book: &OrderBook)
Source§fn handle_quote(&mut self, quote: &QuoteTick)
fn handle_quote(&mut self, quote: &QuoteTick)
Source§fn handle_trade(&mut self, trade: &TradeTick)
fn handle_trade(&mut self, trade: &TradeTick)
Source§fn handle_bar(&mut self, bar: &Bar)
fn handle_bar(&mut self, bar: &Bar)
Source§fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)
fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)
Source§fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)
fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)
Source§fn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)
fn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)
Source§fn handle_option_greeks(&mut self, greeks: &OptionGreeks)
fn handle_option_greeks(&mut self, greeks: &OptionGreeks)
Source§fn handle_option_chain(&mut self, slice: &OptionChainSlice)
fn handle_option_chain(&mut self, slice: &OptionChainSlice)
Source§fn handle_instrument_status(&mut self, status: &InstrumentStatus)
fn handle_instrument_status(&mut self, status: &InstrumentStatus)
Source§fn handle_instrument_close(&mut self, close: &InstrumentClose)
fn handle_instrument_close(&mut self, close: &InstrumentClose)
Source§fn handle_order_filled(&mut self, event: &OrderFilled)
fn handle_order_filled(&mut self, event: &OrderFilled)
Source§fn handle_order_canceled(&mut self, event: &OrderCanceled)
fn handle_order_canceled(&mut self, event: &OrderCanceled)
Source§fn handle_historical_data(&mut self, data: &(dyn Any + 'static))
fn handle_historical_data(&mut self, data: &(dyn Any + 'static))
Source§fn handle_data_response(&mut self, resp: &CustomDataResponse)
fn handle_data_response(&mut self, resp: &CustomDataResponse)
Source§fn handle_instrument_response(&mut self, resp: &InstrumentResponse)
fn handle_instrument_response(&mut self, resp: &InstrumentResponse)
Source§fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)
fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)
Source§fn handle_book_response(&mut self, resp: &BookResponse)
fn handle_book_response(&mut self, resp: &BookResponse)
Source§fn handle_quotes_response(&mut self, resp: &QuotesResponse)
fn handle_quotes_response(&mut self, resp: &QuotesResponse)
Source§fn handle_trades_response(&mut self, resp: &TradesResponse)
fn handle_trades_response(&mut self, resp: &TradesResponse)
Source§fn handle_funding_rates_response(&mut self, resp: &FundingRatesResponse)
fn handle_funding_rates_response(&mut self, resp: &FundingRatesResponse)
Source§fn handle_bars_response(&mut self, resp: &BarsResponse)
fn handle_bars_response(&mut self, resp: &BarsResponse)
Source§fn subscribe_data(
&mut self,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_data( &mut self, data_type: DataType, client_id: Option<ClientId>, params: Option<Params>, )
data_type data.Source§fn subscribe_quotes(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_quotes( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
QuoteTick data for the instrument_id.Source§fn subscribe_instruments(
&mut self,
venue: Venue,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_instruments( &mut self, venue: Venue, client_id: Option<ClientId>, params: Option<Params>, )
InstrumentAny data for the venue.Source§fn subscribe_instrument(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_instrument( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
InstrumentAny data for the instrument_id.Source§fn subscribe_book_deltas(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
managed: bool,
params: Option<Params>,
)
fn subscribe_book_deltas( &mut self, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, managed: bool, params: Option<Params>, )
OrderBookDeltas data for the instrument_id.Source§fn subscribe_book_at_interval(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZero<usize>>,
interval_ms: NonZero<usize>,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_book_at_interval( &mut self, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, interval_ms: NonZero<usize>, client_id: Option<ClientId>, params: Option<Params>, )
OrderBook snapshots at a specified interval for the instrument_id.Source§fn subscribe_trades(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_trades( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
TradeTick data for the instrument_id.Source§fn subscribe_bars(
&mut self,
bar_type: BarType,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, params: Option<Params>, )
Bar data for the bar_type.Source§fn subscribe_mark_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_mark_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
MarkPriceUpdate data for the instrument_id.Source§fn subscribe_index_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_index_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
IndexPriceUpdate data for the instrument_id.Source§fn subscribe_funding_rates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_funding_rates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
FundingRateUpdate data for the instrument_id.Source§fn subscribe_option_greeks(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_option_greeks( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
OptionGreeks data for the instrument_id.Source§fn subscribe_instrument_status(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_instrument_status( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
InstrumentStatus data for the instrument_id.Source§fn subscribe_instrument_close(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_instrument_close( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
InstrumentClose data for the instrument_id.Source§fn subscribe_option_chain(
&mut self,
series_id: OptionSeriesId,
strike_range: StrikeRange,
snapshot_interval_ms: Option<u64>,
client_id: Option<ClientId>,
)
fn subscribe_option_chain( &mut self, series_id: OptionSeriesId, strike_range: StrikeRange, snapshot_interval_ms: Option<u64>, client_id: Option<ClientId>, )
Source§fn subscribe_order_fills(&mut self, instrument_id: InstrumentId)
fn subscribe_order_fills(&mut self, instrument_id: InstrumentId)
OrderFilled events for the instrument_id.Source§fn subscribe_order_cancels(&mut self, instrument_id: InstrumentId)
fn subscribe_order_cancels(&mut self, instrument_id: InstrumentId)
OrderCanceled events for the instrument_id.Source§fn unsubscribe_data(
&mut self,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_data( &mut self, data_type: DataType, client_id: Option<ClientId>, params: Option<Params>, )
data_type data.Source§fn unsubscribe_instruments(
&mut self,
venue: Venue,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_instruments( &mut self, venue: Venue, client_id: Option<ClientId>, params: Option<Params>, )
InstrumentAny data for the venue.Source§fn unsubscribe_instrument(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_instrument( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
InstrumentAny data for the instrument_id.Source§fn unsubscribe_book_deltas(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_book_deltas( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
OrderBookDeltas data for the instrument_id.Source§fn unsubscribe_book_at_interval(
&mut self,
instrument_id: InstrumentId,
interval_ms: NonZero<usize>,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_book_at_interval( &mut self, instrument_id: InstrumentId, interval_ms: NonZero<usize>, client_id: Option<ClientId>, params: Option<Params>, )
OrderBook snapshots at a specified interval for the instrument_id.Source§fn unsubscribe_quotes(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_quotes( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
QuoteTick data for the instrument_id.Source§fn unsubscribe_trades(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_trades( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
TradeTick data for the instrument_id.Source§fn unsubscribe_bars(
&mut self,
bar_type: BarType,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, params: Option<Params>, )
Bar data for the bar_type.Source§fn unsubscribe_mark_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_mark_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
MarkPriceUpdate data for the instrument_id.Source§fn unsubscribe_index_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_index_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
IndexPriceUpdate data for the instrument_id.Source§fn unsubscribe_funding_rates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_funding_rates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
FundingRateUpdate data for the instrument_id.Source§fn unsubscribe_option_greeks(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_option_greeks( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
OptionGreeks data for the instrument_id.Source§fn unsubscribe_instrument_status(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_instrument_status( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
InstrumentStatus data for the instrument_id.Source§fn unsubscribe_instrument_close(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_instrument_close( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
InstrumentClose data for the instrument_id.Source§fn unsubscribe_option_chain(
&mut self,
series_id: OptionSeriesId,
client_id: Option<ClientId>,
)
fn unsubscribe_option_chain( &mut self, series_id: OptionSeriesId, client_id: Option<ClientId>, )
OptionChainSlice snapshots for the option series_id.Source§fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
OrderFilled events for the instrument_id.Source§fn unsubscribe_order_cancels(&mut self, instrument_id: InstrumentId)
fn unsubscribe_order_cancels(&mut self, instrument_id: InstrumentId)
OrderCanceled events for the instrument_id.Source§fn request_data(
&mut self,
data_type: DataType,
client_id: ClientId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_data( &mut self, data_type: DataType, client_id: ClientId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, params: Option<Params>, ) -> Result<UUID4, Error>
data_type. Read moreSource§fn request_instrument(
&mut self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_instrument( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
Source§fn request_instruments(
&mut self,
venue: Option<Venue>,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_instruments( &mut self, venue: Option<Venue>, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
Source§fn request_book_snapshot(
&mut self,
instrument_id: InstrumentId,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_book_snapshot( &mut self, instrument_id: InstrumentId, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
Source§fn request_quotes(
&mut self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_quotes( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
Source§fn request_trades(
&mut self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_trades( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
Source§fn request_funding_rates(
&mut self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_funding_rates( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
Source§impl Debug for TwapAlgorithm
impl Debug for TwapAlgorithm
Source§impl Deref for TwapAlgorithm
impl Deref for TwapAlgorithm
Source§impl DerefMut for TwapAlgorithm
impl DerefMut for TwapAlgorithm
Source§impl ExecutionAlgorithm for TwapAlgorithm
impl ExecutionAlgorithm for TwapAlgorithm
Source§fn core_mut(&mut self) -> &mut ExecutionAlgorithmCore
fn core_mut(&mut self) -> &mut ExecutionAlgorithmCore
ExecutionAlgorithmCore.Source§fn on_order(&mut self, order: OrderAny) -> Result<()>
fn on_order(&mut self, order: OrderAny) -> Result<()>
Source§fn on_time_event(&mut self, event: &TimeEvent) -> Result<()>
fn on_time_event(&mut self, event: &TimeEvent) -> Result<()>
Source§fn id(&mut self) -> ExecAlgorithmId
fn id(&mut self) -> ExecAlgorithmId
Source§fn execute(&mut self, command: TradingCommand) -> Result<()>
fn execute(&mut self, command: TradingCommand) -> Result<()>
Source§fn on_order_list(
&mut self,
_order_list: OrderList,
orders: Vec<OrderAny>,
) -> Result<()>
fn on_order_list( &mut self, _order_list: OrderList, orders: Vec<OrderAny>, ) -> Result<()>
Source§fn handle_cancel_order(&mut self, command: CancelOrder) -> Result<()>
fn handle_cancel_order(&mut self, command: CancelOrder) -> Result<()>
Source§fn generate_order_canceled(&mut self, order: &OrderAny) -> OrderCanceled
fn generate_order_canceled(&mut self, order: &OrderAny) -> OrderCanceled
Source§fn generate_order_pending_update(
&mut self,
order: &OrderAny,
) -> OrderPendingUpdate
fn generate_order_pending_update( &mut self, order: &OrderAny, ) -> OrderPendingUpdate
Source§fn generate_order_pending_cancel(
&mut self,
order: &OrderAny,
) -> OrderPendingCancel
fn generate_order_pending_cancel( &mut self, order: &OrderAny, ) -> OrderPendingCancel
Source§fn spawn_market(
&mut self,
primary: &mut OrderAny,
quantity: Quantity,
time_in_force: TimeInForce,
reduce_only: bool,
tags: Option<Vec<Ustr>>,
reduce_primary: bool,
) -> MarketOrder
fn spawn_market( &mut self, primary: &mut OrderAny, quantity: Quantity, time_in_force: TimeInForce, reduce_only: bool, tags: Option<Vec<Ustr>>, reduce_primary: bool, ) -> MarketOrder
Source§fn spawn_limit(
&mut self,
primary: &mut OrderAny,
quantity: Quantity,
price: Price,
time_in_force: TimeInForce,
expire_time: Option<UnixNanos>,
post_only: bool,
reduce_only: bool,
display_qty: Option<Quantity>,
emulation_trigger: Option<TriggerType>,
tags: Option<Vec<Ustr>>,
reduce_primary: bool,
) -> LimitOrder
fn spawn_limit( &mut self, primary: &mut OrderAny, quantity: Quantity, price: Price, time_in_force: TimeInForce, expire_time: Option<UnixNanos>, post_only: bool, reduce_only: bool, display_qty: Option<Quantity>, emulation_trigger: Option<TriggerType>, tags: Option<Vec<Ustr>>, reduce_primary: bool, ) -> LimitOrder
Source§fn spawn_market_to_limit(
&mut self,
primary: &mut OrderAny,
quantity: Quantity,
time_in_force: TimeInForce,
expire_time: Option<UnixNanos>,
reduce_only: bool,
display_qty: Option<Quantity>,
emulation_trigger: Option<TriggerType>,
tags: Option<Vec<Ustr>>,
reduce_primary: bool,
) -> MarketToLimitOrder
fn spawn_market_to_limit( &mut self, primary: &mut OrderAny, quantity: Quantity, time_in_force: TimeInForce, expire_time: Option<UnixNanos>, reduce_only: bool, display_qty: Option<Quantity>, emulation_trigger: Option<TriggerType>, tags: Option<Vec<Ustr>>, reduce_primary: bool, ) -> MarketToLimitOrder
Source§fn reduce_primary_order(&mut self, primary: &mut OrderAny, spawn_qty: Quantity)
fn reduce_primary_order(&mut self, primary: &mut OrderAny, spawn_qty: Quantity)
Source§fn restore_primary_order_quantity(&mut self, order: &OrderAny)
fn restore_primary_order_quantity(&mut self, order: &OrderAny)
Source§fn submit_order(
&mut self,
order: OrderAny,
position_id: Option<PositionId>,
client_id: Option<ClientId>,
) -> Result<()>
fn submit_order( &mut self, order: OrderAny, position_id: Option<PositionId>, client_id: Option<ClientId>, ) -> Result<()>
Source§fn modify_order(
&mut self,
order: &mut OrderAny,
quantity: Option<Quantity>,
price: Option<Price>,
trigger_price: Option<Price>,
client_id: Option<ClientId>,
) -> Result<()>
fn modify_order( &mut self, order: &mut OrderAny, quantity: Option<Quantity>, price: Option<Price>, trigger_price: Option<Price>, client_id: Option<ClientId>, ) -> Result<()>
Source§fn modify_order_in_place(
&mut self,
order: &mut OrderAny,
quantity: Option<Quantity>,
price: Option<Price>,
trigger_price: Option<Price>,
) -> Result<()>
fn modify_order_in_place( &mut self, order: &mut OrderAny, quantity: Option<Quantity>, price: Option<Price>, trigger_price: Option<Price>, ) -> Result<()>
Source§fn cancel_order(
&mut self,
order: &mut OrderAny,
client_id: Option<ClientId>,
) -> Result<()>
fn cancel_order( &mut self, order: &mut OrderAny, client_id: Option<ClientId>, ) -> Result<()>
Source§fn subscribe_to_strategy_events(&mut self, strategy_id: StrategyId)
fn subscribe_to_strategy_events(&mut self, strategy_id: StrategyId)
Source§fn unsubscribe_all_strategy_events(&mut self)
fn unsubscribe_all_strategy_events(&mut self)
Source§fn handle_order_event(&mut self, event: OrderEventAny)
fn handle_order_event(&mut self, event: OrderEventAny)
Source§fn handle_position_event(&mut self, event: PositionEvent)
fn handle_position_event(&mut self, event: PositionEvent)
Source§fn on_order_initialized(&mut self, event: OrderInitialized)
fn on_order_initialized(&mut self, event: OrderInitialized)
Source§fn on_order_denied(&mut self, event: OrderDenied)
fn on_order_denied(&mut self, event: OrderDenied)
Source§fn on_order_emulated(&mut self, event: OrderEmulated)
fn on_order_emulated(&mut self, event: OrderEmulated)
Source§fn on_order_released(&mut self, event: OrderReleased)
fn on_order_released(&mut self, event: OrderReleased)
Source§fn on_order_submitted(&mut self, event: OrderSubmitted)
fn on_order_submitted(&mut self, event: OrderSubmitted)
Source§fn on_order_rejected(&mut self, event: OrderRejected)
fn on_order_rejected(&mut self, event: OrderRejected)
Source§fn on_order_accepted(&mut self, event: OrderAccepted)
fn on_order_accepted(&mut self, event: OrderAccepted)
Source§fn on_algo_order_canceled(&mut self, event: OrderCanceled)
fn on_algo_order_canceled(&mut self, event: OrderCanceled)
Source§fn on_order_expired(&mut self, event: OrderExpired)
fn on_order_expired(&mut self, event: OrderExpired)
Source§fn on_order_triggered(&mut self, event: OrderTriggered)
fn on_order_triggered(&mut self, event: OrderTriggered)
Source§fn on_order_pending_update(&mut self, event: OrderPendingUpdate)
fn on_order_pending_update(&mut self, event: OrderPendingUpdate)
Source§fn on_order_pending_cancel(&mut self, event: OrderPendingCancel)
fn on_order_pending_cancel(&mut self, event: OrderPendingCancel)
Source§fn on_order_modify_rejected(&mut self, event: OrderModifyRejected)
fn on_order_modify_rejected(&mut self, event: OrderModifyRejected)
Source§fn on_order_cancel_rejected(&mut self, event: OrderCancelRejected)
fn on_order_cancel_rejected(&mut self, event: OrderCancelRejected)
Source§fn on_order_updated(&mut self, event: OrderUpdated)
fn on_order_updated(&mut self, event: OrderUpdated)
Source§fn on_algo_order_filled(&mut self, event: OrderFilled)
fn on_algo_order_filled(&mut self, event: OrderFilled)
Source§fn on_order_event(&mut self, event: OrderEventAny)
fn on_order_event(&mut self, event: OrderEventAny)
Source§fn on_position_opened(&mut self, event: PositionOpened)
fn on_position_opened(&mut self, event: PositionOpened)
Source§fn on_position_changed(&mut self, event: PositionChanged)
fn on_position_changed(&mut self, event: PositionChanged)
Source§fn on_position_closed(&mut self, event: PositionClosed)
fn on_position_closed(&mut self, event: PositionClosed)
Source§fn on_position_event(&mut self, event: PositionEvent)
fn on_position_event(&mut self, event: PositionEvent)
Auto Trait Implementations§
impl Freeze for TwapAlgorithm
impl !RefUnwindSafe for TwapAlgorithm
impl !Send for TwapAlgorithm
impl !Sync for TwapAlgorithm
impl Unpin for TwapAlgorithm
impl UnsafeUnpin for TwapAlgorithm
impl !UnwindSafe for TwapAlgorithm
Blanket Implementations§
Source§impl<T> Actor for T
impl<T> Actor for T
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
Source§impl<T> Component for T
impl<T> Component for T
Source§fn component_id(&self) -> ComponentId
fn component_id(&self) -> ComponentId
Source§fn state(&self) -> ComponentState
fn state(&self) -> ComponentState
Source§fn transition_state(&mut self, trigger: ComponentTrigger) -> Result<(), Error>
fn transition_state(&mut self, trigger: ComponentTrigger) -> Result<(), Error>
Source§fn register(
&mut self,
trader_id: TraderId,
clock: Rc<RefCell<dyn Clock>>,
cache: Rc<RefCell<Cache>>,
) -> Result<(), Error>
fn register( &mut self, trader_id: TraderId, clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, ) -> Result<(), Error>
Source§fn not_running(&self) -> bool
fn not_running(&self) -> bool
Source§fn is_running(&self) -> bool
fn is_running(&self) -> bool
Source§fn is_stopped(&self) -> bool
fn is_stopped(&self) -> bool
Source§fn is_degraded(&self) -> bool
fn is_degraded(&self) -> bool
Source§fn is_faulted(&self) -> bool
fn is_faulted(&self) -> bool
Source§fn is_disposed(&self) -> bool
fn is_disposed(&self) -> bool
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>
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>
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