pub trait DataActor {
Show 151 methods
// Provided methods
fn actor_id(&self) -> ActorId
where Self: DataActorNative { ... }
fn trader_id(&self) -> Option<TraderId>
where Self: DataActorNative { ... }
fn is_registered(&self) -> bool
where Self: DataActorNative { ... }
fn config(&self) -> &DataActorConfig
where Self: DataActorNative { ... }
fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>> { ... }
fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<()> { ... }
fn on_start(&mut self) -> Result<()> { ... }
fn on_stop(&mut self) -> Result<()> { ... }
fn on_resume(&mut self) -> Result<()> { ... }
fn on_reset(&mut self) -> Result<()> { ... }
fn on_dispose(&mut self) -> Result<()> { ... }
fn on_degrade(&mut self) -> Result<()> { ... }
fn on_fault(&mut self) -> Result<()> { ... }
fn on_time_event(&mut self, event: &TimeEvent) -> Result<()> { ... }
fn on_data(&mut self, data: &CustomData) -> Result<()> { ... }
fn on_signal(&mut self, signal: &Signal) -> Result<()> { ... }
fn on_queue_state(&mut self, event: &QueueStateChanged) -> Result<()> { ... }
fn on_socket_state(&mut self, event: &SocketStateChanged) -> Result<()> { ... }
fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()> { ... }
fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()> { ... }
fn on_book_depth(&mut self, depth: &OrderBookDepth10) -> Result<()> { ... }
fn on_book(&mut self, order_book: &OrderBook) -> Result<()> { ... }
fn on_quote(&mut self, quote: &QuoteTick) -> Result<()> { ... }
fn on_trade(&mut self, tick: &TradeTick) -> Result<()> { ... }
fn on_bar(&mut self, bar: &Bar) -> Result<()> { ... }
fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()> { ... }
fn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()> { ... }
fn on_funding_rate(
&mut self,
funding_rate: &FundingRateUpdate,
) -> Result<()> { ... }
fn on_option_greeks(&mut self, greeks: &OptionGreeks) -> Result<()> { ... }
fn on_option_chain(&mut self, slice: &OptionChainSlice) -> Result<()> { ... }
fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()> { ... }
fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()> { ... }
fn on_block(&mut self, block: &Block) -> Result<()> { ... }
fn on_pool(&mut self, pool: &Pool) -> Result<()> { ... }
fn on_pool_swap(&mut self, swap: &PoolSwap) -> Result<()> { ... }
fn on_pool_liquidity_update(
&mut self,
update: &PoolLiquidityUpdate,
) -> Result<()> { ... }
fn on_pool_fee_collect(&mut self, collect: &PoolFeeCollect) -> Result<()> { ... }
fn on_pool_flash(&mut self, flash: &PoolFlash) -> Result<()> { ... }
fn on_historical_data(&mut self, data: &dyn Any) -> Result<()> { ... }
fn on_historical_book_deltas(
&mut self,
deltas: &[OrderBookDelta],
) -> Result<()> { ... }
fn on_historical_book_depth(
&mut self,
depths: &[OrderBookDepth10],
) -> Result<()> { ... }
fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<()> { ... }
fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()> { ... }
fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()> { ... }
fn on_historical_mark_prices(
&mut self,
mark_prices: &[MarkPriceUpdate],
) -> Result<()> { ... }
fn on_historical_index_prices(
&mut self,
index_prices: &[IndexPriceUpdate],
) -> Result<()> { ... }
fn on_historical_funding_rates(
&mut self,
funding_rates: &[FundingRateUpdate],
) -> Result<()> { ... }
fn clock(&self) -> ClockApi<'_>
where Self: DataActorNative { ... }
fn cache(&self) -> CacheApi<'_>
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_signal(&self, name: &str, value: String, ts_event: UnixNanos)
where Self: DataActorNative { ... }
fn add_synthetic(&self, synthetic: SyntheticInstrument) -> Result<()>
where Self: DataActorNative { ... }
fn update_synthetic(&self, synthetic: SyntheticInstrument) -> Result<()>
where Self: DataActorNative { ... }
fn handle_time_event(&mut self, event: &TimeEvent)
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_queue_state(&mut self, event: &QueueStateChanged)
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_book_deltas(&mut self, deltas: &OrderBookDeltas)
where Self: Component { ... }
fn handle_book_depth(&mut self, depth: &OrderBookDepth10)
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_trade(&mut self, trade: &TradeTick)
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_index_price(&mut self, index_price: &IndexPriceUpdate)
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_chain(&mut self, slice: &OptionChainSlice)
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_block(&mut self, block: &Block)
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_liquidity_update(&mut self, update: &PoolLiquidityUpdate)
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_historical_data(&mut self, data: &dyn Any) { ... }
fn handle_data_response(&mut self, resp: &CustomDataResponse) { ... }
fn handle_instrument_response(&mut self, resp: &InstrumentResponse) { ... }
fn handle_instruments_response(&mut self, resp: &InstrumentsResponse) { ... }
fn handle_book_response(&mut self, resp: &BookResponse) { ... }
fn handle_book_deltas_response(&mut self, resp: &BookDeltasResponse) { ... }
fn handle_book_depth_response(&mut self, resp: &BookDepthResponse) { ... }
fn handle_quotes_response(&mut self, resp: &QuotesResponse)
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_funding_rates_response(&mut self, resp: &FundingRatesResponse) { ... }
fn subscribe_data(
&mut self,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_signal(&mut self, name: &str, priority: Option<u32>)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_queue_state(&mut self, priority: Option<u32>)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_socket_state(&mut self, priority: Option<u32>)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_quotes(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_instruments(
&mut self,
venue: Venue,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_instrument(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_book_deltas(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZeroUsize>,
client_id: Option<ClientId>,
managed: bool,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_book_depth10(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
client_id: Option<ClientId>,
managed: bool,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_book_at_interval(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZeroUsize>,
interval_ms: NonZeroUsize,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_trades(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_bars(
&mut self,
bar_type: BarType,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_mark_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_index_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_funding_rates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_option_greeks(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_instrument_status(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_instrument_close(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_option_chain(
&mut self,
series_id: OptionSeriesId,
strike_range: StrikeRange,
snapshot_interval_ms: Option<u64>,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_blocks(
&mut self,
chain: Blockchain,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_pool(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_pool_swaps(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_pool_liquidity_updates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_pool_fee_collects(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn subscribe_pool_flash_events(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_data(
&mut self,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_signal(&mut self, name: &str)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_queue_state(&mut self)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_socket_state(&mut self)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_instruments(
&mut self,
venue: Venue,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_instrument(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_book_deltas(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_book_depth10(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_book_at_interval(
&mut self,
instrument_id: InstrumentId,
interval_ms: NonZeroUsize,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_quotes(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_trades(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_bars(
&mut self,
bar_type: BarType,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_mark_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_index_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_funding_rates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_option_greeks(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_instrument_status(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_instrument_close(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_option_chain(
&mut self,
series_id: OptionSeriesId,
client_id: Option<ClientId>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_blocks(
&mut self,
chain: Blockchain,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_pool(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_pool_swaps(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_pool_liquidity_updates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_pool_fee_collects(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn unsubscribe_pool_flash_events(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn request_data(
&mut self,
data_type: DataType,
client_id: ClientId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
params: Option<Params>,
) -> Result<UUID4>
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn request_instrument(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn request_instruments(
&mut self,
venue: Option<Venue>,
start: Option<Timestamp>,
end: Option<Timestamp>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn request_book_snapshot(
&mut self,
instrument_id: InstrumentId,
depth: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn request_book_deltas(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn request_book_depth(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
depth: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn request_quotes(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn request_trades(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn request_bars(
&mut self,
bar_type: BarType,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn request_funding_rates(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
where Self: DataActorNative + 'static + Debug + Sized { ... }
fn reconnect_socket(
&self,
client_id: ClientId,
endpoint: &str,
) -> Result<()>
where Self: DataActorNative { ... }
}Expand description
Defines lifecycle callbacks, data handlers, and subscription/request methods for data actors.
Default methods that read or mutate native runtime state carry explicit
DataActorNative and Component bounds. Implementations that only need
behavioral callbacks do not own or implement native runtime state.
Provided Methods§
Sourcefn actor_id(&self) -> ActorIdwhere
Self: DataActorNative,
fn actor_id(&self) -> ActorIdwhere
Self: DataActorNative,
Returns the actor ID.
Sourcefn trader_id(&self) -> Option<TraderId>where
Self: DataActorNative,
fn trader_id(&self) -> Option<TraderId>where
Self: DataActorNative,
Returns the trader ID this actor is registered to.
Sourcefn is_registered(&self) -> boolwhere
Self: DataActorNative,
fn is_registered(&self) -> boolwhere
Self: DataActorNative,
Returns whether the actor is registered with a trader.
Sourcefn config(&self) -> &DataActorConfigwhere
Self: DataActorNative,
fn config(&self) -> &DataActorConfigwhere
Self: DataActorNative,
Returns the actor configuration.
Sourcefn on_save(&self) -> Result<IndexMap<String, Vec<u8>>>
fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>>
Actions to be performed when the actor state is saved.
§Errors
Returns an error if saving the actor state fails.
Sourcefn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<()>
fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<()>
Actions to be performed when the actor state is loaded.
§Errors
Returns an error if loading the actor state fails.
Sourcefn on_dispose(&mut self) -> Result<()>
fn on_dispose(&mut self) -> Result<()>
Sourcefn on_degrade(&mut self) -> Result<()>
fn on_degrade(&mut self) -> Result<()>
Sourcefn on_time_event(&mut self, event: &TimeEvent) -> Result<()>
fn on_time_event(&mut self, event: &TimeEvent) -> Result<()>
Actions to be performed when receiving a time event.
§Errors
Returns an error if handling the time event fails.
Sourcefn on_data(&mut self, data: &CustomData) -> Result<()>
fn on_data(&mut self, data: &CustomData) -> Result<()>
Actions to be performed when receiving custom data.
§Errors
Returns an error if handling the data fails.
Sourcefn on_signal(&mut self, signal: &Signal) -> Result<()>
fn on_signal(&mut self, signal: &Signal) -> Result<()>
Actions to be performed when receiving a signal.
§Errors
Returns an error if handling the signal fails.
Sourcefn on_queue_state(&mut self, event: &QueueStateChanged) -> Result<()>
fn on_queue_state(&mut self, event: &QueueStateChanged) -> Result<()>
Actions to be performed when receiving a queue state change.
§Errors
Returns an error if handling the queue state change fails.
Sourcefn on_socket_state(&mut self, event: &SocketStateChanged) -> Result<()>
fn on_socket_state(&mut self, event: &SocketStateChanged) -> Result<()>
Actions to be performed when receiving a socket state change.
§Errors
Returns an error if handling the socket state change fails.
Sourcefn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()>
fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()>
Actions to be performed when receiving an instrument.
§Errors
Returns an error if handling the instrument fails.
Sourcefn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()>
fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()>
Actions to be performed when receiving order book deltas.
§Errors
Returns an error if handling the book deltas fails.
Sourcefn on_book_depth(&mut self, depth: &OrderBookDepth10) -> Result<()>
fn on_book_depth(&mut self, depth: &OrderBookDepth10) -> Result<()>
Actions to be performed when receiving an order book depth10 snapshot.
§Errors
Returns an error if handling the book depth fails.
Sourcefn on_book(&mut self, order_book: &OrderBook) -> Result<()>
fn on_book(&mut self, order_book: &OrderBook) -> Result<()>
Actions to be performed when receiving an order book.
§Errors
Returns an error if handling the book fails.
Sourcefn on_quote(&mut self, quote: &QuoteTick) -> Result<()>
fn on_quote(&mut self, quote: &QuoteTick) -> Result<()>
Actions to be performed when receiving a quote.
§Errors
Returns an error if handling the quote fails.
Sourcefn on_trade(&mut self, tick: &TradeTick) -> Result<()>
fn on_trade(&mut self, tick: &TradeTick) -> Result<()>
Actions to be performed when receiving a trade.
§Errors
Returns an error if handling the trade fails.
Sourcefn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()>
fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()>
Actions to be performed when receiving a mark price update.
§Errors
Returns an error if handling the mark price update fails.
Sourcefn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()>
fn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()>
Actions to be performed when receiving an index price update.
§Errors
Returns an error if handling the index price update fails.
Sourcefn on_funding_rate(&mut self, funding_rate: &FundingRateUpdate) -> Result<()>
fn on_funding_rate(&mut self, funding_rate: &FundingRateUpdate) -> Result<()>
Actions to be performed when receiving a funding rate update.
§Errors
Returns an error if handling the funding rate update fails.
Sourcefn on_option_greeks(&mut self, greeks: &OptionGreeks) -> Result<()>
fn on_option_greeks(&mut self, greeks: &OptionGreeks) -> Result<()>
Actions to be performed when receiving exchange-provided option greeks.
§Errors
Returns an error if handling the option greeks fails.
Sourcefn on_option_chain(&mut self, slice: &OptionChainSlice) -> Result<()>
fn on_option_chain(&mut self, slice: &OptionChainSlice) -> Result<()>
Actions to be performed when receiving an option chain slice snapshot.
§Errors
Returns an error if handling the option chain slice fails.
Sourcefn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()>
fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()>
Actions to be performed when receiving an instrument status update.
§Errors
Returns an error if handling the instrument status update fails.
Sourcefn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()>
fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()>
Actions to be performed when receiving an instrument close update.
§Errors
Returns an error if handling the instrument close update fails.
Sourcefn on_block(&mut self, block: &Block) -> Result<()>
fn on_block(&mut self, block: &Block) -> Result<()>
Actions to be performed when receiving a block.
§Errors
Returns an error if handling the block fails.
Sourcefn on_pool_swap(&mut self, swap: &PoolSwap) -> Result<()>
fn on_pool_swap(&mut self, swap: &PoolSwap) -> Result<()>
Actions to be performed when receiving a pool swap.
§Errors
Returns an error if handling the pool swap fails.
Sourcefn on_pool_liquidity_update(
&mut self,
update: &PoolLiquidityUpdate,
) -> Result<()>
fn on_pool_liquidity_update( &mut self, update: &PoolLiquidityUpdate, ) -> Result<()>
Actions to be performed when receiving a pool liquidity update.
§Errors
Returns an error if handling the pool liquidity update fails.
Sourcefn on_pool_fee_collect(&mut self, collect: &PoolFeeCollect) -> Result<()>
fn on_pool_fee_collect(&mut self, collect: &PoolFeeCollect) -> Result<()>
Actions to be performed when receiving a pool fee collect event.
§Errors
Returns an error if handling the pool fee collect fails.
Sourcefn on_pool_flash(&mut self, flash: &PoolFlash) -> Result<()>
fn on_pool_flash(&mut self, flash: &PoolFlash) -> Result<()>
Actions to be performed when receiving a pool flash event.
§Errors
Returns an error if handling the pool flash fails.
Sourcefn on_historical_data(&mut self, data: &dyn Any) -> Result<()>
fn on_historical_data(&mut self, data: &dyn Any) -> Result<()>
Actions to be performed when receiving historical custom data.
The callback runs once per response. A scalar [CustomData] remains scalar, while a
Vec<CustomData> batch remains intact, including when empty.
§Errors
Returns an error if handling the historical data fails.
Sourcefn on_historical_book_deltas(&mut self, deltas: &[OrderBookDelta]) -> Result<()>
fn on_historical_book_deltas(&mut self, deltas: &[OrderBookDelta]) -> Result<()>
Actions to be performed when receiving historical book deltas.
§Errors
Returns an error if handling the historical book deltas fails.
Sourcefn on_historical_book_depth(
&mut self,
depths: &[OrderBookDepth10],
) -> Result<()>
fn on_historical_book_depth( &mut self, depths: &[OrderBookDepth10], ) -> Result<()>
Actions to be performed when receiving historical book depth.
§Errors
Returns an error if handling the historical book depth fails.
Sourcefn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<()>
fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<()>
Actions to be performed when receiving historical quotes.
§Errors
Returns an error if handling the historical quotes fails.
Sourcefn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()>
fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()>
Actions to be performed when receiving historical trades.
§Errors
Returns an error if handling the historical trades fails.
Sourcefn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()>
fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()>
Actions to be performed when receiving historical bars.
§Errors
Returns an error if handling the historical bars fails.
Sourcefn on_historical_mark_prices(
&mut self,
mark_prices: &[MarkPriceUpdate],
) -> Result<()>
fn on_historical_mark_prices( &mut self, mark_prices: &[MarkPriceUpdate], ) -> Result<()>
Actions to be performed when receiving historical mark prices.
§Errors
Returns an error if handling the historical mark prices fails.
Sourcefn on_historical_index_prices(
&mut self,
index_prices: &[IndexPriceUpdate],
) -> Result<()>
fn on_historical_index_prices( &mut self, index_prices: &[IndexPriceUpdate], ) -> Result<()>
Actions to be performed when receiving historical index prices.
§Errors
Returns an error if handling the historical index prices fails.
Sourcefn on_historical_funding_rates(
&mut self,
funding_rates: &[FundingRateUpdate],
) -> Result<()>
fn on_historical_funding_rates( &mut self, funding_rates: &[FundingRateUpdate], ) -> Result<()>
Actions to be performed when receiving historical funding rates.
§Errors
Returns an error if handling the historical funding rates fails.
Sourcefn clock(&self) -> ClockApi<'_>where
Self: DataActorNative,
fn clock(&self) -> ClockApi<'_>where
Self: DataActorNative,
Returns the user-facing clock API.
Sourcefn cache(&self) -> CacheApi<'_>where
Self: DataActorNative,
fn cache(&self) -> CacheApi<'_>where
Self: DataActorNative,
Returns the user-facing cache API.
Sourcefn shutdown_system(&self, reason: Option<String>)where
Self: DataActorNative,
fn shutdown_system(&self, reason: Option<String>)where
Self: DataActorNative,
Sends a shutdown command to the system with an optional reason.
§Panics
Panics if the actor is not registered or has no trader ID.
Sourcefn publish_data(&self, data_type: &DataType, data: &CustomData)where
Self: DataActorNative,
fn publish_data(&self, data_type: &DataType, data: &CustomData)where
Self: DataActorNative,
Publishes data on the message bus under the topic derived from data_type.
data_type is kept as an explicit parameter 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.
Sourcefn 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,
Sourcefn add_synthetic(&self, synthetic: SyntheticInstrument) -> Result<()>where
Self: DataActorNative,
fn add_synthetic(&self, synthetic: SyntheticInstrument) -> Result<()>where
Self: DataActorNative,
Sourcefn update_synthetic(&self, synthetic: SyntheticInstrument) -> Result<()>where
Self: DataActorNative,
fn update_synthetic(&self, synthetic: SyntheticInstrument) -> Result<()>where
Self: DataActorNative,
Sourcefn handle_time_event(&mut self, event: &TimeEvent)where
Self: Component,
fn handle_time_event(&mut self, event: &TimeEvent)where
Self: Component,
Handles a received time event.
Sourcefn handle_data(&mut self, data: &CustomData)where
Self: Component,
fn handle_data(&mut self, data: &CustomData)where
Self: Component,
Handles a received custom data point.
Sourcefn handle_signal(&mut self, signal: &Signal)where
Self: Component,
fn handle_signal(&mut self, signal: &Signal)where
Self: Component,
Handles a received signal.
Sourcefn handle_queue_state(&mut self, event: &QueueStateChanged)where
Self: Component,
fn handle_queue_state(&mut self, event: &QueueStateChanged)where
Self: Component,
Handles a received queue state change.
Sourcefn handle_socket_state(&mut self, event: &SocketStateChanged)where
Self: Component,
fn handle_socket_state(&mut self, event: &SocketStateChanged)where
Self: Component,
Handles a received socket state change.
Sourcefn handle_instrument(&mut self, instrument: &InstrumentAny)where
Self: Component,
fn handle_instrument(&mut self, instrument: &InstrumentAny)where
Self: Component,
Handles a received instrument.
Sourcefn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)where
Self: Component,
fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)where
Self: Component,
Handles received order book deltas.
Sourcefn handle_book_depth(&mut self, depth: &OrderBookDepth10)where
Self: Component,
fn handle_book_depth(&mut self, depth: &OrderBookDepth10)where
Self: Component,
Handles a received order book depth10 snapshot.
Sourcefn handle_book(&mut self, book: &OrderBook)where
Self: Component,
fn handle_book(&mut self, book: &OrderBook)where
Self: Component,
Handles a received order book reference.
Sourcefn handle_quote(&mut self, quote: &QuoteTick)where
Self: DataActorNative + Component,
fn handle_quote(&mut self, quote: &QuoteTick)where
Self: DataActorNative + Component,
Handles a received quote.
Sourcefn handle_trade(&mut self, trade: &TradeTick)where
Self: DataActorNative + Component,
fn handle_trade(&mut self, trade: &TradeTick)where
Self: DataActorNative + Component,
Handles a received trade.
Sourcefn handle_bar(&mut self, bar: &Bar)where
Self: DataActorNative + Component,
fn handle_bar(&mut self, bar: &Bar)where
Self: DataActorNative + Component,
Handles a receiving bar.
Sourcefn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)where
Self: Component,
fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)where
Self: Component,
Handles a received mark price update.
Sourcefn handle_index_price(&mut self, index_price: &IndexPriceUpdate)where
Self: Component,
fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)where
Self: Component,
Handles a received index price update.
Sourcefn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)where
Self: Component,
fn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)where
Self: Component,
Handles a received funding rate update.
Sourcefn handle_option_greeks(&mut self, greeks: &OptionGreeks)where
Self: Component,
fn handle_option_greeks(&mut self, greeks: &OptionGreeks)where
Self: Component,
Handles a received option greeks update.
Sourcefn handle_option_chain(&mut self, slice: &OptionChainSlice)where
Self: Component,
fn handle_option_chain(&mut self, slice: &OptionChainSlice)where
Self: Component,
Handles a received option chain slice snapshot.
Sourcefn handle_instrument_status(&mut self, status: &InstrumentStatus)where
Self: Component,
fn handle_instrument_status(&mut self, status: &InstrumentStatus)where
Self: Component,
Handles a received instrument status.
Sourcefn handle_instrument_close(&mut self, close: &InstrumentClose)where
Self: Component,
fn handle_instrument_close(&mut self, close: &InstrumentClose)where
Self: Component,
Handles a received instrument close.
Sourcefn handle_block(&mut self, block: &Block)where
Self: Component,
fn handle_block(&mut self, block: &Block)where
Self: Component,
Handles a received block.
Sourcefn handle_pool(&mut self, pool: &Pool)where
Self: Component,
fn handle_pool(&mut self, pool: &Pool)where
Self: Component,
Handles a received pool definition update.
Sourcefn handle_pool_swap(&mut self, swap: &PoolSwap)where
Self: Component,
fn handle_pool_swap(&mut self, swap: &PoolSwap)where
Self: Component,
Handles a received pool swap.
Sourcefn handle_pool_liquidity_update(&mut self, update: &PoolLiquidityUpdate)where
Self: Component,
fn handle_pool_liquidity_update(&mut self, update: &PoolLiquidityUpdate)where
Self: Component,
Handles a received pool liquidity update.
Sourcefn handle_pool_fee_collect(&mut self, collect: &PoolFeeCollect)where
Self: Component,
fn handle_pool_fee_collect(&mut self, collect: &PoolFeeCollect)where
Self: Component,
Handles a received pool fee collect.
Sourcefn handle_pool_flash(&mut self, flash: &PoolFlash)where
Self: Component,
fn handle_pool_flash(&mut self, flash: &PoolFlash)where
Self: Component,
Handles a received pool flash event.
Sourcefn handle_historical_data(&mut self, data: &dyn Any)
fn handle_historical_data(&mut self, data: &dyn Any)
Handles received historical data.
Sourcefn handle_data_response(&mut self, resp: &CustomDataResponse)
fn handle_data_response(&mut self, resp: &CustomDataResponse)
Handles a data response.
Sourcefn handle_instrument_response(&mut self, resp: &InstrumentResponse)
fn handle_instrument_response(&mut self, resp: &InstrumentResponse)
Handles an instrument response.
Sourcefn handle_instruments_response(&mut self, resp: &InstrumentsResponse)
fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)
Handles an instruments response.
Sourcefn handle_book_response(&mut self, resp: &BookResponse)
fn handle_book_response(&mut self, resp: &BookResponse)
Handles a book response.
Sourcefn handle_book_deltas_response(&mut self, resp: &BookDeltasResponse)
fn handle_book_deltas_response(&mut self, resp: &BookDeltasResponse)
Handles a book deltas response.
Sourcefn handle_book_depth_response(&mut self, resp: &BookDepthResponse)
fn handle_book_depth_response(&mut self, resp: &BookDepthResponse)
Handles a book depth response.
Sourcefn handle_quotes_response(&mut self, resp: &QuotesResponse)where
Self: DataActorNative,
fn handle_quotes_response(&mut self, resp: &QuotesResponse)where
Self: DataActorNative,
Handles a quotes response.
Sourcefn handle_trades_response(&mut self, resp: &TradesResponse)where
Self: DataActorNative,
fn handle_trades_response(&mut self, resp: &TradesResponse)where
Self: DataActorNative,
Handles a trades response.
Sourcefn handle_bars_response(&mut self, resp: &BarsResponse)where
Self: DataActorNative,
fn handle_bars_response(&mut self, resp: &BarsResponse)where
Self: DataActorNative,
Handles a bars response.
Sourcefn handle_funding_rates_response(&mut self, resp: &FundingRatesResponse)
fn handle_funding_rates_response(&mut self, resp: &FundingRatesResponse)
Handles a funding rates response.
Sourcefn 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>, )
Subscribe to streaming data_type data.
Sourcefn subscribe_signal(&mut self, name: &str, priority: Option<u32>)
fn subscribe_signal(&mut self, name: &str, priority: Option<u32>)
Subscribe to Signal data by name.
An empty name subscribes to every signal.
§Parameters
name: signal name to subscribe to.priority: optional dispatch priority. PassNonefor default ordering (by pattern then handler ID). PassSome(p)when actors sharing a signal need deterministic ordering: higher-priority handlers receive the message before lower-priority handlers.
Re-subscribing does not update an existing priority; call
unsubscribe_signal first.
Sourcefn subscribe_queue_state(&mut self, priority: Option<u32>)
fn subscribe_queue_state(&mut self, priority: Option<u32>)
Subscribes to QueueStateChanged events.
priority controls dispatch order when multiple actors subscribe to the event. Higher
values receive the event first. Re-subscribing does not update an existing priority; call
unsubscribe_queue_state first.
Sourcefn subscribe_socket_state(&mut self, priority: Option<u32>)
fn subscribe_socket_state(&mut self, priority: Option<u32>)
Subscribes to SocketStateChanged events.
priority controls dispatch order when multiple actors subscribe to the event. Higher
values receive the event first. Re-subscribing does not update an existing priority; call
unsubscribe_socket_state first.
Sourcefn 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>, )
Subscribe to streaming [QuoteTick] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [InstrumentAny] data for the venue.
Sourcefn 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>, )
Subscribe to streaming [InstrumentAny] data for the instrument_id.
Sourcefn subscribe_book_deltas(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZeroUsize>,
client_id: Option<ClientId>,
managed: bool,
params: Option<Params>,
)
fn subscribe_book_deltas( &mut self, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZeroUsize>, client_id: Option<ClientId>, managed: bool, params: Option<Params>, )
Subscribe to streaming [OrderBookDeltas] data for the instrument_id.
When managed is true, the data engine maintains an [OrderBook] in the cache for each
instrument the subscription resolves to, applying each batch of deltas as it arrives.
A parent subscription resolves to every matching underlying instrument.
Sourcefn subscribe_book_depth10(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
client_id: Option<ClientId>,
managed: bool,
params: Option<Params>,
)
fn subscribe_book_depth10( &mut self, instrument_id: InstrumentId, book_type: BookType, client_id: Option<ClientId>, managed: bool, params: Option<Params>, )
Subscribe to streaming [OrderBookDepth10] data for the instrument_id.
When managed is true, the data engine maintains an [OrderBook] in the cache for each
instrument the subscription resolves to, applying each update as it arrives.
A parent subscription resolves to every matching underlying instrument.
Sourcefn subscribe_book_at_interval(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZeroUsize>,
interval_ms: NonZeroUsize,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn subscribe_book_at_interval( &mut self, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZeroUsize>, interval_ms: NonZeroUsize, client_id: Option<ClientId>, params: Option<Params>, )
Subscribe to [OrderBook] snapshots at a specified interval for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [TradeTick] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [Bar] data for the bar_type.
Sourcefn 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>, )
Subscribe to streaming [MarkPriceUpdate] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [IndexPriceUpdate] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [FundingRateUpdate] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [OptionGreeks] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [InstrumentStatus] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [InstrumentClose] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [OptionChainSlice] snapshots for the option series_id.
The ATM price is always derived from the exchange-provided forward price embedded in each option greeks/ticker update.
Sourcefn 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>, )
Subscribe to streaming [Block] data for the chain.
Sourcefn 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>, )
Subscribe to streaming [Pool] definition updates for the AMM pool at the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [PoolSwap] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [PoolLiquidityUpdate] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [PoolFeeCollect] data for the instrument_id.
Sourcefn 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>, )
Subscribe to streaming [PoolFlash] events for the given instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming data_type data.
Sourcefn unsubscribe_signal(&mut self, name: &str)
fn unsubscribe_signal(&mut self, name: &str)
Unsubscribe from Signal data by name.
Sourcefn unsubscribe_queue_state(&mut self)
fn unsubscribe_queue_state(&mut self)
Unsubscribes from QueueStateChanged events.
Sourcefn unsubscribe_socket_state(&mut self)
fn unsubscribe_socket_state(&mut self)
Unsubscribes from SocketStateChanged events.
Sourcefn 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>, )
Unsubscribe from streaming [InstrumentAny] data for the venue.
Sourcefn 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>, )
Unsubscribe from streaming [InstrumentAny] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [OrderBookDeltas] data for the instrument_id.
Sourcefn unsubscribe_book_depth10(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_book_depth10( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<Params>, )
Unsubscribe from streaming [OrderBookDepth10] data for the instrument_id.
Sourcefn unsubscribe_book_at_interval(
&mut self,
instrument_id: InstrumentId,
interval_ms: NonZeroUsize,
client_id: Option<ClientId>,
params: Option<Params>,
)
fn unsubscribe_book_at_interval( &mut self, instrument_id: InstrumentId, interval_ms: NonZeroUsize, client_id: Option<ClientId>, params: Option<Params>, )
Unsubscribe from [OrderBook] snapshots at a specified interval for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [QuoteTick] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [TradeTick] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [Bar] data for the bar_type.
Sourcefn 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>, )
Unsubscribe from streaming [MarkPriceUpdate] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [IndexPriceUpdate] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [FundingRateUpdate] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [OptionGreeks] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [InstrumentStatus] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [InstrumentClose] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [OptionChainSlice] snapshots for the option series_id.
Sourcefn 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>, )
Unsubscribe from streaming [Block] data for the chain.
Sourcefn 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>, )
Unsubscribe from streaming [Pool] definition updates for the AMM pool at the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [PoolSwap] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [PoolLiquidityUpdate] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [PoolFeeCollect] data for the instrument_id.
Sourcefn 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>, )
Unsubscribe from streaming [PoolFlash] events for the given instrument_id.
Sourcefn request_data(
&mut self,
data_type: DataType,
client_id: ClientId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
params: Option<Params>,
) -> Result<UUID4>
fn request_data( &mut self, data_type: DataType, client_id: ClientId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZeroUsize>, params: Option<Params>, ) -> Result<UUID4>
Request historical custom data of the given data_type.
§Errors
Returns an error if input parameters are invalid.
Sourcefn request_instrument(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
fn request_instrument( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4>
Request historical InstrumentResponse data for the given instrument_id.
§Errors
Returns an error if input parameters are invalid.
Sourcefn request_instruments(
&mut self,
venue: Option<Venue>,
start: Option<Timestamp>,
end: Option<Timestamp>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
fn request_instruments( &mut self, venue: Option<Venue>, start: Option<Timestamp>, end: Option<Timestamp>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4>
Request historical InstrumentsResponse definitions for the optional venue.
§Errors
Returns an error if input parameters are invalid.
Sourcefn request_book_snapshot(
&mut self,
instrument_id: InstrumentId,
depth: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
fn request_book_snapshot( &mut self, instrument_id: InstrumentId, depth: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4>
Request an [OrderBook] snapshot for the given instrument_id.
§Errors
Returns an error if input parameters are invalid.
Sourcefn request_book_deltas(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
fn request_book_deltas( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4>
Request historical [OrderBookDelta] data for the given instrument_id.
§Errors
Returns an error if input parameters are invalid.
Sourcefn request_book_depth(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
depth: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
fn request_book_depth( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZeroUsize>, depth: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4>
Request historical [OrderBookDepth10] data for the given instrument_id.
§Errors
Returns an error if input parameters are invalid.
Sourcefn request_quotes(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
fn request_quotes( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4>
Request historical [QuoteTick] data for the given instrument_id.
§Errors
Returns an error if input parameters are invalid.
Sourcefn request_trades(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
fn request_trades( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4>
Request historical [TradeTick] data for the given instrument_id.
§Errors
Returns an error if input parameters are invalid.
Sourcefn request_bars(
&mut self,
bar_type: BarType,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
fn request_bars( &mut self, bar_type: BarType, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4>
Request historical [Bar] data for the given bar_type.
§Errors
Returns an error if input parameters are invalid.
Sourcefn request_funding_rates(
&mut self,
instrument_id: InstrumentId,
start: Option<Timestamp>,
end: Option<Timestamp>,
limit: Option<NonZeroUsize>,
client_id: Option<ClientId>,
params: Option<Params>,
) -> Result<UUID4>
fn request_funding_rates( &mut self, instrument_id: InstrumentId, start: Option<Timestamp>, end: Option<Timestamp>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<Params>, ) -> Result<UUID4>
Request historical [FundingRateUpdate] data for the given instrument_id.
§Errors
Returns an error if input parameters are invalid.
Sourcefn reconnect_socket(&self, client_id: ClientId, endpoint: &str) -> Result<()>where
Self: DataActorNative,
fn reconnect_socket(&self, client_id: ClientId, endpoint: &str) -> Result<()>where
Self: DataActorNative,
Requests reconnect of one socket endpoint owned by client_id.
This is a fire-and-observe command. A successful return means the live runner queued the
request. SocketStateChanged events for the same endpoint report whether the transport
enters reconnect mode and later recovers.
§Errors
Returns an error if the actor is not registered, the endpoint label is invalid, the live runner is unavailable, or the runner command channel is closed.
Dyn Compatibility§
This trait is not dyn compatible.
In older versions of Rust, dyn compatibility was called "object safety".