pub struct AdvancedClient<'a> { /* private fields */ }Expand description
Low-level escape hatch for replay tools, custom transports, and diagnostics.
The primary API is exposed directly on BatMarkets. Use advanced() only
when an integration needs raw lane events, fixture ingestion, command
response classification, manual reconciliation, diagnostics, or
venue-specific native adapter access.
Implementations§
Source§impl<'a> AdvancedClient<'a>
impl<'a> AdvancedClient<'a>
Sourcepub fn ingest_public_json(&self, payload: &str) -> Result<Vec<PublicLaneEvent>>
pub fn ingest_public_json(&self, payload: &str) -> Result<Vec<PublicLaneEvent>>
Decode a venue public websocket payload and merge its events into state.
Sourcepub fn ingest_private_json(
&self,
payload: &str,
) -> Result<Vec<PrivateLaneEvent>>
pub fn ingest_private_json( &self, payload: &str, ) -> Result<Vec<PrivateLaneEvent>>
Decode a venue private websocket payload and merge its events into state.
Sourcepub fn subscribe_public_events(&self) -> Receiver<PublicLaneEvent>
pub fn subscribe_public_events(&self) -> Receiver<PublicLaneEvent>
Subscribe to raw public-lane events emitted by ingest or live runtime.
Sourcepub fn subscribe_private_events(&self) -> Receiver<PrivateLaneEvent>
pub fn subscribe_private_events(&self) -> Receiver<PrivateLaneEvent>
Subscribe to raw private-lane events emitted by ingest or live runtime.
Sourcepub fn subscribe_command_events(&self) -> Receiver<CommandLaneEvent>
pub fn subscribe_command_events(&self) -> Receiver<CommandLaneEvent>
Subscribe to raw command-lane lifecycle and receipt events.
Sourcepub fn subscribe_health_notifications(&self) -> Receiver<HealthNotification>
pub fn subscribe_health_notifications(&self) -> Receiver<HealthNotification>
Subscribe to transition-style health notifications.
Notifications are emitted for structural runtime changes, not for every
market-data tick. Most applications should prefer BatMarkets::watch_status.
Sourcepub fn require_instrument(
&self,
instrument_id: &InstrumentId,
) -> Result<InstrumentSpec>
pub fn require_instrument( &self, instrument_id: &InstrumentId, ) -> Result<InstrumentSpec>
Return metadata for a known instrument or an Unsupported error.
Sourcepub fn cached_ticker(&self, instrument_id: &InstrumentId) -> Option<Ticker>
pub fn cached_ticker(&self, instrument_id: &InstrumentId) -> Option<Ticker>
Return the latest cached ticker for an instrument.
Sourcepub fn cached_recent_trades(
&self,
instrument_id: &InstrumentId,
) -> Option<Vec<TradeTick>>
pub fn cached_recent_trades( &self, instrument_id: &InstrumentId, ) -> Option<Vec<TradeTick>>
Return cached recent public trades for an instrument.
Sourcepub fn cached_book_top(&self, instrument_id: &InstrumentId) -> Option<BookTop>
pub fn cached_book_top(&self, instrument_id: &InstrumentId) -> Option<BookTop>
Return the latest cached top-of-book snapshot for an instrument.
Sourcepub fn cached_funding_rate(
&self,
instrument_id: &InstrumentId,
) -> Option<FundingRate>
pub fn cached_funding_rate( &self, instrument_id: &InstrumentId, ) -> Option<FundingRate>
Return the latest cached funding-rate snapshot for an instrument.
Sourcepub fn cached_mark_price(
&self,
instrument_id: &InstrumentId,
) -> Option<MarkPrice>
pub fn cached_mark_price( &self, instrument_id: &InstrumentId, ) -> Option<MarkPrice>
Return the latest cached mark-price snapshot for an instrument.
Sourcepub fn cached_open_interest(
&self,
instrument_id: &InstrumentId,
) -> Option<OpenInterest>
pub fn cached_open_interest( &self, instrument_id: &InstrumentId, ) -> Option<OpenInterest>
Return the latest cached open-interest snapshot for an instrument.
Sourcepub fn cached_liquidations(
&self,
instrument_id: &InstrumentId,
) -> Option<Vec<Liquidation>>
pub fn cached_liquidations( &self, instrument_id: &InstrumentId, ) -> Option<Vec<Liquidation>>
Return cached liquidation events for an instrument.
Sourcepub fn cached_balances(&self) -> Vec<Balance>
pub fn cached_balances(&self) -> Vec<Balance>
Return cached balances from the private state projection.
Sourcepub fn cached_account_summary(&self) -> Option<AccountSummary>
pub fn cached_account_summary(&self) -> Option<AccountSummary>
Return the cached account summary, if one has been observed or fetched.
Sourcepub fn cached_positions(&self) -> Vec<Position>
pub fn cached_positions(&self) -> Vec<Position>
Return cached positions from the private state projection.
Sourcepub fn cached_orders(&self) -> Vec<Order>
pub fn cached_orders(&self) -> Vec<Order>
Return all cached orders known to the engine state.
Sourcepub fn cached_open_orders(&self) -> Vec<Order>
pub fn cached_open_orders(&self) -> Vec<Order>
Return cached orders that are currently open.
Sourcepub fn cached_executions(&self) -> Vec<Execution>
pub fn cached_executions(&self) -> Vec<Execution>
Return cached private execution fills known to the engine state.
Sourcepub fn classify_command_json(
&self,
operation: CommandOperation,
payload: Option<&str>,
request_id: Option<RequestId>,
) -> Result<CommandReceipt>
pub fn classify_command_json( &self, operation: CommandOperation, payload: Option<&str>, request_id: Option<RequestId>, ) -> Result<CommandReceipt>
Classify a raw command response payload and apply the resulting state hint.
This hook is intended for custom transports. Normal write flows should
use root command methods such as BatMarkets::create_order.
Sourcepub async fn reconcile(&self) -> Result<ReconcileReport>
pub async fn reconcile(&self) -> Result<ReconcileReport>
Run a manual REST-backed private-state reconciliation pass.
Sourcepub fn diagnostics(&self) -> RuntimeDiagnosticsSnapshot
pub fn diagnostics(&self) -> RuntimeDiagnosticsSnapshot
Return local runtime and state-lock diagnostics.
Sourcepub fn native(&self) -> NativeClient<'_>
pub fn native(&self) -> NativeClient<'_>
Access venue-specific adapter functionality.