pub struct PyStrategyInner { /* private fields */ }Expand description
Inner state of PyStrategy, shared between Python wrapper and Rust registries.
Methods from Deref<Target = DataActorCore>§
pub fn registered_indicators(&self) -> Vec<Rc<dyn ActorIndicator>>
pub fn registered_indicators(&self) -> Vec<Rc<dyn ActorIndicator>>
Returns the registered indicators.
pub fn indicators_initialized(&self) -> Result<bool, Error>
pub fn indicators_initialized(&self) -> Result<bool, Error>
Returns whether all registered indicators are initialized.
§Errors
Returns an error if a registered indicator cannot report readiness.
pub fn register_indicator_for_quote_ticks(
&mut self,
instrument_id: InstrumentId,
indicator: Rc<dyn ActorIndicator>,
)
pub fn register_indicator_for_quote_ticks( &mut self, instrument_id: InstrumentId, indicator: Rc<dyn ActorIndicator>, )
Registers an indicator to receive quote ticks for an instrument.
pub fn register_indicator_for_trade_ticks(
&mut self,
instrument_id: InstrumentId,
indicator: Rc<dyn ActorIndicator>,
)
pub fn register_indicator_for_trade_ticks( &mut self, instrument_id: InstrumentId, indicator: Rc<dyn ActorIndicator>, )
Registers an indicator to receive trade ticks for an instrument.
pub fn register_indicator_for_bars(
&mut self,
bar_type: BarType,
indicator: Rc<dyn ActorIndicator>,
)
pub fn register_indicator_for_bars( &mut self, bar_type: BarType, indicator: Rc<dyn ActorIndicator>, )
Registers an indicator to receive bars for a bar type.
pub fn mem_address(&self) -> String
pub fn mem_address(&self) -> String
Returns the memory address of this instance as a hexadecimal string.
pub fn state(&self) -> ComponentState
pub fn state(&self) -> ComponentState
Returns the actors state.
pub fn actor_id(&self) -> ActorId
pub fn actor_id(&self) -> ActorId
Returns the actors ID.
pub fn timestamp_ns(&self) -> UnixNanos
pub fn timestamp_ns(&self) -> UnixNanos
Returns a UNIX nanoseconds timestamp from the actor’s internal clock.
pub 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.
pub 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.
pub 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 message_bus(&self) -> Rc<PyMessageBusScope>
pub fn message_bus(&self) -> Rc<PyMessageBusScope>
Returns this component’s shared Python message-bus state.
pub fn is_registered(&self) -> bool
pub 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.
pub fn publish_data(&self, data_type: &DataType, data: &CustomData)
pub fn publish_data(&self, data_type: &DataType, data: &CustomData)
Publishes data on the message bus under the topic derived from data_type.
data_type is kept as an explicit parameter (rather than deriving it from
data.data_type) to mirror the v1 Python publish_data(data_type, data) API and
to allow callers to override the routing topic from the payload’s intrinsic type.
§Panics
Panics if the actor is not registered with a trader.
pub fn publish_signal(&self, name: &str, value: String, ts_event: UnixNanos)
pub fn publish_signal(&self, name: &str, value: String, ts_event: UnixNanos)
Publishes a [Signal] constructed from name and value, wrapped in [CustomData]
so it is consumed by signal subscribers and by any CustomData-aware pipeline
(for example the feather persistence writer).
The topic mirrors the v1 Python scheme data.Signal<TitleName> so subscribers
using either a specific name or the global wildcard are both notified.
If ts_event is zero then the current clock timestamp is used.
§Panics
Panics if the actor is not registered with a trader.
pub fn add_synthetic(&self, synthetic: SyntheticInstrument) -> Result<(), Error>
pub fn add_synthetic(&self, synthetic: SyntheticInstrument) -> Result<(), Error>
Adds the synthetic instrument to the cache.
§Errors
Returns an error if a synthetic with the same ID already exists, or if the backing cache fails to persist it. Panics if the actor is not registered with a trader. // panics-doc-ok
pub fn update_synthetic(
&self,
synthetic: SyntheticInstrument,
) -> Result<(), Error>
pub fn update_synthetic( &self, synthetic: SyntheticInstrument, ) -> Result<(), Error>
Updates the synthetic instrument in the cache, replacing the existing entry.
§Errors
Returns an error if no synthetic with the same ID already exists, or if the backing cache fails to persist the replacement. Panics if the actor is not registered with a trader. // panics-doc-ok
pub 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>, )
pub fn subscribe_signal(
&mut self,
handler: TypedHandler<dyn Any>,
name: &str,
priority: Option<u32>,
)
pub fn subscribe_signal( &mut self, handler: TypedHandler<dyn Any>, name: &str, priority: Option<u32>, )
Subscribes the actor to signal.
An empty name subscribes to every signal via the data.Signal* wildcard pattern.
§Panics
Panics if the actor is not registered with a trader.
pub fn subscribe_queue_state(
&mut self,
handler: TypedHandler<dyn Any>,
channel: Option<SystemChannel>,
priority: Option<u32>,
)
pub fn subscribe_queue_state( &mut self, handler: TypedHandler<dyn Any>, channel: Option<SystemChannel>, priority: Option<u32>, )
Registers a queue state change subscription from the trait.
§Panics
Panics if the actor is not registered with a trader.
pub fn subscribe_socket_state(
&mut self,
handler: TypedHandler<dyn Any>,
client_id: Option<ClientId>,
endpoint: Option<&str>,
priority: Option<u32>,
)
pub fn subscribe_socket_state( &mut self, handler: TypedHandler<dyn Any>, client_id: Option<ClientId>, endpoint: Option<&str>, priority: Option<u32>, )
Registers a socket state change subscription from the trait.
§Panics
Panics if the actor is not registered with a trader.
pub 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>, )
Subscribes the actor to quotes.
pub fn subscribe_instruments(
&mut self,
pattern: MStr<Pattern>,
handler: TypedHandler<InstrumentAny>,
venue: Venue,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_instruments( &mut self, pattern: MStr<Pattern>, handler: TypedHandler<InstrumentAny>, venue: Venue, client_id: Option<ClientId>, params: Option<Params>, )
Subscribes the actor to instruments.
pub fn subscribe_instrument(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<InstrumentAny>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_instrument( &mut self, topic: MStr<Topic>, handler: TypedHandler<InstrumentAny>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Subscribes the actor to instrument.
pub fn subscribe_book_deltas(
&mut self,
pattern: MStr<Pattern>,
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, pattern: MStr<Pattern>, handler: TypedHandler<OrderBookDeltas>, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, managed: bool, params: Option<Params>, )
Subscribes the actor to book deltas.
pub fn subscribe_book_depth(
&mut self,
pattern: MStr<Pattern>,
handler: TypedHandler<OrderBookDepth>,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
managed: bool,
params: Option<Params>,
)
pub fn subscribe_book_depth( &mut self, pattern: MStr<Pattern>, handler: TypedHandler<OrderBookDepth>, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, managed: bool, params: Option<Params>, )
Subscribes the actor to book depth.
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>,
)
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>, )
Subscribes the actor to book snapshots.
pub 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>, )
Subscribes the actor to trades.
pub 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>, )
Subscribes the actor to bars.
pub 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>, )
Subscribes the actor to mark prices.
pub 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>, )
Subscribes the actor to index prices.
pub 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>, )
Subscribes the actor to funding rates.
pub 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>, )
Subscribes the actor to option greeks.
pub 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>, )
Subscribes the actor to instrument status.
pub 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>, )
Subscribes the actor to instrument close.
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>,
params: Option<Params>,
)
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>, params: Option<Params>, )
Subscribes the actor to option chain snapshots.
pub 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>, )
Unsubscribes the actor from data.
pub fn unsubscribe_signal(&mut self, name: &str)
pub fn unsubscribe_signal(&mut self, name: &str)
pub fn unsubscribe_queue_state(&mut self, channel: Option<SystemChannel>)
pub fn unsubscribe_queue_state(&mut self, channel: Option<SystemChannel>)
pub fn unsubscribe_socket_state(
&mut self,
client_id: Option<ClientId>,
endpoint: Option<&str>,
)
pub fn unsubscribe_socket_state( &mut self, client_id: Option<ClientId>, endpoint: Option<&str>, )
Unsubscribes from socket state changes.
§Panics
Panics if the actor is not registered with a trader.
pub 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>, )
Unsubscribes the actor from instruments.
pub 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>, )
Unsubscribes the actor from instrument.
pub 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>, )
Unsubscribes the actor from book deltas.
pub fn unsubscribe_book_depth(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_book_depth( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Unsubscribes the actor from book depth snapshots.
pub 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>, )
Unsubscribes the actor from book snapshots at interval.
pub 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>, )
Unsubscribes the actor from quotes.
pub 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>, )
Unsubscribes the actor from trades.
pub 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>, )
Unsubscribes the actor from bars.
pub 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>, )
Unsubscribes the actor from mark prices.
pub 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>, )
Unsubscribes the actor from index prices.
pub 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>, )
Unsubscribes the actor from funding rates.
pub 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>, )
Unsubscribes the actor from option greeks.
pub 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>, )
Unsubscribes the actor from instrument status.
pub 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>, )
Unsubscribes the actor from instrument close.
pub 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>, )
Unsubscribes the actor from option chain snapshots.
pub fn request_data(
&self,
data_type: DataType,
client_id: ClientId,
start: Option<Timestamp>,
end: Option<Timestamp>,
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<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
pub fn request_instrument(
&self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_instrument( &self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
pub fn request_instruments(
&self,
venue: Option<Venue>,
start: Option<Timestamp>,
end: Option<Timestamp>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_instruments( &self, venue: Option<Venue>, start: Option<Timestamp>, end: Option<Timestamp>, 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>
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>
pub fn request_book_deltas(
&self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_book_deltas( &self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
pub fn request_book_depth(
&self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZero<usize>>,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_book_depth( &self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
Sends a request for historical book depth.
§Errors
Returns an error if input parameters are invalid.
pub fn request_quotes(
&self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
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<Timestamp>, end: Option<Timestamp>, 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<Timestamp>,
end: Option<Timestamp>,
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<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
pub fn request_bars(
&self,
bar_type: BarType,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
handler: TypedHandler<dyn Any>,
) -> Result<UUID4, Error>
pub fn request_bars( &self, bar_type: BarType, start: Option<Timestamp>, end: Option<Timestamp>, 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<Timestamp>,
end: Option<Timestamp>,
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<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, handler: TypedHandler<dyn Any>, ) -> Result<UUID4, Error>
pub fn reconnect_socket(
&self,
client_id: ClientId,
endpoint: &str,
) -> Result<(), Error>
pub fn reconnect_socket( &self, client_id: ClientId, endpoint: &str, ) -> Result<(), Error>
Sends a fire-and-observe reconnect command.
§Errors
Returns an error if the actor is not registered, the endpoint label is invalid, the live runner is unavailable, or the command channel is closed.
pub fn subscribe_blocks(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<Block>,
chain: Blockchain,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_blocks( &mut self, topic: MStr<Topic>, handler: TypedHandler<Block>, chain: Blockchain, client_id: Option<ClientId>, params: Option<Params>, )
Subscribes the actor to block.
pub fn subscribe_pool(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<Pool>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_pool( &mut self, topic: MStr<Topic>, handler: TypedHandler<Pool>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Subscribes the actor to pool.
pub fn subscribe_pool_swaps(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<PoolSwap>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_pool_swaps( &mut self, topic: MStr<Topic>, handler: TypedHandler<PoolSwap>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Subscribes the actor to pool swap.
pub fn subscribe_pool_liquidity_updates(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<PoolLiquidityUpdate>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_pool_liquidity_updates( &mut self, topic: MStr<Topic>, handler: TypedHandler<PoolLiquidityUpdate>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Subscribes the actor to pool liquidity update.
pub fn subscribe_pool_fee_collects(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<PoolFeeCollect>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_pool_fee_collects( &mut self, topic: MStr<Topic>, handler: TypedHandler<PoolFeeCollect>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Subscribes the actor to pool fee collect.
pub fn subscribe_pool_flash_events(
&mut self,
topic: MStr<Topic>,
handler: TypedHandler<PoolFlash>,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn subscribe_pool_flash_events( &mut self, topic: MStr<Topic>, handler: TypedHandler<PoolFlash>, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Subscribes the actor to pool flash event.
pub fn unsubscribe_blocks(
&mut self,
chain: Blockchain,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_blocks( &mut self, chain: Blockchain, client_id: Option<ClientId>, params: Option<Params>, )
Unsubscribes the actor from blocks.
pub fn unsubscribe_pool(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_pool( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Unsubscribes the actor from pool definition updates.
pub fn unsubscribe_pool_swaps(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_pool_swaps( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Unsubscribes the actor from pool swaps.
pub fn unsubscribe_pool_liquidity_updates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_pool_liquidity_updates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Unsubscribes the actor from pool liquidity updates.
pub fn unsubscribe_pool_fee_collects(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_pool_fee_collects( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Unsubscribes the actor from pool fee collects.
pub fn unsubscribe_pool_flash_events(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
pub fn unsubscribe_pool_flash_events( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Unsubscribes the actor from pool flash events.
Trait Implementations§
Source§impl DataActor for PyStrategyInner
impl DataActor for PyStrategyInner
Source§fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>>
fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>>
Source§fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<()>
fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<()>
Source§fn on_time_event(&mut self, event: &TimeEvent) -> Result<()>
fn on_time_event(&mut self, event: &TimeEvent) -> Result<()>
Source§fn on_data(&mut self, data: &CustomData) -> Result<()>
fn on_data(&mut self, data: &CustomData) -> Result<()>
Source§fn on_signal(&mut self, signal: &Signal) -> Result<()>
fn on_signal(&mut self, signal: &Signal) -> Result<()>
Source§fn on_queue_state(&mut self, event: &QueueStateChanged) -> Result<()>
fn on_queue_state(&mut self, event: &QueueStateChanged) -> Result<()>
Source§fn on_socket_state(&mut self, event: &SocketStateChanged) -> Result<()>
fn on_socket_state(&mut self, event: &SocketStateChanged) -> Result<()>
Source§fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()>
fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()>
Source§fn on_quote(&mut self, quote: &QuoteTick) -> Result<()>
fn on_quote(&mut self, quote: &QuoteTick) -> Result<()>
Source§fn on_trade(&mut self, tick: &TradeTick) -> Result<()>
fn on_trade(&mut self, tick: &TradeTick) -> Result<()>
Source§fn on_bar(&mut self, bar: &Bar) -> Result<()>
fn on_bar(&mut self, bar: &Bar) -> Result<()>
Source§fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()>
fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()>
Source§fn on_book_depth(&mut self, depth: &OrderBookDepth) -> Result<()>
fn on_book_depth(&mut self, depth: &OrderBookDepth) -> Result<()>
Source§fn on_book(&mut self, order_book: &OrderBook) -> Result<()>
fn on_book(&mut self, order_book: &OrderBook) -> Result<()>
Source§fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()>
fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()>
Source§fn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()>
fn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()>
Source§fn on_funding_rate(&mut self, funding_rate: &FundingRateUpdate) -> Result<()>
fn on_funding_rate(&mut self, funding_rate: &FundingRateUpdate) -> Result<()>
Source§fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()>
fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()>
Source§fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()>
fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()>
Source§fn on_option_greeks(&mut self, greeks: &OptionGreeks) -> Result<()>
fn on_option_greeks(&mut self, greeks: &OptionGreeks) -> Result<()>
Source§fn on_option_chain(&mut self, slice: &OptionChainSlice) -> Result<()>
fn on_option_chain(&mut self, slice: &OptionChainSlice) -> Result<()>
Source§fn on_historical_data(&mut self, data: &dyn Any) -> Result<()>
fn on_historical_data(&mut self, data: &dyn Any) -> Result<()>
Source§fn on_historical_book_deltas(&mut self, deltas: &[OrderBookDelta]) -> Result<()>
fn on_historical_book_deltas(&mut self, deltas: &[OrderBookDelta]) -> Result<()>
Source§fn on_historical_book_depth(&mut self, depths: &[OrderBookDepth]) -> Result<()>
fn on_historical_book_depth(&mut self, depths: &[OrderBookDepth]) -> Result<()>
Source§fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<()>
fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<()>
Source§fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()>
fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()>
Source§fn on_historical_funding_rates(
&mut self,
funding_rates: &[FundingRateUpdate],
) -> Result<()>
fn on_historical_funding_rates( &mut self, funding_rates: &[FundingRateUpdate], ) -> Result<()>
Source§fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()>
fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()>
Source§fn on_historical_mark_prices(
&mut self,
mark_prices: &[MarkPriceUpdate],
) -> Result<()>
fn on_historical_mark_prices( &mut self, mark_prices: &[MarkPriceUpdate], ) -> Result<()>
Source§fn on_historical_index_prices(
&mut self,
index_prices: &[IndexPriceUpdate],
) -> Result<()>
fn on_historical_index_prices( &mut self, index_prices: &[IndexPriceUpdate], ) -> Result<()>
§fn trader_id(&self) -> Option<TraderId>where
Self: DataActorNative,
fn trader_id(&self) -> Option<TraderId>where
Self: DataActorNative,
§fn is_registered(&self) -> boolwhere
Self: DataActorNative,
fn is_registered(&self) -> boolwhere
Self: DataActorNative,
§fn on_block(&mut self, block: &Block) -> Result<(), Error>
fn on_block(&mut self, block: &Block) -> Result<(), Error>
§fn on_pool(&mut self, pool: &Pool) -> Result<(), Error>
fn on_pool(&mut self, pool: &Pool) -> Result<(), Error>
§fn on_pool_swap(&mut self, swap: &PoolSwap) -> Result<(), Error>
fn on_pool_swap(&mut self, swap: &PoolSwap) -> Result<(), Error>
§fn on_pool_liquidity_update(
&mut self,
update: &PoolLiquidityUpdate,
) -> Result<(), Error>
fn on_pool_liquidity_update( &mut self, update: &PoolLiquidityUpdate, ) -> Result<(), Error>
§fn on_pool_fee_collect(&mut self, collect: &PoolFeeCollect) -> Result<(), Error>
fn on_pool_fee_collect(&mut self, collect: &PoolFeeCollect) -> Result<(), Error>
§fn on_pool_flash(&mut self, flash: &PoolFlash) -> Result<(), Error>
fn on_pool_flash(&mut self, flash: &PoolFlash) -> Result<(), Error>
§fn clock(&self) -> ClockApi<'_>where
Self: DataActorBinding,
fn clock(&self) -> ClockApi<'_>where
Self: DataActorBinding,
§fn shutdown_system(&self, reason: Option<String>)where
Self: DataActorNative,
fn shutdown_system(&self, reason: Option<String>)where
Self: DataActorNative,
§fn publish_data(&self, data_type: &DataType, data: &CustomData)where
Self: DataActorNative,
fn publish_data(&self, data_type: &DataType, data: &CustomData)where
Self: DataActorNative,
§fn publish_signal(&self, name: &str, value: String, ts_event: UnixNanos)where
Self: DataActorNative,
fn publish_signal(&self, name: &str, value: String, ts_event: UnixNanos)where
Self: DataActorNative,
§fn add_synthetic(&self, synthetic: SyntheticInstrument) -> Result<(), Error>where
Self: DataActorNative,
fn add_synthetic(&self, synthetic: SyntheticInstrument) -> Result<(), Error>where
Self: DataActorNative,
synthetic instrument to the cache. Read more§fn update_synthetic(&self, synthetic: SyntheticInstrument) -> Result<(), Error>where
Self: DataActorNative,
fn update_synthetic(&self, synthetic: SyntheticInstrument) -> Result<(), Error>where
Self: DataActorNative,
synthetic instrument in the cache, replacing the existing entry. Read more§fn handle_time_event(&mut self, event: &TimeEvent)where
Self: Component,
fn handle_time_event(&mut self, event: &TimeEvent)where
Self: Component,
§fn handle_data(&mut self, data: &CustomData)where
Self: Component,
fn handle_data(&mut self, data: &CustomData)where
Self: Component,
§fn handle_signal(&mut self, signal: &Signal)where
Self: Component,
fn handle_signal(&mut self, signal: &Signal)where
Self: Component,
§fn handle_queue_state(&mut self, event: &QueueStateChanged)where
Self: Component,
fn handle_queue_state(&mut self, event: &QueueStateChanged)where
Self: Component,
§fn handle_socket_state(&mut self, event: &SocketStateChanged)where
Self: Component,
fn handle_socket_state(&mut self, event: &SocketStateChanged)where
Self: Component,
§fn handle_instrument(&mut self, instrument: &InstrumentAny)where
Self: Component,
fn handle_instrument(&mut self, instrument: &InstrumentAny)where
Self: Component,
§fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)where
Self: Component,
fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)where
Self: Component,
§fn handle_book_depth(&mut self, depth: &OrderBookDepth)where
Self: Component,
fn handle_book_depth(&mut self, depth: &OrderBookDepth)where
Self: Component,
§fn handle_book(&mut self, book: &OrderBook)where
Self: Component,
fn handle_book(&mut self, book: &OrderBook)where
Self: Component,
§fn handle_quote(&mut self, quote: &QuoteTick)where
Self: DataActorNative + Component,
fn handle_quote(&mut self, quote: &QuoteTick)where
Self: DataActorNative + Component,
§fn handle_trade(&mut self, trade: &TradeTick)where
Self: DataActorNative + Component,
fn handle_trade(&mut self, trade: &TradeTick)where
Self: DataActorNative + Component,
§fn handle_bar(&mut self, bar: &Bar)where
Self: DataActorNative + Component,
fn handle_bar(&mut self, bar: &Bar)where
Self: DataActorNative + Component,
§fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)where
Self: Component,
fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)where
Self: Component,
§fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)where
Self: Component,
fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)where
Self: Component,
§fn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)where
Self: Component,
fn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)where
Self: Component,
§fn handle_option_greeks(&mut self, greeks: &OptionGreeks)where
Self: Component,
fn handle_option_greeks(&mut self, greeks: &OptionGreeks)where
Self: Component,
§fn handle_option_chain(&mut self, slice: &OptionChainSlice)where
Self: Component,
fn handle_option_chain(&mut self, slice: &OptionChainSlice)where
Self: Component,
§fn handle_instrument_status(&mut self, status: &InstrumentStatus)where
Self: Component,
fn handle_instrument_status(&mut self, status: &InstrumentStatus)where
Self: Component,
§fn handle_instrument_close(&mut self, close: &InstrumentClose)where
Self: Component,
fn handle_instrument_close(&mut self, close: &InstrumentClose)where
Self: Component,
§fn handle_block(&mut self, block: &Block)where
Self: Component,
fn handle_block(&mut self, block: &Block)where
Self: Component,
§fn handle_pool(&mut self, pool: &Pool)where
Self: Component,
fn handle_pool(&mut self, pool: &Pool)where
Self: Component,
§fn handle_pool_swap(&mut self, swap: &PoolSwap)where
Self: Component,
fn handle_pool_swap(&mut self, swap: &PoolSwap)where
Self: Component,
§fn handle_pool_liquidity_update(&mut self, update: &PoolLiquidityUpdate)where
Self: Component,
fn handle_pool_liquidity_update(&mut self, update: &PoolLiquidityUpdate)where
Self: Component,
§fn handle_pool_fee_collect(&mut self, collect: &PoolFeeCollect)where
Self: Component,
fn handle_pool_fee_collect(&mut self, collect: &PoolFeeCollect)where
Self: Component,
§fn handle_pool_flash(&mut self, flash: &PoolFlash)where
Self: Component,
fn handle_pool_flash(&mut self, flash: &PoolFlash)where
Self: Component,
§fn handle_historical_data(&mut self, data: &(dyn Any + 'static))
fn handle_historical_data(&mut self, data: &(dyn Any + 'static))
§fn handle_data_response(&mut self, resp: &CustomDataResponse)
fn handle_data_response(&mut self, resp: &CustomDataResponse)
§fn handle_instrument_response(&mut self, resp: &InstrumentResponse)
fn handle_instrument_response(&mut self, resp: &InstrumentResponse)
§fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)
fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)
§fn handle_book_response(&mut self, resp: &BookResponse)
fn handle_book_response(&mut self, resp: &BookResponse)
§fn handle_book_deltas_response(&mut self, resp: &BookDeltasResponse)
fn handle_book_deltas_response(&mut self, resp: &BookDeltasResponse)
§fn handle_book_depth_response(&mut self, resp: &BookDepthResponse)
fn handle_book_depth_response(&mut self, resp: &BookDepthResponse)
§fn handle_quotes_response(&mut self, resp: &QuotesResponse)where
Self: DataActorNative,
fn handle_quotes_response(&mut self, resp: &QuotesResponse)where
Self: DataActorNative,
§fn handle_trades_response(&mut self, resp: &TradesResponse)where
Self: DataActorNative,
fn handle_trades_response(&mut self, resp: &TradesResponse)where
Self: DataActorNative,
§fn handle_bars_response(&mut self, resp: &BarsResponse)where
Self: DataActorNative,
fn handle_bars_response(&mut self, resp: &BarsResponse)where
Self: DataActorNative,
§fn handle_funding_rates_response(&mut self, resp: &FundingRatesResponse)
fn handle_funding_rates_response(&mut self, resp: &FundingRatesResponse)
§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.§fn subscribe_signal(&mut self, name: &str, priority: Option<u32>)
fn subscribe_signal(&mut self, name: &str, priority: Option<u32>)
§fn subscribe_queue_state(
&mut self,
channel: Option<SystemChannel>,
priority: Option<u32>,
)
fn subscribe_queue_state( &mut self, channel: Option<SystemChannel>, priority: Option<u32>, )
QueueStateChanged] events. Read more§fn subscribe_socket_state(
&mut self,
client_id: Option<ClientId>,
endpoint: Option<&str>,
priority: Option<u32>,
)
fn subscribe_socket_state( &mut self, client_id: Option<ClientId>, endpoint: Option<&str>, priority: Option<u32>, )
SocketStateChanged] events. Read more§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.§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.§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.§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>, )
§fn subscribe_book_depth(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
managed: bool,
params: Option<Params>,
)
fn subscribe_book_depth( &mut self, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, managed: bool, 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>,
)
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.§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.§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.§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.§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.§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.§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.§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.§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.§fn subscribe_option_chain(
&mut self,
series_id: OptionSeriesId,
strike_range: StrikeRange,
snapshot_interval_ms: Option<u64>,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_option_chain( &mut self, series_id: OptionSeriesId, strike_range: StrikeRange, snapshot_interval_ms: Option<u64>, client_id: Option<ClientId>, params: Option<Params>, )
§fn subscribe_blocks(
&mut self,
chain: Blockchain,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_blocks( &mut self, chain: Blockchain, client_id: Option<ClientId>, params: Option<Params>, )
Block] data for the chain.§fn subscribe_pool(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_pool( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Pool] definition updates for the AMM pool at the instrument_id.§fn subscribe_pool_swaps(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_pool_swaps( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
PoolSwap] data for the instrument_id.§fn subscribe_pool_liquidity_updates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_pool_liquidity_updates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
PoolLiquidityUpdate] data for the instrument_id.§fn subscribe_pool_fee_collects(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_pool_fee_collects( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
PoolFeeCollect] data for the instrument_id.§fn subscribe_pool_flash_events(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_pool_flash_events( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
PoolFlash] events for the given instrument_id.§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.§fn unsubscribe_signal(&mut self, name: &str)
fn unsubscribe_signal(&mut self, name: &str)
Signal] data by name.§fn unsubscribe_queue_state(&mut self, channel: Option<SystemChannel>)
fn unsubscribe_queue_state(&mut self, channel: Option<SystemChannel>)
QueueStateChanged] events for the same subscription filters. Read more§fn unsubscribe_socket_state(
&mut self,
client_id: Option<ClientId>,
endpoint: Option<&str>,
)
fn unsubscribe_socket_state( &mut self, client_id: Option<ClientId>, endpoint: Option<&str>, )
SocketStateChanged] events for the same subscription filters. Read more§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.§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.§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.§fn unsubscribe_book_depth(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_book_depth( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
OrderBookDepth] data for the instrument_id.§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.§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.§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.§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.§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.§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.§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.§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.§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.§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.§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.§fn unsubscribe_blocks(
&mut self,
chain: Blockchain,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_blocks( &mut self, chain: Blockchain, client_id: Option<ClientId>, params: Option<Params>, )
Block] data for the chain.§fn unsubscribe_pool(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_pool( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Pool] definition updates for the AMM pool at the instrument_id.§fn unsubscribe_pool_swaps(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_pool_swaps( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
PoolSwap] data for the instrument_id.§fn unsubscribe_pool_liquidity_updates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_pool_liquidity_updates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
PoolLiquidityUpdate] data for the instrument_id.§fn unsubscribe_pool_fee_collects(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_pool_fee_collects( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
PoolFeeCollect] data for the instrument_id.§fn unsubscribe_pool_flash_events(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_pool_flash_events( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
PoolFlash] events for the given instrument_id.§fn request_data(
&mut self,
data_type: DataType,
client_id: ClientId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZero<usize>>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_data( &mut self, data_type: DataType, client_id: ClientId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, params: Option<Params>, ) -> Result<UUID4, Error>
data_type. Read more§fn request_instrument(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_instrument( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
§fn request_instruments(
&mut self,
venue: Option<Venue>,
start: Option<Timestamp>,
end: Option<Timestamp>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_instruments( &mut self, venue: Option<Venue>, start: Option<Timestamp>, end: Option<Timestamp>, 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>
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_deltas(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_book_deltas( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
§fn request_book_depth(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZero<usize>>,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_book_depth( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
§fn request_quotes(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_quotes( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
§fn request_trades(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_trades( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
§fn request_bars(
&mut self,
bar_type: BarType,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4, Error>
fn request_bars( &mut self, bar_type: BarType, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4, Error>
Source§impl DataActorNative for PyStrategyInner
impl DataActorNative for PyStrategyInner
§fn clock_mut(&mut self) -> RefMut<'_, dyn Clock + 'static>
fn clock_mut(&mut self) -> RefMut<'_, dyn Clock + 'static>
§fn try_clock_mut(
&mut self,
) -> Result<RefMut<'_, dyn Clock + 'static>, ComponentAccessError>
fn try_clock_mut( &mut self, ) -> Result<RefMut<'_, dyn Clock + 'static>, ComponentAccessError>
§fn clock_rc(&self) -> Rc<RefCell<dyn Clock>>
fn clock_rc(&self) -> Rc<RefCell<dyn Clock>>
§fn try_cache_ref(&self) -> Result<Ref<'_, Cache>, ComponentAccessError>
fn try_cache_ref(&self) -> Result<Ref<'_, Cache>, ComponentAccessError>
Source§impl Debug for PyStrategyInner
impl Debug for PyStrategyInner
Source§impl Deref for PyStrategyInner
impl Deref for PyStrategyInner
Source§impl DerefMut for PyStrategyInner
impl DerefMut for PyStrategyInner
Source§impl Strategy for PyStrategyInner
impl Strategy for PyStrategyInner
Source§fn external_order_instrument_ids(&self) -> Option<Vec<InstrumentId>>
fn external_order_instrument_ids(&self) -> Option<Vec<InstrumentId>>
Source§fn on_market_exit(&mut self)
fn on_market_exit(&mut self)
Source§fn post_market_exit(&mut self)
fn post_market_exit(&mut self)
Source§fn on_order_initialized(&mut self, event: OrderInitialized)
fn on_order_initialized(&mut self, event: OrderInitialized)
Source§fn on_order_event(&mut self, event: OrderEventAny)
fn on_order_event(&mut self, event: OrderEventAny)
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_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_order_canceled(&mut self, event: &OrderCanceled)
fn on_order_canceled(&mut self, event: &OrderCanceled)
Source§fn on_order_filled(&mut self, event: &OrderFilled)
fn on_order_filled(&mut self, event: &OrderFilled)
Source§fn on_order_fill_voided(&mut self, event: &OrderFillVoided)
fn on_order_fill_voided(&mut self, event: &OrderFillVoided)
Source§fn on_position_opened(&mut self, event: PositionOpened)
fn on_position_opened(&mut self, event: PositionOpened)
Source§fn on_position_event(&mut self, event: PositionEvent)
fn on_position_event(&mut self, event: PositionEvent)
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 set_external_order_instrument_ids(
&mut self,
instrument_ids: Vec<InstrumentId>,
) -> Result<()>where
Self: StrategyNative,
fn set_external_order_instrument_ids(
&mut self,
instrument_ids: Vec<InstrumentId>,
) -> Result<()>where
Self: StrategyNative,
instrument_ids. Read moreSource§fn strategy_id(&self) -> Option<StrategyId>where
Self: StrategyNative,
fn strategy_id(&self) -> Option<StrategyId>where
Self: StrategyNative,
Source§fn order(&self) -> OrderApi<'_>where
Self: StrategyNative,
fn order(&self) -> OrderApi<'_>where
Self: StrategyNative,
Source§fn portfolio(&self) -> PortfolioApi<'_>where
Self: StrategyNative,
fn portfolio(&self) -> PortfolioApi<'_>where
Self: StrategyNative,
Source§fn submit_order(
&mut self,
order: OrderAny,
position_id: Option<PositionId>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyBinding,
fn submit_order(
&mut self,
order: OrderAny,
position_id: Option<PositionId>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyBinding,
Source§fn submit_order_list(
&mut self,
orders: Vec<OrderAny>,
position_id: Option<PositionId>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
fn submit_order_list(
&mut self,
orders: Vec<OrderAny>,
position_id: Option<PositionId>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
Source§fn modify_order(
&mut self,
client_order_id: ClientOrderId,
quantity: Option<Quantity>,
price: Option<Price>,
trigger_price: Option<Price>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
fn modify_order(
&mut self,
client_order_id: ClientOrderId,
quantity: Option<Quantity>,
price: Option<Price>,
trigger_price: Option<Price>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
Source§fn modify_orders(
&mut self,
updates: Vec<BatchModifyOrder>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
fn modify_orders(
&mut self,
updates: Vec<BatchModifyOrder>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
Source§fn cancel_order(
&mut self,
client_order_id: ClientOrderId,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
fn cancel_order(
&mut self,
client_order_id: ClientOrderId,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
Source§fn cancel_orders(
&mut self,
client_order_ids: Vec<ClientOrderId>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
fn cancel_orders(
&mut self,
client_order_ids: Vec<ClientOrderId>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
Source§fn mark_order_pending_update(&mut self, order: &OrderAny) -> Result<bool>where
Self: StrategyNative,
fn mark_order_pending_update(&mut self, order: &OrderAny) -> Result<bool>where
Self: StrategyNative,
Source§fn mark_order_pending_cancel(&mut self, order: &OrderAny) -> Result<bool>where
Self: StrategyNative,
fn mark_order_pending_cancel(&mut self, order: &OrderAny) -> Result<bool>where
Self: StrategyNative,
Source§fn generate_order_pending_update(
&mut self,
order: &OrderAny,
) -> OrderPendingUpdatewhere
Self: StrategyNative,
fn generate_order_pending_update(
&mut self,
order: &OrderAny,
) -> OrderPendingUpdatewhere
Self: StrategyNative,
OrderPendingUpdate event for an order.Source§fn generate_order_pending_cancel(
&mut self,
order: &OrderAny,
) -> OrderPendingCancelwhere
Self: StrategyNative,
fn generate_order_pending_cancel(
&mut self,
order: &OrderAny,
) -> OrderPendingCancelwhere
Self: StrategyNative,
OrderPendingCancel event for an order.Source§fn cancel_all_orders(
&mut self,
instrument_id: InstrumentId,
order_side: Option<OrderSide>,
client_id: Option<ClientId>,
strategy_only: bool,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
fn cancel_all_orders(
&mut self,
instrument_id: InstrumentId,
order_side: Option<OrderSide>,
client_id: Option<ClientId>,
strategy_only: bool,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
Source§fn close_position(
&mut self,
position: &Position,
client_id: Option<ClientId>,
tags: Option<Vec<Ustr>>,
time_in_force: Option<TimeInForce>,
reduce_only: Option<bool>,
quote_quantity: Option<bool>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
fn close_position(
&mut self,
position: &Position,
client_id: Option<ClientId>,
tags: Option<Vec<Ustr>>,
time_in_force: Option<TimeInForce>,
reduce_only: Option<bool>,
quote_quantity: Option<bool>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
Source§fn close_all_positions(
&mut self,
instrument_id: InstrumentId,
position_side: Option<PositionSide>,
client_id: Option<ClientId>,
tags: Option<Vec<Ustr>>,
time_in_force: Option<TimeInForce>,
reduce_only: Option<bool>,
quote_quantity: Option<bool>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
fn close_all_positions(
&mut self,
instrument_id: InstrumentId,
position_side: Option<PositionSide>,
client_id: Option<ClientId>,
tags: Option<Vec<Ustr>>,
time_in_force: Option<TimeInForce>,
reduce_only: Option<bool>,
quote_quantity: Option<bool>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
Source§fn query_account(
&mut self,
account_id: AccountId,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
fn query_account(
&mut self,
account_id: AccountId,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
Source§fn query_order(
&mut self,
order: &OrderAny,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
fn query_order(
&mut self,
order: &OrderAny,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<()>where
Self: StrategyNative,
Source§fn handle_order_event(&mut self, event: OrderEventAny)where
Self: StrategyNative,
fn handle_order_event(&mut self, event: OrderEventAny)where
Self: StrategyNative,
fn dispatch_manager_actions(&mut self, actions: Vec<OrderManagerAction>)where
Self: StrategyNative,
Source§fn handle_position_event(&mut self, event: PositionEvent)where
Self: StrategyNative,
fn handle_position_event(&mut self, event: PositionEvent)where
Self: StrategyNative,
Source§fn on_start(&mut self) -> Result<()>where
Self: StrategyNative,
fn on_start(&mut self) -> Result<()>where
Self: StrategyNative,
Source§fn on_time_event(&mut self, event: &TimeEvent) -> Result<()>where
Self: StrategyNative + Component,
fn on_time_event(&mut self, event: &TimeEvent) -> Result<()>where
Self: StrategyNative + Component,
Source§fn is_exiting(&self) -> boolwhere
Self: StrategyNative,
fn is_exiting(&self) -> boolwhere
Self: StrategyNative,
Source§fn market_exit(&mut self) -> Result<()>where
Self: StrategyNative,
fn market_exit(&mut self) -> Result<()>where
Self: StrategyNative,
Source§fn check_market_exit(&mut self, _event: TimeEvent)where
Self: StrategyNative + Component,
fn check_market_exit(&mut self, _event: TimeEvent)where
Self: StrategyNative + Component,
Source§fn finalize_market_exit(&mut self)where
Self: StrategyNative + Component,
fn finalize_market_exit(&mut self)where
Self: StrategyNative + Component,
Source§fn cancel_market_exit(&mut self)where
Self: StrategyNative,
fn cancel_market_exit(&mut self)where
Self: StrategyNative,
Source§fn stop(&mut self) -> boolwhere
Self: StrategyNative,
fn stop(&mut self) -> boolwhere
Self: StrategyNative,
Source§fn deny_order(&mut self, order: &OrderAny, reason: Ustr)where
Self: StrategyNative,
fn deny_order(&mut self, order: &OrderAny, reason: Ustr)where
Self: StrategyNative,
OrderDenied event. Read more