Expand description
Testing infrastructure: Mock exchanges, paper trading, and simulation utilities.
This module provides reusable components for testing and paper trading:
QuoteSource: Trait for quote data providers (mock, live, CSV)FillSimulator: Shared fill matching logic (price crossing detection)MockExchange: Manual quote/fill injection for unit testsPaperExchange: Live quotes with simulated fills for paper tradingMockAccountSyncer,MockTradeSyncer: Mock syncers for testing (native only)
Re-exports§
pub use fill_simulator::FillSimulator;pub use fill_simulator::PendingOrder;pub use fill_simulator::SimulatedFill;pub use mock_exchange::MockExchange;pub use mock_exchange::MockKnobs;pub use mock_exchange::OrderFailMode;pub use paper_exchange::create_standalone_paper_exchange;pub use paper_exchange::create_standalone_paper_exchange_with_id;pub use paper_exchange::ArcExchange;pub use paper_exchange::NoOpExchange;pub use paper_exchange::PaperExchange;pub use paper_exchange::StandalonePaperExchange;pub use quote_source::MockQuoteSource;pub use quote_source::QuoteSource;pub use mock_syncer::MockAccountSyncer;pub use mock_syncer::MockTradeSyncer;
Modules§
- fill_
simulator - Fill simulator: Shared logic for simulating order fills.
- mock_
exchange - Mock Exchange for deterministic testing.
- mock_
syncer - Mock Syncers for testing backend integration without real API calls.
- paper_
exchange - Paper Exchange: Simulates order execution using real quotes.
- quote_
source - Quote source trait: Abstraction for quote data providers.