alpaca-mock
Executable mock server for trade mainline and contract-style flows.
Commands:
cargo run -p alpaca-mock
cargo install alpaca-mock
Runtime environment:
ALPACA_MOCK_LISTEN_ADDRALPACA_DATA_API_KEYALPACA_DATA_SECRET_KEY
Library helpers:
build_app_from_envbuild_app_with_statespawn_test_serverspawn_test_server_with_stateMockServerState::with_market_snapshot
docs.rs:
Current public mock focus:
- account
- orders
- positions
- activities
Behavior notes:
- stock and single-option marketable orders fill at mid price
- multi-leg marketable orders fill at composite mid price
/admin/faults/httpinjects a one-shot authenticated-route fault/admin/resetclears both state and injected faults
Not implemented:
- generic fake market-data generation
- a full broker or exchange simulator