pub struct BlockchainSubscriberActor {
pub(crate) core: DataActorCore,
pub(crate) config: BlockchainSubscriberActorConfig,
pub received_blocks: Vec<Block>,
pub received_pool_swaps: Vec<PoolSwap>,
pub received_pool_liquidity_updates: Vec<PoolLiquidityUpdate>,
pub received_pools: Vec<Pool>,
}Expand description
A basic blockchain subscriber actor that monitors DeFi activities.
This actor demonstrates how to use the DataActor trait to monitor blockchain data
from DEXs, pools, and other DeFi protocols. It logs received blocks and swaps
to demonstrate the data flow.
Fields§
§core: DataActorCore§config: BlockchainSubscriberActorConfig§received_blocks: Vec<Block>§received_pool_swaps: Vec<PoolSwap>§received_pool_liquidity_updates: Vec<PoolLiquidityUpdate>§received_pools: Vec<Pool>Implementations§
Source§impl BlockchainSubscriberActor
impl BlockchainSubscriberActor
Sourcepub fn new(config: BlockchainSubscriberActorConfig) -> Self
pub fn new(config: BlockchainSubscriberActorConfig) -> Self
Creates a new BlockchainSubscriberActor instance.
Sourcepub const fn block_count(&self) -> usize
pub const fn block_count(&self) -> usize
Returns the number of blocks received by this actor.
Sourcepub const fn pool_count(&self) -> usize
pub const fn pool_count(&self) -> usize
Returns the number of pools received by this actor.
Sourcepub const fn pool_swap_count(&self) -> usize
pub const fn pool_swap_count(&self) -> usize
Returns the number of swaps received by this actor.
Sourcepub const fn pool_liquidity_update_count(&self) -> usize
pub const fn pool_liquidity_update_count(&self) -> usize
Returns the number of liquidity updates received by this actor.
Methods from Deref<Target = DataActorCore>§
pub fn mem_address(&self) -> String
pub fn mem_address(&self) -> String
Returns the memory address of this instance as a hexadecimal string.
pub fn state(&self) -> ComponentState
pub fn state(&self) -> ComponentState
Returns the actors state.
pub fn actor_id(&self) -> ActorId
pub fn actor_id(&self) -> ActorId
Returns the actors ID.
pub fn timestamp_ns(&self) -> UnixNanos
pub fn timestamp_ns(&self) -> UnixNanos
Returns a UNIX nanoseconds timestamp from the actor’s internal clock.
pub fn clock(&mut self) -> RefMut<'_, dyn Clock>
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.
pub fn clock_rc(&self) -> Rc<RefCell<dyn Clock>>
pub fn clock_rc(&self) -> Rc<RefCell<dyn Clock>>
Returns a clone of the reference-counted clock.
§Panics
Panics if the actor has not yet been registered (clock is None).
pub fn cache(&self) -> Ref<'_, Cache>
pub fn cache(&self) -> Ref<'_, Cache>
Returns a read-only reference to the cache.
§Panics
Panics if the actor has not yet been registered (cache is None).
pub fn cache_rc(&self) -> Rc<RefCell<Cache>>
pub fn cache_rc(&self) -> Rc<RefCell<Cache>>
Returns a clone of the reference-counted cache.
§Panics
Panics if the actor has not yet been registered (cache is None).
pub fn register(
&mut self,
trader_id: TraderId,
clock: Rc<RefCell<dyn Clock>>,
cache: Rc<RefCell<Cache>>,
) -> Result<(), Error>
pub fn register( &mut self, trader_id: TraderId, clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, ) -> Result<(), Error>
Register the data actor with a trader.
§Errors
Returns an error if the actor has already been registered with a trader or if the provided dependencies are invalid.
pub fn register_warning_event(&mut self, event_type: &str)
pub fn register_warning_event(&mut self, event_type: &str)
Register an event type for warning log levels.
pub fn deregister_warning_event(&mut self, event_type: &str)
pub fn deregister_warning_event(&mut self, event_type: &str)
Deregister an event type from warning log levels.
pub fn is_registered(&self) -> bool
pub fn shutdown_system(&self, reason: Option<String>)
pub fn shutdown_system(&self, reason: Option<String>)
Sends a shutdown command to the system with an optional reason.
§Panics
Panics if the actor is not registered or has no trader ID.
pub fn subscribe_data(
&mut self,
handler: ShareableMessageHandler,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
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.
pub fn subscribe_quotes(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
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.
pub fn subscribe_instruments(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
venue: Venue,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
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.
pub fn subscribe_instrument(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
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.
pub fn subscribe_book_deltas(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
managed: bool,
params: Option<IndexMap<String, String>>,
)
pub fn subscribe_book_deltas( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, managed: bool, params: Option<IndexMap<String, String>>, )
Helper method for registering book deltas subscriptions from the trait.
pub fn subscribe_book_at_interval(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZero<usize>>,
interval_ms: NonZero<usize>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn subscribe_book_at_interval( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, interval_ms: NonZero<usize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for registering book snapshots subscriptions from the trait.
pub fn subscribe_trades(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
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.
pub fn subscribe_bars(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
bar_type: BarType,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn subscribe_bars( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, bar_type: BarType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for registering bars subscriptions from the trait.
pub fn subscribe_mark_prices(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
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.
pub fn subscribe_index_prices(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
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.
pub fn subscribe_funding_rates(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn subscribe_funding_rates( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for registering funding rates subscriptions from the trait.
pub fn subscribe_instrument_status(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
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.
pub fn subscribe_instrument_close(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
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.
pub fn subscribe_order_fills(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
)
pub fn subscribe_order_fills( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, )
Helper method for registering order fills subscriptions from the trait.
pub fn unsubscribe_data(
&mut self,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_data( &mut self, data_type: DataType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from data.
pub fn unsubscribe_instruments(
&mut self,
venue: Venue,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_instruments( &mut self, venue: Venue, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from instruments.
pub fn unsubscribe_instrument(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_instrument( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from instrument.
pub fn unsubscribe_book_deltas(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_book_deltas( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from book deltas.
pub fn unsubscribe_book_at_interval(
&mut self,
instrument_id: InstrumentId,
interval_ms: NonZero<usize>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_book_at_interval( &mut self, instrument_id: InstrumentId, interval_ms: NonZero<usize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from book snapshots at interval.
pub fn unsubscribe_quotes(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_quotes( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from quotes.
pub fn unsubscribe_trades(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_trades( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from trades.
pub fn unsubscribe_bars(
&mut self,
bar_type: BarType,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from bars.
pub fn unsubscribe_mark_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_mark_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from mark prices.
pub fn unsubscribe_index_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_index_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from index prices.
pub fn unsubscribe_funding_rates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_funding_rates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from funding rates.
pub fn unsubscribe_instrument_status(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_instrument_status( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from instrument status.
pub fn unsubscribe_instrument_close(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_instrument_close( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from instrument close.
pub fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
pub fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
Helper method for unsubscribing from order fills.
pub fn request_data(
&self,
data_type: DataType,
client_id: ClientId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
params: Option<IndexMap<String, String>>,
handler: ShareableMessageHandler,
) -> Result<UUID4, Error>
pub fn request_data( &self, data_type: DataType, client_id: ClientId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4, Error>
pub fn request_instrument(
&self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
handler: ShareableMessageHandler,
) -> Result<UUID4, Error>
pub fn request_instrument( &self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4, Error>
pub fn request_instruments(
&self,
venue: Option<Venue>,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
handler: ShareableMessageHandler,
) -> Result<UUID4, Error>
pub fn request_instruments( &self, venue: Option<Venue>, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4, Error>
pub fn request_book_snapshot(
&self,
instrument_id: InstrumentId,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
handler: ShareableMessageHandler,
) -> Result<UUID4, Error>
pub fn request_book_snapshot( &self, instrument_id: InstrumentId, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4, Error>
Helper method for requesting book snapshot.
§Errors
Returns an error if input parameters are invalid.
pub fn request_quotes(
&self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
handler: ShareableMessageHandler,
) -> Result<UUID4, Error>
pub fn request_quotes( &self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4, Error>
pub fn request_trades(
&self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
handler: ShareableMessageHandler,
) -> Result<UUID4, Error>
pub fn request_trades( &self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4, Error>
pub fn request_bars(
&self,
bar_type: BarType,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
handler: ShareableMessageHandler,
) -> Result<UUID4, Error>
pub fn request_bars( &self, bar_type: BarType, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, handler: ShareableMessageHandler, ) -> Result<UUID4, Error>
pub fn subscribe_blocks(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
chain: Blockchain,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
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.
pub fn subscribe_pool(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn subscribe_pool( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for registering pool subscriptions from the trait.
pub fn subscribe_pool_swaps(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn subscribe_pool_swaps( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for registering pool swap subscriptions from the trait.
pub fn subscribe_pool_liquidity_updates(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn subscribe_pool_liquidity_updates( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for registering pool liquidity update subscriptions from the trait.
pub fn subscribe_pool_fee_collects(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn subscribe_pool_fee_collects( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for registering pool fee collect subscriptions from the trait.
pub fn subscribe_pool_flash_events(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn subscribe_pool_flash_events( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for registering pool flash event subscriptions from the trait.
pub fn unsubscribe_blocks(
&mut self,
chain: Blockchain,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_blocks( &mut self, chain: Blockchain, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from blocks.
pub fn unsubscribe_pool(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_pool( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from pool definition updates.
pub fn unsubscribe_pool_swaps(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_pool_swaps( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from pool swaps.
pub fn unsubscribe_pool_liquidity_updates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_pool_liquidity_updates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from pool liquidity updates.
pub fn unsubscribe_pool_fee_collects(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_pool_fee_collects( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from pool fee collects.
pub fn unsubscribe_pool_flash_events(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
pub fn unsubscribe_pool_flash_events( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Helper method for unsubscribing from pool flash events.
Trait Implementations§
Source§impl DataActor for BlockchainSubscriberActor
impl DataActor for BlockchainSubscriberActor
Source§fn on_block(&mut self, block: &Block) -> Result<()>
fn on_block(&mut self, block: &Block) -> Result<()>
Source§fn on_pool_swap(&mut self, swap: &PoolSwap) -> Result<()>
fn on_pool_swap(&mut self, swap: &PoolSwap) -> Result<()>
§fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>, Error>
fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>, Error>
§fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<(), Error>
fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<(), Error>
§fn on_time_event(&mut self, event: &TimeEvent) -> Result<(), Error>
fn on_time_event(&mut self, event: &TimeEvent) -> Result<(), Error>
§fn on_data(&mut self, data: &(dyn Any + 'static)) -> Result<(), Error>
fn on_data(&mut self, data: &(dyn Any + 'static)) -> Result<(), Error>
§fn on_signal(&mut self, signal: &Signal) -> Result<(), Error>
fn on_signal(&mut self, signal: &Signal) -> Result<(), Error>
§fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<(), Error>
fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<(), Error>
§fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<(), Error>
fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<(), Error>
§fn on_book(&mut self, order_book: &OrderBook) -> Result<(), Error>
fn on_book(&mut self, order_book: &OrderBook) -> Result<(), Error>
§fn on_quote(&mut self, quote: &QuoteTick) -> Result<(), Error>
fn on_quote(&mut self, quote: &QuoteTick) -> Result<(), Error>
§fn on_trade(&mut self, tick: &TradeTick) -> Result<(), Error>
fn on_trade(&mut self, tick: &TradeTick) -> Result<(), Error>
§fn on_bar(&mut self, bar: &Bar) -> Result<(), Error>
fn on_bar(&mut self, bar: &Bar) -> Result<(), Error>
§fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<(), Error>
fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<(), Error>
§fn on_index_price(
&mut self,
index_price: &IndexPriceUpdate,
) -> Result<(), Error>
fn on_index_price( &mut self, index_price: &IndexPriceUpdate, ) -> Result<(), Error>
§fn on_funding_rate(
&mut self,
funding_rate: &FundingRateUpdate,
) -> Result<(), Error>
fn on_funding_rate( &mut self, funding_rate: &FundingRateUpdate, ) -> Result<(), Error>
§fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<(), Error>
fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<(), Error>
§fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<(), Error>
fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<(), Error>
§fn on_order_filled(&mut self, event: &OrderFilled) -> Result<(), Error>
fn on_order_filled(&mut self, event: &OrderFilled) -> Result<(), Error>
§fn on_pool(&mut self, pool: &Pool) -> Result<(), Error>
fn on_pool(&mut self, pool: &Pool) -> Result<(), Error>
§fn on_pool_liquidity_update(
&mut self,
update: &PoolLiquidityUpdate,
) -> Result<(), Error>
fn on_pool_liquidity_update( &mut self, update: &PoolLiquidityUpdate, ) -> Result<(), Error>
§fn on_pool_fee_collect(&mut self, collect: &PoolFeeCollect) -> Result<(), Error>
fn on_pool_fee_collect(&mut self, collect: &PoolFeeCollect) -> Result<(), Error>
§fn on_pool_flash(&mut self, flash: &PoolFlash) -> Result<(), Error>
fn on_pool_flash(&mut self, flash: &PoolFlash) -> Result<(), Error>
§fn on_historical_data(
&mut self,
data: &(dyn Any + 'static),
) -> Result<(), Error>
fn on_historical_data( &mut self, data: &(dyn Any + 'static), ) -> Result<(), Error>
§fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<(), Error>
fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<(), Error>
§fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<(), Error>
fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<(), Error>
§fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<(), Error>
fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<(), Error>
§fn on_historical_mark_prices(
&mut self,
mark_prices: &[MarkPriceUpdate],
) -> Result<(), Error>
fn on_historical_mark_prices( &mut self, mark_prices: &[MarkPriceUpdate], ) -> Result<(), Error>
§fn on_historical_index_prices(
&mut self,
index_prices: &[IndexPriceUpdate],
) -> Result<(), Error>
fn on_historical_index_prices( &mut self, index_prices: &[IndexPriceUpdate], ) -> Result<(), Error>
§fn handle_time_event(&mut self, event: &TimeEvent)
fn handle_time_event(&mut self, event: &TimeEvent)
§fn handle_data(&mut self, data: &(dyn Any + 'static))
fn handle_data(&mut self, data: &(dyn Any + 'static))
§fn handle_signal(&mut self, signal: &Signal)
fn handle_signal(&mut self, signal: &Signal)
§fn handle_instrument(&mut self, instrument: &InstrumentAny)
fn handle_instrument(&mut self, instrument: &InstrumentAny)
§fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)
fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)
§fn handle_book(&mut self, book: &OrderBook)
fn handle_book(&mut self, book: &OrderBook)
§fn handle_quote(&mut self, quote: &QuoteTick)
fn handle_quote(&mut self, quote: &QuoteTick)
§fn handle_trade(&mut self, trade: &TradeTick)
fn handle_trade(&mut self, trade: &TradeTick)
§fn handle_bar(&mut self, bar: &Bar)
fn handle_bar(&mut self, bar: &Bar)
§fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)
fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)
§fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)
fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)
§fn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)
fn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)
§fn handle_instrument_status(&mut self, status: &InstrumentStatus)
fn handle_instrument_status(&mut self, status: &InstrumentStatus)
§fn handle_instrument_close(&mut self, close: &InstrumentClose)
fn handle_instrument_close(&mut self, close: &InstrumentClose)
§fn handle_order_filled(&mut self, event: &OrderFilled)
fn handle_order_filled(&mut self, event: &OrderFilled)
§fn handle_block(&mut self, block: &Block)
fn handle_block(&mut self, block: &Block)
§fn handle_pool(&mut self, pool: &Pool)
fn handle_pool(&mut self, pool: &Pool)
§fn handle_pool_swap(&mut self, swap: &PoolSwap)
fn handle_pool_swap(&mut self, swap: &PoolSwap)
§fn handle_pool_liquidity_update(&mut self, update: &PoolLiquidityUpdate)
fn handle_pool_liquidity_update(&mut self, update: &PoolLiquidityUpdate)
§fn handle_pool_fee_collect(&mut self, collect: &PoolFeeCollect)
fn handle_pool_fee_collect(&mut self, collect: &PoolFeeCollect)
§fn handle_pool_flash(&mut self, flash: &PoolFlash)
fn handle_pool_flash(&mut self, flash: &PoolFlash)
§fn handle_historical_data(&mut self, data: &(dyn Any + 'static))
fn handle_historical_data(&mut self, data: &(dyn Any + 'static))
§fn handle_data_response(&mut self, resp: &CustomDataResponse)
fn handle_data_response(&mut self, resp: &CustomDataResponse)
§fn handle_instrument_response(&mut self, resp: &InstrumentResponse)
fn handle_instrument_response(&mut self, resp: &InstrumentResponse)
§fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)
fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)
§fn handle_book_response(&mut self, resp: &BookResponse)
fn handle_book_response(&mut self, resp: &BookResponse)
§fn handle_quotes_response(&mut self, resp: &QuotesResponse)
fn handle_quotes_response(&mut self, resp: &QuotesResponse)
§fn handle_trades_response(&mut self, resp: &TradesResponse)
fn handle_trades_response(&mut self, resp: &TradesResponse)
§fn handle_bars_response(&mut self, resp: &BarsResponse)
fn handle_bars_response(&mut self, resp: &BarsResponse)
§fn subscribe_data(
&mut self,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_data( &mut self, data_type: DataType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
data_type data.§fn subscribe_quotes(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_quotes( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
QuoteTick] data for the instrument_id.§fn subscribe_instruments(
&mut self,
venue: Venue,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_instruments( &mut self, venue: Venue, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
InstrumentAny] data for the venue.§fn subscribe_instrument(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_instrument( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
InstrumentAny] data for the instrument_id.§fn subscribe_book_deltas(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
managed: bool,
params: Option<IndexMap<String, String>>,
)
fn subscribe_book_deltas( &mut self, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, managed: bool, params: Option<IndexMap<String, String>>, )
OrderBookDeltas] data for the instrument_id.§fn subscribe_book_at_interval(
&mut self,
instrument_id: InstrumentId,
book_type: BookType,
depth: Option<NonZero<usize>>,
interval_ms: NonZero<usize>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_book_at_interval( &mut self, instrument_id: InstrumentId, book_type: BookType, depth: Option<NonZero<usize>>, interval_ms: NonZero<usize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
OrderBook] snapshots at a specified interval for the instrument_id.§fn subscribe_trades(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_trades( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
TradeTick] data for the instrument_id.§fn subscribe_bars(
&mut self,
bar_type: BarType,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Bar] data for the bar_type.§fn subscribe_mark_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_mark_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
MarkPriceUpdate] data for the instrument_id.§fn subscribe_index_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_index_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
IndexPriceUpdate] data for the instrument_id.§fn subscribe_funding_rates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_funding_rates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
FundingRateUpdate] data for the instrument_id.§fn subscribe_instrument_status(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_instrument_status( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
InstrumentStatus] data for the instrument_id.§fn subscribe_instrument_close(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_instrument_close( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
InstrumentClose] data for the instrument_id.§fn subscribe_order_fills(&mut self, instrument_id: InstrumentId)
fn subscribe_order_fills(&mut self, instrument_id: InstrumentId)
OrderFilled] events for the instrument_id.§fn subscribe_blocks(
&mut self,
chain: Blockchain,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_blocks( &mut self, chain: Blockchain, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Block] data for the chain.§fn subscribe_pool(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_pool( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Pool] definition updates for the AMM pool at the instrument_id.§fn subscribe_pool_swaps(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_pool_swaps( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
PoolSwap] data for the instrument_id.§fn subscribe_pool_liquidity_updates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_pool_liquidity_updates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
PoolLiquidityUpdate] data for the instrument_id.§fn subscribe_pool_fee_collects(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_pool_fee_collects( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
PoolFeeCollect] data for the instrument_id.§fn subscribe_pool_flash_events(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn subscribe_pool_flash_events( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
PoolFlash] events for the given instrument_id.§fn unsubscribe_data(
&mut self,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_data( &mut self, data_type: DataType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
data_type data.§fn unsubscribe_instruments(
&mut self,
venue: Venue,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_instruments( &mut self, venue: Venue, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
InstrumentAny] data for the venue.§fn unsubscribe_instrument(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_instrument( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
InstrumentAny] data for the instrument_id.§fn unsubscribe_book_deltas(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_book_deltas( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
OrderBookDeltas] data for the instrument_id.§fn unsubscribe_book_at_interval(
&mut self,
instrument_id: InstrumentId,
interval_ms: NonZero<usize>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_book_at_interval( &mut self, instrument_id: InstrumentId, interval_ms: NonZero<usize>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
OrderBook] snapshots at a specified interval for the instrument_id.§fn unsubscribe_quotes(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_quotes( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
QuoteTick] data for the instrument_id.§fn unsubscribe_trades(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_trades( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
TradeTick] data for the instrument_id.§fn unsubscribe_bars(
&mut self,
bar_type: BarType,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_bars( &mut self, bar_type: BarType, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Bar] data for the bar_type.§fn unsubscribe_mark_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_mark_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
MarkPriceUpdate] data for the instrument_id.§fn unsubscribe_index_prices(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_index_prices( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
IndexPriceUpdate] data for the instrument_id.§fn unsubscribe_funding_rates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_funding_rates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
FundingRateUpdate] data for the instrument_id.§fn unsubscribe_instrument_status(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_instrument_status( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
InstrumentStatus] data for the instrument_id.§fn unsubscribe_instrument_close(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_instrument_close( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
InstrumentClose] data for the instrument_id.§fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
OrderFilled] events for the instrument_id.§fn unsubscribe_blocks(
&mut self,
chain: Blockchain,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_blocks( &mut self, chain: Blockchain, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Block] data for the chain.§fn unsubscribe_pool(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_pool( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
Pool] definition updates for the AMM pool at the instrument_id.§fn unsubscribe_pool_swaps(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_pool_swaps( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
PoolSwap] data for the instrument_id.§fn unsubscribe_pool_liquidity_updates(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_pool_liquidity_updates( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
PoolLiquidityUpdate] data for the instrument_id.§fn unsubscribe_pool_fee_collects(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_pool_fee_collects( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
PoolFeeCollect] data for the instrument_id.§fn unsubscribe_pool_flash_events(
&mut self,
instrument_id: InstrumentId,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
)
fn unsubscribe_pool_flash_events( &mut self, instrument_id: InstrumentId, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, )
PoolFlash] events for the given instrument_id.§fn request_data(
&mut self,
data_type: DataType,
client_id: ClientId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
params: Option<IndexMap<String, String>>,
) -> Result<UUID4, Error>
fn request_data( &mut self, data_type: DataType, client_id: ClientId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4, Error>
data_type. Read more§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, Error>
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, Error>
§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, Error>
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, Error>
§fn request_book_snapshot(
&mut self,
instrument_id: InstrumentId,
depth: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
) -> Result<UUID4, Error>
fn request_book_snapshot( &mut self, instrument_id: InstrumentId, depth: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4, Error>
§fn request_quotes(
&mut self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
) -> Result<UUID4, Error>
fn request_quotes( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4, Error>
§fn request_trades(
&mut self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<IndexMap<String, String>>,
) -> Result<UUID4, Error>
fn request_trades( &mut self, instrument_id: InstrumentId, start: Option<DateTime<Utc>>, end: Option<DateTime<Utc>>, limit: Option<NonZero<usize>>, client_id: Option<ClientId>, params: Option<IndexMap<String, String>>, ) -> Result<UUID4, Error>
Source§impl Debug for BlockchainSubscriberActor
impl Debug for BlockchainSubscriberActor
Source§impl Deref for BlockchainSubscriberActor
impl Deref for BlockchainSubscriberActor
Source§impl DerefMut for BlockchainSubscriberActor
impl DerefMut for BlockchainSubscriberActor
Source§impl<'py> IntoPyObject<'py> for BlockchainSubscriberActor
impl<'py> IntoPyObject<'py> for BlockchainSubscriberActor
Source§type Target = BlockchainSubscriberActor
type Target = BlockchainSubscriberActor
Source§type Output = Bound<'py, <BlockchainSubscriberActor as IntoPyObject<'py>>::Target>
type Output = Bound<'py, <BlockchainSubscriberActor as IntoPyObject<'py>>::Target>
Source§fn into_pyobject(
self,
py: Python<'py>,
) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
fn into_pyobject( self, py: Python<'py>, ) -> Result<<Self as IntoPyObject<'_>>::Output, <Self as IntoPyObject<'_>>::Error>
Source§impl PyClass for BlockchainSubscriberActor
impl PyClass for BlockchainSubscriberActor
Source§impl PyClassImpl for BlockchainSubscriberActor
impl PyClassImpl for BlockchainSubscriberActor
Source§const IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
Source§const IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
Source§const IS_MAPPING: bool = false
const IS_MAPPING: bool = false
Source§const IS_SEQUENCE: bool = false
const IS_SEQUENCE: bool = false
Source§const IS_IMMUTABLE_TYPE: bool = false
const IS_IMMUTABLE_TYPE: bool = false
Source§const RAW_DOC: &'static CStr = /// A basic blockchain subscriber actor that monitors DeFi activities.
///
/// This actor demonstrates how to use the `DataActor` trait to monitor blockchain data
/// from DEXs, pools, and other DeFi protocols. It logs received blocks and swaps
/// to demonstrate the data flow.
const RAW_DOC: &'static CStr = /// A basic blockchain subscriber actor that monitors DeFi activities. /// /// This actor demonstrates how to use the `DataActor` trait to monitor blockchain data /// from DEXs, pools, and other DeFi protocols. It logs received blocks and swaps /// to demonstrate the data flow.
Source§const DOC: &'static CStr
const DOC: &'static CStr
text_signature if a constructor is defined. Read moreSource§type ThreadChecker = ThreadCheckerImpl
type ThreadChecker = ThreadCheckerImpl
Source§type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
type PyClassMutability = <<PyAny as PyClassBaseType>::PyClassMutability as PyClassMutability>::MutableChild
Source§type BaseNativeType = PyAny
type BaseNativeType = PyAny
PyAny by default, and when you declare
#[pyclass(extends=PyDict)], it’s PyDict.fn items_iter() -> PyClassItemsIter
fn lazy_type_object() -> &'static LazyTypeObject<Self>
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
Source§impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder BlockchainSubscriberActor
impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder BlockchainSubscriberActor
Source§impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder mut BlockchainSubscriberActor
impl<'a, 'holder, 'py> PyFunctionArgument<'a, 'holder, 'py, false> for &'holder mut BlockchainSubscriberActor
Source§impl PyTypeInfo for BlockchainSubscriberActor
impl PyTypeInfo for BlockchainSubscriberActor
Source§fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
§fn type_object(py: Python<'_>) -> Bound<'_, PyType>
fn type_object(py: Python<'_>) -> Bound<'_, PyType>
§fn is_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type or a subclass of this type.§fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
fn is_exact_type_of(object: &Bound<'_, PyAny>) -> bool
object is an instance of this type.impl DerefToPyAny for BlockchainSubscriberActor
Auto Trait Implementations§
impl Freeze for BlockchainSubscriberActor
impl !RefUnwindSafe for BlockchainSubscriberActor
impl !Send for BlockchainSubscriberActor
impl !Sync for BlockchainSubscriberActor
impl Unpin for BlockchainSubscriberActor
impl !UnwindSafe for BlockchainSubscriberActor
Blanket Implementations§
§impl<T> Actor for Twhere
T: DataActor + Debug + 'static,
impl<T> Actor for Twhere
T: DataActor + Debug + 'static,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Component for Twhere
T: DataActor + Debug + 'static,
impl<T> Component for Twhere
T: DataActor + Debug + 'static,
§fn component_id(&self) -> ComponentId
fn component_id(&self) -> ComponentId
§fn transition_state(&mut self, trigger: ComponentTrigger) -> Result<(), Error>
fn transition_state(&mut self, trigger: ComponentTrigger) -> Result<(), Error>
§fn register(
&mut self,
trader_id: TraderId,
clock: Rc<RefCell<dyn Clock>>,
cache: Rc<RefCell<Cache>>,
) -> Result<(), Error>
fn register( &mut self, trader_id: TraderId, clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, ) -> Result<(), Error>
§fn not_running(&self) -> bool
fn not_running(&self) -> bool
§fn is_running(&self) -> bool
fn is_running(&self) -> bool
§fn is_stopped(&self) -> bool
fn is_stopped(&self) -> bool
§fn is_degraded(&self) -> bool
fn is_degraded(&self) -> bool
§fn is_faulted(&self) -> bool
fn is_faulted(&self) -> bool
§fn is_disposed(&self) -> bool
fn is_disposed(&self) -> bool
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
impl<'py, T> IntoPyObjectExt<'py> for Twhere
T: IntoPyObject<'py>,
§fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
fn into_bound_py_any(self, py: Python<'py>) -> Result<Bound<'py, PyAny>, PyErr>
self into an owned Python object, dropping type information.§fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
fn into_py_any(self, py: Python<'py>) -> Result<Py<PyAny>, PyErr>
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>
fn into_pyobject_or_pyerr(self, py: Python<'py>) -> Result<Self::Output, PyErr>
self into a Python object. Read more