pub struct DataTester { /* private fields */ }Expand description
A data tester actor for live testing market data subscriptions.
Subscribes to configured data types for specified instruments and logs received data to demonstrate the data flow. Useful for testing adapters and validating data connectivity.
This actor provides equivalent functionality to the Python DataTester
in the test kit.
Implementations§
Source§impl DataTester
impl DataTester
Sourcepub fn new(config: DataTesterConfig) -> Self
pub fn new(config: DataTesterConfig) -> Self
Creates a new DataTester instance.
Methods from Deref<Target = DataActorCore>§
Sourcepub fn mem_address(&self) -> String
pub fn mem_address(&self) -> String
Returns the memory address of this instance as a hexadecimal string.
Sourcepub fn state(&self) -> ComponentState
pub fn state(&self) -> ComponentState
Returns the actors state.
Sourcepub fn timestamp_ns(&self) -> UnixNanos
pub fn timestamp_ns(&self) -> UnixNanos
Returns a UNIX nanoseconds timestamp from the actor’s internal clock.
Sourcepub fn clock(&mut self) -> RefMut<'_, dyn Clock + 'static>
pub fn clock(&mut self) -> RefMut<'_, dyn Clock + 'static>
Returns the clock for the actor (if registered).
§Panics
Panics if the actor has not been registered with a trader.
Sourcepub fn clock_rc(&self) -> Rc<RefCell<dyn Clock>>
pub fn clock_rc(&self) -> Rc<RefCell<dyn Clock>>
Returns a clone of the reference-counted clock.
§Panics
Panics if the actor has not yet been registered (clock is None).
Sourcepub fn cache(&self) -> Ref<'_, Cache>
pub fn cache(&self) -> Ref<'_, Cache>
Returns a read-only reference to the cache.
§Panics
Panics if the actor has not yet been registered (cache is None).
Sourcepub fn cache_rc(&self) -> Rc<RefCell<Cache>>
pub fn cache_rc(&self) -> Rc<RefCell<Cache>>
Returns a clone of the reference-counted cache.
§Panics
Panics if the actor has not yet been registered (cache is None).
Sourcepub fn register(
&mut self,
trader_id: TraderId,
clock: Rc<RefCell<dyn Clock>>,
cache: Rc<RefCell<Cache>>,
) -> Result<(), Error>
pub fn register( &mut self, trader_id: TraderId, clock: Rc<RefCell<dyn Clock>>, cache: Rc<RefCell<Cache>>, ) -> Result<(), Error>
Register the data actor with a trader.
§Errors
Returns an error if the actor has already been registered with a trader or if the provided dependencies are invalid.
Sourcepub fn register_warning_event(&mut self, event_type: &str)
pub fn register_warning_event(&mut self, event_type: &str)
Register an event type for warning log levels.
Sourcepub fn deregister_warning_event(&mut self, event_type: &str)
pub fn deregister_warning_event(&mut self, event_type: &str)
Deregister an event type from warning log levels.
pub fn is_registered(&self) -> bool
Sourcepub fn shutdown_system(&self, reason: Option<String>)
pub fn shutdown_system(&self, reason: Option<String>)
Sends a shutdown command to the system with an optional reason.
§Panics
Panics if the actor is not registered or has no trader ID.
Sourcepub fn subscribe_data(
&mut self,
handler: 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn subscribe_order_cancels(
&mut self,
topic: MStr<Topic>,
handler: ShareableMessageHandler,
)
pub fn subscribe_order_cancels( &mut self, topic: MStr<Topic>, handler: ShareableMessageHandler, )
Helper method for registering order cancels subscriptions from the trait.
Sourcepub fn unsubscribe_data(
&mut self,
data_type: DataType,
client_id: Option<ClientId>,
params: Option<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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub 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.
Sourcepub fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
pub fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
Helper method for unsubscribing from order fills.
Sourcepub fn unsubscribe_order_cancels(&mut self, instrument_id: InstrumentId)
pub fn unsubscribe_order_cancels(&mut self, instrument_id: InstrumentId)
Helper method for unsubscribing from order cancels.
Sourcepub fn request_data(
&self,
data_type: DataType,
client_id: ClientId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
params: Option<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>
Sourcepub 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>
Sourcepub 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>
Sourcepub 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.
Sourcepub fn request_quotes(
&self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<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>
Sourcepub fn request_trades(
&self,
instrument_id: InstrumentId,
start: Option<DateTime<Utc>>,
end: Option<DateTime<Utc>>,
limit: Option<NonZero<usize>>,
client_id: Option<ClientId>,
params: Option<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>
Trait Implementations§
Source§impl DataActor for DataTester
impl DataActor for DataTester
Source§fn on_time_event(&mut self, _event: &TimeEvent) -> Result<()>
fn on_time_event(&mut self, _event: &TimeEvent) -> Result<()>
Source§fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()>
fn on_instrument(&mut self, instrument: &InstrumentAny) -> Result<()>
Source§fn on_book(&mut self, book: &OrderBook) -> Result<()>
fn on_book(&mut self, book: &OrderBook) -> Result<()>
Source§fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()>
fn on_book_deltas(&mut self, deltas: &OrderBookDeltas) -> Result<()>
Source§fn on_quote(&mut self, quote: &QuoteTick) -> Result<()>
fn on_quote(&mut self, quote: &QuoteTick) -> Result<()>
Source§fn on_trade(&mut self, trade: &TradeTick) -> Result<()>
fn on_trade(&mut self, trade: &TradeTick) -> Result<()>
Source§fn on_bar(&mut self, bar: &Bar) -> Result<()>
fn on_bar(&mut self, bar: &Bar) -> Result<()>
Source§fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()>
fn on_mark_price(&mut self, mark_price: &MarkPriceUpdate) -> Result<()>
Source§fn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()>
fn on_index_price(&mut self, index_price: &IndexPriceUpdate) -> Result<()>
Source§fn on_funding_rate(&mut self, funding_rate: &FundingRateUpdate) -> Result<()>
fn on_funding_rate(&mut self, funding_rate: &FundingRateUpdate) -> Result<()>
Source§fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()>
fn on_instrument_status(&mut self, data: &InstrumentStatus) -> Result<()>
Source§fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()>
fn on_instrument_close(&mut self, update: &InstrumentClose) -> Result<()>
Source§fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()>
fn on_historical_trades(&mut self, trades: &[TradeTick]) -> Result<()>
Source§fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()>
fn on_historical_bars(&mut self, bars: &[Bar]) -> Result<()>
Source§fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>, Error>
fn on_save(&self) -> Result<IndexMap<String, Vec<u8>>, Error>
Source§fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<(), Error>
fn on_load(&mut self, state: IndexMap<String, Vec<u8>>) -> Result<(), Error>
Source§fn on_data(&mut self, data: &(dyn Any + 'static)) -> Result<(), Error>
fn on_data(&mut self, data: &(dyn Any + 'static)) -> Result<(), Error>
Source§fn on_signal(&mut self, signal: &Signal) -> Result<(), Error>
fn on_signal(&mut self, signal: &Signal) -> Result<(), Error>
Source§fn on_order_filled(&mut self, event: &OrderFilled) -> Result<(), Error>
fn on_order_filled(&mut self, event: &OrderFilled) -> Result<(), Error>
Source§fn on_order_canceled(&mut self, event: &OrderCanceled) -> Result<(), Error>
fn on_order_canceled(&mut self, event: &OrderCanceled) -> Result<(), Error>
Source§fn on_historical_data(
&mut self,
data: &(dyn Any + 'static),
) -> Result<(), Error>
fn on_historical_data( &mut self, data: &(dyn Any + 'static), ) -> Result<(), Error>
Source§fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<(), Error>
fn on_historical_quotes(&mut self, quotes: &[QuoteTick]) -> Result<(), Error>
Source§fn on_historical_mark_prices(
&mut self,
mark_prices: &[MarkPriceUpdate],
) -> Result<(), Error>
fn on_historical_mark_prices( &mut self, mark_prices: &[MarkPriceUpdate], ) -> Result<(), Error>
Source§fn on_historical_index_prices(
&mut self,
index_prices: &[IndexPriceUpdate],
) -> Result<(), Error>
fn on_historical_index_prices( &mut self, index_prices: &[IndexPriceUpdate], ) -> Result<(), Error>
Source§fn handle_time_event(&mut self, event: &TimeEvent)
fn handle_time_event(&mut self, event: &TimeEvent)
Source§fn handle_data(&mut self, data: &(dyn Any + 'static))
fn handle_data(&mut self, data: &(dyn Any + 'static))
Source§fn handle_signal(&mut self, signal: &Signal)
fn handle_signal(&mut self, signal: &Signal)
Source§fn handle_instrument(&mut self, instrument: &InstrumentAny)
fn handle_instrument(&mut self, instrument: &InstrumentAny)
Source§fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)
fn handle_book_deltas(&mut self, deltas: &OrderBookDeltas)
Source§fn handle_book(&mut self, book: &OrderBook)
fn handle_book(&mut self, book: &OrderBook)
Source§fn handle_quote(&mut self, quote: &QuoteTick)
fn handle_quote(&mut self, quote: &QuoteTick)
Source§fn handle_trade(&mut self, trade: &TradeTick)
fn handle_trade(&mut self, trade: &TradeTick)
Source§fn handle_bar(&mut self, bar: &Bar)
fn handle_bar(&mut self, bar: &Bar)
Source§fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)
fn handle_mark_price(&mut self, mark_price: &MarkPriceUpdate)
Source§fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)
fn handle_index_price(&mut self, index_price: &IndexPriceUpdate)
Source§fn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)
fn handle_funding_rate(&mut self, funding_rate: &FundingRateUpdate)
Source§fn handle_instrument_status(&mut self, status: &InstrumentStatus)
fn handle_instrument_status(&mut self, status: &InstrumentStatus)
Source§fn handle_instrument_close(&mut self, close: &InstrumentClose)
fn handle_instrument_close(&mut self, close: &InstrumentClose)
Source§fn handle_order_filled(&mut self, event: &OrderFilled)
fn handle_order_filled(&mut self, event: &OrderFilled)
Source§fn handle_order_canceled(&mut self, event: &OrderCanceled)
fn handle_order_canceled(&mut self, event: &OrderCanceled)
Source§fn handle_historical_data(&mut self, data: &(dyn Any + 'static))
fn handle_historical_data(&mut self, data: &(dyn Any + 'static))
Source§fn handle_data_response(&mut self, resp: &CustomDataResponse)
fn handle_data_response(&mut self, resp: &CustomDataResponse)
Source§fn handle_instrument_response(&mut self, resp: &InstrumentResponse)
fn handle_instrument_response(&mut self, resp: &InstrumentResponse)
Source§fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)
fn handle_instruments_response(&mut self, resp: &InstrumentsResponse)
Source§fn handle_book_response(&mut self, resp: &BookResponse)
fn handle_book_response(&mut self, resp: &BookResponse)
Source§fn handle_quotes_response(&mut self, resp: &QuotesResponse)
fn handle_quotes_response(&mut self, resp: &QuotesResponse)
Source§fn handle_trades_response(&mut self, resp: &TradesResponse)
fn handle_trades_response(&mut self, resp: &TradesResponse)
Source§fn handle_bars_response(&mut self, resp: &BarsResponse)
fn handle_bars_response(&mut self, resp: &BarsResponse)
Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§fn subscribe_order_fills(&mut self, instrument_id: InstrumentId)
fn subscribe_order_fills(&mut self, instrument_id: InstrumentId)
OrderFilled events for the instrument_id.Source§fn subscribe_order_cancels(&mut self, instrument_id: InstrumentId)
fn subscribe_order_cancels(&mut self, instrument_id: InstrumentId)
OrderCanceled events for the instrument_id.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§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.Source§fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
fn unsubscribe_order_fills(&mut self, instrument_id: InstrumentId)
OrderFilled events for the instrument_id.Source§fn unsubscribe_order_cancels(&mut self, instrument_id: InstrumentId)
fn unsubscribe_order_cancels(&mut self, instrument_id: InstrumentId)
OrderCanceled events for the instrument_id.Source§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