pub struct ExecutionAlgorithmCore {
pub actor: DataActorCore,
pub config: ExecutionAlgorithmConfig,
pub exec_algorithm_id: ExecAlgorithmId,
/* private fields */
}Expand description
The core component of an ExecutionAlgorithm.
This struct manages the internal state for execution algorithms including
spawn ID tracking and strategy subscriptions. It wraps a DataActorCore
to provide data actor capabilities.
User algorithms should hold this as a member and implement Deref/DerefMut
to satisfy the trait bounds of ExecutionAlgorithm.
Fields§
§actor: DataActorCoreThe underlying data actor core.
config: ExecutionAlgorithmConfigThe execution algorithm configuration.
exec_algorithm_id: ExecAlgorithmIdThe execution algorithm ID.
Implementations§
Source§impl ExecutionAlgorithmCore
impl ExecutionAlgorithmCore
Sourcepub fn new(config: ExecutionAlgorithmConfig) -> Self
pub fn new(config: ExecutionAlgorithmConfig) -> Self
Sourcepub fn register(
&mut self,
trader_id: TraderId,
clock: Rc<RefCell<dyn Clock>>,
cache: Rc<RefCell<Cache>>,
) -> Result<()>
pub fn register( &mut self, trader_id: TraderId, clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, ) -> Result<()>
Registers the execution algorithm with the trading engine components.
§Errors
Returns an error if registration with the actor core fails.
Sourcepub fn id(&self) -> ExecAlgorithmId
pub fn id(&self) -> ExecAlgorithmId
Returns the execution algorithm ID.
Sourcepub fn spawn_client_order_id(
&mut self,
primary_id: &ClientOrderId,
) -> ClientOrderId
pub fn spawn_client_order_id( &mut self, primary_id: &ClientOrderId, ) -> ClientOrderId
Generates the next spawn client order ID for a primary order.
The generated ID follows the pattern: {primary_id}-E{sequence}.
Sourcepub fn spawn_sequence(&self, primary_id: &ClientOrderId) -> Option<u32>
pub fn spawn_sequence(&self, primary_id: &ClientOrderId) -> Option<u32>
Returns the current spawn sequence for a primary order, if any.
Sourcepub fn is_strategy_subscribed(&self, strategy_id: &StrategyId) -> bool
pub fn is_strategy_subscribed(&self, strategy_id: &StrategyId) -> bool
Checks if a strategy has been subscribed to for events.
Sourcepub fn add_subscribed_strategy(&mut self, strategy_id: StrategyId)
pub fn add_subscribed_strategy(&mut self, strategy_id: StrategyId)
Marks a strategy as subscribed for events.
Sourcepub fn store_strategy_event_handlers(
&mut self,
strategy_id: StrategyId,
handlers: StrategyEventHandlers,
)
pub fn store_strategy_event_handlers( &mut self, strategy_id: StrategyId, handlers: StrategyEventHandlers, )
Stores the event handlers for a strategy subscription.
Sourcepub fn take_strategy_event_handlers(
&mut self,
) -> AHashMap<StrategyId, StrategyEventHandlers>
pub fn take_strategy_event_handlers( &mut self, ) -> AHashMap<StrategyId, StrategyEventHandlers>
Takes and returns all stored strategy event handlers, clearing the internal map.
Sourcepub fn clear_spawn_ids(&mut self)
pub fn clear_spawn_ids(&mut self)
Clears all spawn tracking state.
Sourcepub fn clear_subscribed_strategies(&mut self)
pub fn clear_subscribed_strategies(&mut self)
Clears all strategy subscriptions.
Sourcepub fn track_pending_spawn_reduction(
&mut self,
spawn_id: ClientOrderId,
quantity: Quantity,
)
pub fn track_pending_spawn_reduction( &mut self, spawn_id: ClientOrderId, quantity: Quantity, )
Tracks a pending spawn reduction for potential restoration.
Sourcepub fn take_pending_spawn_reduction(
&mut self,
spawn_id: &ClientOrderId,
) -> Option<Quantity>
pub fn take_pending_spawn_reduction( &mut self, spawn_id: &ClientOrderId, ) -> Option<Quantity>
Removes and returns the pending spawn reduction for an order, if any.
Sourcepub fn clear_pending_spawn_reductions(&mut self)
pub fn clear_pending_spawn_reductions(&mut self)
Clears all pending spawn reductions.
Sourcepub fn reset(&mut self)
pub fn reset(&mut self)
Resets the core to its initial state.
Note: This clears handler storage but does NOT unsubscribe from msgbus.
Call unsubscribe_all_strategy_events first to properly unsubscribe.
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 Debug for ExecutionAlgorithmCore
impl Debug for ExecutionAlgorithmCore
Source§impl Deref for ExecutionAlgorithmCore
impl Deref for ExecutionAlgorithmCore
Auto Trait Implementations§
impl Freeze for ExecutionAlgorithmCore
impl !RefUnwindSafe for ExecutionAlgorithmCore
impl !Send for ExecutionAlgorithmCore
impl !Sync for ExecutionAlgorithmCore
impl Unpin for ExecutionAlgorithmCore
impl UnsafeUnpin for ExecutionAlgorithmCore
impl !UnwindSafe for ExecutionAlgorithmCore
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
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