Struct PyDataActor

Source
pub struct PyDataActor { /* private fields */ }

Methods from Deref<Target = DataActorCore>§

Source

pub fn trader_id(&self) -> Option<TraderId>

Returns the trader ID this actor is registered to.

Source

pub fn actor_id(&self) -> ActorId

Source

pub fn timestamp_ns(&self) -> UnixNanos

Source

pub fn clock(&mut self) -> RefMut<'_, dyn Clock>

Returns the clock for the actor (if registered).

§Panics

Panics if the actor has not been registered with a trader.

Source

pub fn register( &mut self, trader_id: TraderId, clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, ) -> Result<()>

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.

Source

pub fn register_warning_event(&mut self, event_type: &str)

Register an event type for warning log levels.

Source

pub fn deregister_warning_event(&mut self, event_type: &str)

Deregister an event type from warning log levels.

Source

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.

Source

pub fn subscribe_data( &mut self, handler: ShareableMessageHandler, data_type: DataType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering data subscriptions from the trait.

§Panics

Panics if the actor is not properly registered.

Source

pub fn subscribe_quotes( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering quotes subscriptions from the trait.

Source

pub fn subscribe_instruments( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, venue: Venue, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering instruments subscriptions from the trait.

Source

pub fn subscribe_instrument( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering instrument subscriptions from the trait.

Source

pub fn subscribe_book_deltas( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZeroUsize>, client_id: Option<ClientId>, managed: bool, params: Option<IndexMap<String, String>>, )

Helper method for registering book deltas subscriptions from the trait.

Source

pub fn subscribe_book_at_interval( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZeroUsize>, interval_ms: NonZeroUsize, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering book snapshots subscriptions from the trait.

Source

pub fn subscribe_trades( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering trades subscriptions from the trait.

Source

pub fn subscribe_bars( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, bar_type: BarType, client_id: Option<ClientId>, await_partial: bool, params: Option<IndexMap<String, String>>, )

Helper method for registering bars subscriptions from the trait.

Source

pub fn subscribe_mark_prices( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering mark prices subscriptions from the trait.

Source

pub fn subscribe_index_prices( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering index prices subscriptions from the trait.

Source

pub fn subscribe_instrument_status( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering instrument status subscriptions from the trait.

Source

pub fn subscribe_instrument_close( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering instrument close subscriptions from the trait.

Source

pub fn subscribe_blocks( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, chain: Blockchain, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering block subscriptions from the trait.

Source

pub fn subscribe_pool( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering pool subscriptions from the trait.

Source

pub fn subscribe_pool_swaps( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering pool swap subscriptions from the trait.

Source

pub fn subscribe_pool_liquidity_updates( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for registering pool liquidity update subscriptions from the trait.

Source

pub fn unsubscribe_data( &self, data_type: DataType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from data.

Source

pub fn unsubscribe_instruments( &self, venue: Venue, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from instruments.

Source

pub fn unsubscribe_instrument( &self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from instrument.

Source

pub fn unsubscribe_book_deltas( &self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from book deltas.

Source

pub fn unsubscribe_book_at_interval( &mut self, instrument_id: InstrumentId, interval_ms: NonZeroUsize, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from book snapshots at interval.

Source

pub fn unsubscribe_quotes( &self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from quotes.

Source

pub fn unsubscribe_trades( &self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from trades.

Source

pub fn unsubscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from bars.

Source

pub fn unsubscribe_mark_prices( &self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from mark prices.

Source

pub fn unsubscribe_index_prices( &self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from index prices.

Source

pub fn unsubscribe_instrument_status( &self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from instrument status.

Source

pub fn unsubscribe_instrument_close( &self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from instrument close.

Source

pub fn unsubscribe_blocks( &mut self, chain: Blockchain, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from blocks.

Source

pub fn unsubscribe_pool( &mut self, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from pool definition updates.

Source

pub fn unsubscribe_pool_swaps( &mut self, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from pool swaps.

Source

pub fn unsubscribe_pool_liquidity_updates( &mut self, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )

Helper method for unsubscribing from pool liquidity updates.

Source

pub fn request_data( &self, data_type: DataType, client_id: ClientId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZeroUsize>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4>

Helper method for requesting data.

§Errors

Returns an error if input parameters are invalid.

Source

pub fn request_instrument( &self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4>

Helper method for requesting instrument.

§Errors

Returns an error if input parameters are invalid.

Source

pub fn request_instruments( &self, venue: Option<Venue>, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4>

Helper method for requesting instruments.

§Errors

Returns an error if input parameters are invalid.

Source

pub fn request_book_snapshot( &self, instrument_id: InstrumentId, depth: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4>

Helper method for requesting book snapshot.

§Errors

Returns an error if input parameters are invalid.

Source

pub fn request_quotes( &self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4>

Helper method for requesting quotes.

§Errors

Returns an error if input parameters are invalid.

Source

pub fn request_trades( &self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4>

Helper method for requesting trades.

§Errors

Returns an error if input parameters are invalid.

Source

pub fn request_bars( &self, bar_type: BarType, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4>

Helper method for requesting bars.

§Errors

Returns an error if input parameters are invalid.

Trait Implementations§

Source§

impl DataActor for PyDataActor

Source§

fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>>

Actions to be performed when the actor state is saved. Read more
Source§

fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<()>

Actions to be performed when the actor state is loaded. Read more
Source§

fn on_start(&mut self) -> Result<()>

Actions to be performed on start. Read more
Source§

fn on_stop(&mut self) -> Result<()>

Actions to be performed on stop. Read more
Source§

fn on_resume(&mut self) -> Result<()>

Actions to be performed on resume. Read more
Source§

fn on_reset(&mut self) -> Result<()>

Actions to be performed on reset. Read more
Source§

fn on_dispose(&mut self) -> Result<()>

Actions to be performed on dispose. Read more
Source§

fn on_degrade(&mut self) -> Result<()>

Actions to be performed on degrade. Read more
Source§

fn on_fault(&mut self) -> Result<()>

Actions to be performed on fault. Read more
Source§

fn on_time_event(&mut self, event: &TimeEvent) -> Result<()>

Actions to be performed when receiving a time event. Read more
Source§

fn on_data(&mut self, data: &dyn Any) -> Result<()>

Actions to be performed when receiving custom data. Read more
Source§

fn on_signal(&mut self, signal: &Signal) -> Result<()>

Actions to be performed when receiving a signal. Read more
Source§

fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()>

Actions to be performed when receiving an instrument. Read more
Source§

fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()>

Actions to be performed when receiving order book deltas. Read more
Source§

fn on_book(&mut self, order_book: &OrderBook) -> Result<()>

Actions to be performed when receiving an order book. Read more
Source§

fn on_quote(&mut self, quote: &QuoteTick) -> Result<()>

Actions to be performed when receiving a quote. Read more
Source§

fn on_trade(&mut self, tick: &TradeTick) -> Result<()>

Actions to be performed when receiving a trade. Read more
Source§

fn on_bar(&mut self, bar: &Bar) -> Result<()>

Actions to be performed when receiving a bar. Read more
Source§

fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()>

Actions to be performed when receiving a mark price update. Read more
Source§

fn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()>

Actions to be performed when receiving an index price update. Read more
Source§

fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()>

Actions to be performed when receiving an instrument status update. Read more
Source§

fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()>

Actions to be performed when receiving an instrument close update. Read more
Source§

fn on_block(&mut self, block: &Block) -> Result<()>

Actions to be performed when receiving a block. Read more
Source§

fn on_pool(&mut self, pool: &Pool) -> Result<()>

Actions to be performed when receiving a pool. Read more
Source§

fn on_pool_swap(&mut self, swap: &PoolSwap) -> Result<()>

Actions to be performed when receiving a pool swap. Read more
Source§

fn on_pool_liquidity_update( &mut self, update: &PoolLiquidityUpdate, ) -> Result<()>

Actions to be performed when receiving a pool liquidity update. Read more
Source§

fn on_historical_data(&mut self, data: &dyn Any) -> Result<()>

Actions to be performed when receiving historical data. Read more
Source§

fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<()>

Actions to be performed when receiving historical quotes. Read more
Source§

fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()>

Actions to be performed when receiving historical trades. Read more
Source§

fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()>

Actions to be performed when receiving historical bars. Read more
Source§

fn on_historical_mark_prices( &mut self, mark_prices: &[MarkPriceUpdate], ) -> Result<()>

Actions to be performed when receiving historical mark prices. Read more
Source§

fn on_historical_index_prices( &mut self, index_prices: &[IndexPriceUpdate], ) -> Result<()>

Actions to be performed when receiving historical index prices. Read more
Source§

fn handle_time_event(&mut self, event: &TimeEvent)

Handles a received time event.
Source§

fn handle_data(&mut self, data: &dyn Any)

Handles a received custom data point.
Source§

fn handle_signal(&mut self, signal: &Signal)

Handles a received signal.
Source§

fn handle_instrument(&mut self, instrument: &InstrumentAny)

Handles a received instrument.
Source§

fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)

Handles received order book deltas.
Source§

fn handle_book(&mut self, book: &OrderBook)

Handles a received order book reference.
Source§

fn handle_quote(&mut self, quote: &QuoteTick)

Handles a received quote.
Source§

fn handle_trade(&mut self, trade: &TradeTick)

Handles a received trade.
Source§

fn handle_bar(&mut self, bar: &Bar)

Handles a receiving bar.
Source§

fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)

Handles a received mark price update.
Source§

fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)

Handles a received index price update.
Source§

fn handle_instrument_status(&mut self, status: &InstrumentStatus)

Handles a received instrument status.
Source§

fn handle_instrument_close(&mut self, close: &InstrumentClose)

Handles a received instrument close.
Source§

fn handle_block(&mut self, block: &Block)

Handles a received block.
Source§

fn handle_pool(&mut self, pool: &Pool)

Handles a received pool definition update.
Source§

fn handle_pool_swap(&mut self, swap: &PoolSwap)

Handles a received pool swap.
Source§

fn handle_pool_liquidity_update(&mut self, update: &PoolLiquidityUpdate)

Handles a received pool liquidity update.
Source§

fn handle_historical_data(&mut self, data: &dyn Any)

Handles received historical data.
Source§

fn handle_data_response(&mut self, resp: &CustomDataResponse)

Handles a data response.
Source§

fn handle_instrument_response(&mut self, resp: &InstrumentResponse)

Handles an instrument response.
Source§

fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)

Handles an instruments response.
Source§

fn handle_book_response(&mut self, resp: &BookResponse)

Handles a book response.
Source§

fn handle_quotes_response(&mut self, resp: &QuotesResponse)

Handles a quotes response.
Source§

fn handle_trades_response(&mut self, resp: &TradesResponse)

Handles a trades response.
Source§

fn handle_bars_response(&mut self, resp: &BarsResponse)

Handles a bars response.
Source§

fn subscribe_data( &mut self, data_type: DataType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming data_type data.
Source§

fn subscribe_quotes( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [QuoteTick] data for the instrument_id.
Source§

fn subscribe_instruments( &mut self, venue: Venue, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [InstrumentAny] data for the venue.
Source§

fn subscribe_instrument( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [InstrumentAny] data for the instrument_id.
Source§

fn subscribe_book_deltas( &mut self, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZeroUsize>, client_id: Option<ClientId>, managed: bool, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [OrderBookDeltas] data for the instrument_id.
Source§

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<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to [OrderBook] snapshots at a specified interval for the instrument_id.
Source§

fn subscribe_trades( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [TradeTick] data for the instrument_id.
Source§

fn subscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, await_partial: bool, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [Bar] data for the bar_type.
Source§

fn subscribe_mark_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [MarkPriceUpdate] data for the instrument_id.
Source§

fn subscribe_index_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [IndexPriceUpdate] data for the instrument_id.
Source§

fn subscribe_instrument_status( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [InstrumentStatus] data for the instrument_id.
Source§

fn subscribe_instrument_close( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [InstrumentClose] data for the instrument_id.
Source§

fn subscribe_blocks( &mut self, chain: Blockchain, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [Block] data for the chain.
Source§

fn subscribe_pool( &mut self, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [Pool] definition updates for the AMM pool at the address.
Source§

fn subscribe_pool_swaps( &mut self, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [PoolSwap] data for the address.
Source§

fn subscribe_pool_liquidity_updates( &mut self, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Subscribe to streaming [PoolLiquidityUpdate] data for the address.
Source§

fn unsubscribe_data( &mut self, data_type: DataType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming data_type data.
Source§

fn unsubscribe_instruments( &mut self, venue: Venue, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [InstrumentAny] data for the venue.
Source§

fn unsubscribe_instrument( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [InstrumentAny] data for the instrument_id.
Source§

fn unsubscribe_book_deltas( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [OrderBookDeltas] data for the instrument_id.
Source§

fn unsubscribe_book_at_interval( &mut self, instrument_id: InstrumentId, interval_ms: NonZeroUsize, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from [OrderBook] snapshots at a specified interval for the instrument_id.
Source§

fn unsubscribe_quotes( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [QuoteTick] data for the instrument_id.
Source§

fn unsubscribe_trades( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [TradeTick] data for the instrument_id.
Source§

fn unsubscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [Bar] data for the bar_type.
Source§

fn unsubscribe_mark_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [MarkPriceUpdate] data for the instrument_id.
Source§

fn unsubscribe_index_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [IndexPriceUpdate] data for the instrument_id.
Source§

fn unsubscribe_instrument_status( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [InstrumentStatus] data for the instrument_id.
Source§

fn unsubscribe_instrument_close( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [InstrumentClose] data for the instrument_id.
Source§

fn unsubscribe_blocks( &mut self, chain: Blockchain, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [Block] data for the chain.
Source§

fn unsubscribe_pool( &mut self, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [Pool] definition updates for the AMM pool at the address.
Source§

fn unsubscribe_pool_swaps( &mut self, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [PoolSwap] data for the address.
Source§

fn unsubscribe_pool_liquidity_updates( &mut self, address: Address, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
where Self: 'static + Debug + Sized,

Unsubscribe from streaming [PoolLiquidityUpdate] data for the address.
Source§

fn request_data( &mut self, data_type: DataType, client_id: ClientId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZeroUsize>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4>
where Self: 'static + Debug + Sized,

Request historical custom data of the given data_type. Read more
Source§

fn request_instrument( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4>
where Self: 'static + Debug + Sized,

Request historical InstrumentResponse data for the given instrument_id. Read more
Source§

fn request_instruments( &mut self, venue: Option<Venue>, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4>
where Self: 'static + Debug + Sized,

Request historical InstrumentsResponse definitions for the optional venue. Read more
Source§

fn request_book_snapshot( &mut self, instrument_id: InstrumentId, depth: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4>
where Self: 'static + Debug + Sized,

Request an [OrderBook] snapshot for the given instrument_id. Read more
Source§

fn request_quotes( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4>
where Self: 'static + Debug + Sized,

Request historical [QuoteTick] data for the given instrument_id. Read more
Source§

fn request_trades( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4>
where Self: 'static + Debug + Sized,

Request historical [TradeTick] data for the given instrument_id. Read more
Source§

fn request_bars( &mut self, bar_type: BarType, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZeroUsize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4>
where Self: 'static + Debug + Sized,

Request historical [Bar] data for the given bar_type. Read more
Source§

impl Debug for PyDataActor

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Deref for PyDataActor

Source§

type Target = DataActorCore

The resulting type after dereferencing.
Source§

fn deref(&self) -> &Self::Target

Dereferences the value.
Source§

impl DerefMut for PyDataActor

Source§

fn deref_mut(&mut self) -> &mut Self::Target

Mutably dereferences the value.
Source§

impl<'py> IntoPyObject<'py> for PyDataActor

Source§

type Target = PyDataActor

The Python output type
Source§

type Output = Bound<'py, <PyDataActor as IntoPyObject<'py>>::Target>

The smart pointer type to use. Read more
Source§

type Error = PyErr

The type returned in the event of a conversion error.
Source§

fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>

Performs the conversion.
Source§

impl PyClass for PyDataActor

Source§

type Frozen = False

Whether the pyclass is frozen. Read more
Source§

impl PyClassBaseType for PyDataActor

Source§

type LayoutAsBase = PyClassObject<PyDataActor>

Source§

type BaseNativeType = <PyDataActor as PyClassImpl>::BaseNativeType

Source§

type Initializer = PyClassInitializer<PyDataActor>

Source§

type PyClassMutability = <PyDataActor as PyClassImpl>::PyClassMutability

Source§

impl PyClassImpl for PyDataActor

Source§

const IS_BASETYPE: bool = true

#[pyclass(subclass)]
Source§

const IS_SUBCLASS: bool = false

#[pyclass(extends=…)]
Source§

const IS_MAPPING: bool = false

#[pyclass(mapping)]
Source§

const IS_SEQUENCE: bool = false

#[pyclass(sequence)]
Source§

const IS_IMMUTABLE_TYPE: bool = false

#[pyclass(immutable_type)]
Source§

type BaseType = PyAny

Base class
Source§

type ThreadChecker = ThreadCheckerImpl

This handles following two situations: Read more
Source§

type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild

Immutable or mutable
Source§

type Dict = PyClassDummySlot

Specify this class has #[pyclass(dict)] or not.
Source§

type WeakRef = PyClassDummySlot

Specify this class has #[pyclass(weakref)] or not.
Source§

type BaseNativeType = PyAny

The closest native ancestor. This is PyAny by default, and when you declare #[pyclass(extends=PyDict)], it’s PyDict.
Source§

fn items_iter() -> PyClassItemsIter

Source§

fn doc(py: Python<'_>) -> PyResult<&'static CStr>

Rendered class doc
Source§

fn lazy_type_object() -> &'static LazyTypeObject<Self>

§

fn dict_offset() -> Option<isize>

§

fn weaklist_offset() -> Option<isize>

Source§

impl PyClassNewTextSignature<PyDataActor> for PyClassImplCollector<PyDataActor>

Source§

fn new_text_signature(self) -> Option<&'static str>

Source§

impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a PyDataActor

Source§

type Holder = Option<PyRef<'py, PyDataActor>>

Source§

fn extract( obj: &'a Bound<'py, PyAny>, holder: &'a mut Self::Holder, ) -> PyResult<Self>

Source§

impl<'a, 'py> PyFunctionArgument<'a, 'py, false> for &'a mut PyDataActor

Source§

type Holder = Option<PyRefMut<'py, PyDataActor>>

Source§

fn extract( obj: &'a Bound<'py, PyAny>, holder: &'a mut Self::Holder, ) -> PyResult<Self>

Source§

impl PyMethods<PyDataActor> for PyClassImplCollector<PyDataActor>

Source§

fn py_methods(self) -> &'static PyClassItems

Source§

impl PyTypeInfo for PyDataActor

Source§

const NAME: &'static str = "DataActor"

Class name.
Source§

const MODULE: Option<&'static str>

Module name, if any.
Source§

fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject

Returns the PyTypeObject instance for this type.
§

fn type_object(py: Python<'_>) -> Bound<'_, PyType>

Returns the safe abstraction over the type object.
§

fn is_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type or a subclass of this type.
§

fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of this type.
Source§

impl DerefToPyAny for PyDataActor

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Actor for T
where T: DataActor + Debug + 'static,

Source§

fn id(&self) -> Ustr

The unique identifier for the actor.
Source§

fn handle(&mut self, msg: &(dyn Any + 'static))

Handles the msg.
Source§

fn as_any(&self) -> &(dyn Any + 'static)

Returns a reference to self as Any, for downcasting support.
Source§

fn as_any_mut(&mut self) -> &mut dyn Any
where Self: Sized,

Returns a mutable reference to self as Any, for downcasting support. Read more
Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Component for T
where T: DataActor + Debug + 'static,

Source§

fn component_id(&self) -> ComponentId

Returns the unique identifier for this component.
Source§

fn state(&self) -> ComponentState

Returns the current state of the component.
Source§

fn transition_state(&mut self, trigger: ComponentTrigger) -> Result<(), Error>

Transition the component with the state trigger. Read more
Source§

fn register( &mut self, trader_id: TraderId, clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, ) -> Result<(), Error>

Registers the component with a system. Read more
Source§

fn on_start(&mut self) -> Result<(), Error>

Actions to be performed on start. Read more
Source§

fn on_stop(&mut self) -> Result<(), Error>

Actions to be performed on stop. Read more
Source§

fn on_resume(&mut self) -> Result<(), Error>

Actions to be performed on resume. Read more
Source§

fn on_degrade(&mut self) -> Result<(), Error>

Actions to be performed on degrade. Read more
Source§

fn on_fault(&mut self) -> Result<(), Error>

Actions to be performed on fault. Read more
Source§

fn on_reset(&mut self) -> Result<(), Error>

Actions to be performed on reset. Read more
Source§

fn on_dispose(&mut self) -> Result<(), Error>

Actions to be performed on dispose. Read more
Source§

fn is_ready(&self) -> bool

Returns whether the component is ready.
Source§

fn not_running(&self) -> bool

Returns whether the component is not running.
Source§

fn is_running(&self) -> bool

Returns whether the component is running.
Source§

fn is_stopped(&self) -> bool

Returns whether the component is stopped.
Source§

fn is_degraded(&self) -> bool

Returns whether the component has been degraded.
Source§

fn is_faulted(&self) -> bool

Returns whether the component has been faulted.
Source§

fn is_disposed(&self) -> bool

Returns whether the component has been disposed.
Source§

fn initialize(&mut self) -> Result<()>

Initializes the component. Read more
Source§

fn start(&mut self) -> Result<()>

Starts the component. Read more
Source§

fn stop(&mut self) -> Result<()>

Stops the component. Read more
Source§

fn resume(&mut self) -> Result<()>

Resumes the component. Read more
Source§

fn degrade(&mut self) -> Result<()>

Degrades the component. Read more
Source§

fn fault(&mut self) -> Result<()>

Faults the component. Read more
Source§

fn reset(&mut self) -> Result<()>

Resets the component to its initial state. Read more
Source§

fn dispose(&mut self) -> Result<()>

Disposes of the component, releasing any resources. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

§

impl<'py, T> IntoPyObjectExt<'py> for T
where T: IntoPyObject<'py>,

§

fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>

Converts self into an owned Python object, dropping type information.
§

fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>

Converts self into an owned Python object, dropping type information and unbinding it from the 'py lifetime.
§

fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>

Converts self into a Python object. Read more
Source§

impl<'py, T> IntoPyObjectPoseiExt<'py> for T
where T: IntoPyObjectExt<'py>,

Source§

fn into_py_any_unwrap(self, py: Python<'py>) -> Py<PyAny>

Convert self into a [PyObject] while panicking if the conversion fails. Read more
§

impl<T> PyTypeCheck for T
where T: PyTypeInfo,

§

const NAME: &'static str = <T as PyTypeInfo>::NAME

Name of self. This is used in error messages, for example.
§

fn type_check(object: &Bound<'_, PyAny>) -> bool

Checks if object is an instance of Self, which may include a subtype. Read more
Source§

impl<P, T> Receiver for P
where P: Deref<Target = T> + ?Sized, T: ?Sized,

Source§

type Target = T

🔬This is a nightly-only experimental API. (arbitrary_self_types)
The target type on which the method may be called.
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more