Skip to main content

Crate simulator_api

Crate simulator_api 

Source

Structs§

AccountData
Account snapshot used to seed or modify state in a session.
AccountModifications
Account state modifications to apply.
AgentParams
Configuration for an agent to run alongside a backtest session.
AgentStatsReport
Structured stats reported by an agent during a backtest session.
ArbRouteParams
Parameters for a circular arbitrage route.
AvailableRange
One contiguous block range available on the history clerk.
CloseSessionRequestV1
ContinueParams
Arguments used to continue an existing session.
ContinueSessionRequestV1
ContinueToParams
Arguments used to step an existing session to a precise point.
ContinueToSessionRequestV1
CreateBacktestSessionRequestOptions
CreateBacktestSessionRequestV1
CreateSessionParams
Parameters required to start a new backtest session.
DiscoveryBatchEvent
Payload emitted when the session has discovered an upcoming batch that matches one or more registered DiscoveryFilters from session creation (for example, a batch containing a transaction that invokes a program of interest). The (slot, batch_index) pair can be fed directly to BacktestRequest::ContinueTo to pause immediately before the batch executes. After each Continue / ContinueTo, the session emits the next DiscoveryBatchEvent ahead of the next matching batch, enabling a reactive “pause on every discovery” driver loop.
EncodedBinary
A blob paired with the encoding needed to decode it.
PausedEvent
Payload emitted when a session halts at a caller-specified point. batch_index is None for block-boundary pauses and Some(n) when the session stopped before batch n within slot (no transaction from batch n has been applied). While paused, RPC reads against the session observe partial state up through batch n - 1.
SequencedResponse
Wire format wrapper for responses sent over the control websocket. Sessions with disconnect_timeout_secs > 0 use this to track client position.
SessionSummary
Summary of transaction execution statistics for a completed backtest session.
TxMatchContext
Per-transaction facts a DiscoveryFilter can inspect when deciding whether to match. Callers build this once per transaction and feed it to every registered filter; new variants add fields here rather than growing the DiscoveryFilter::matches signature.

Enums§

AgentType
Available agent types for sidecar participation in backtest sessions.
BacktestError
Error variants surfaced to backtest RPC clients.
BacktestRequest
Backtest RPC methods exposed to the client.
BacktestResponse
Responses returned over the backtest RPC channel.
BacktestStatus
High-level progress states during a Continue call.
BinaryEncoding
Supported binary encodings for account/transaction payloads.
CreateBacktestSessionRequest
Versioned payload for CreateBacktestSession.
DiscoveryFilter
A filter registered at session creation describing which upcoming batches the session should announce ahead of execution via BacktestResponse::DiscoveryBatch (and its session-event twins). Each filter describes an event of interest (e.g. a specific program executing); the session “discovers” the batch in which that event will occur and emits a DiscoveryBatch so the client can pause immediately before it.
SessionEventKind
SessionEventV1

Functions§

split_range
Split a user-requested [start_slot, end_slot] range across the available bundle ranges, returning a list of non-overlapping (start, end) pairs — one per bundle that intersects the requested range.