Expand description
RPC handler implementations for the backtest server.
Each handler receives a request message, processes it against the shared server state (symbol registry, profile registry, Parquet store), and returns a response message. Errors are captured in the response rather than crashing the server.
Structs§
- Accepted
Backtest JobInput - Backtest
Job - Internal representation of an async backtest job.
- JobCancellation
Token - Lightweight per-job cancellation token without an additional runtime dependency.
- Server
State - Shared state accessible by all client handlers.
- Strategy
Service State - Configured strategy limits plus the gate that lets only one parameter search hold its market data in memory at a time.
Enums§
- Accepted
JobInput - Validated input a retained job runs once its worker starts.
- JobKind
- What a retained job produces, which decides the endpoint that returns its output.
- JobStatus
- Typed job status for the async backtest API.
Functions§
- cancel_
active_ jobs - Cooperatively cancel every active job during server shutdown.
- cleanup_
expired_ jobs - Remove terminal jobs older than
retentionand enforce the configured bound. - handle_
add_ profile - Handle
add_profile— add or overwrite a management profile at runtime. - handle_
cancel_ backtest - Handle
cancel_backtest— cancel a submitted job. - handle_
delete_ result_ artifact - Delete a complete result artifact.
- handle_
get_ backtest_ result - Handle
get_backtest_result— fetch the result of a completed job. - handle_
get_ backtest_ status - Handle
get_backtest_status— poll the status of a submitted job. - handle_
get_ result_ artifact_ chunk - Return one base64-encoded raw result artifact chunk.
- handle_
get_ search_ result - Handle
get_search_result: return a completed search’s summary and the artifact holding its output. - handle_
list_ profiles - Handle
list_profiles— returns all loaded management profiles. - handle_
list_ symbols - Handle
list_symbols— returns available data from the Parquet store. - handle_
ping - Handle
ping— returns server status and uptime. - handle_
reload_ profiles - Handle
reload_profiles— reload profiles from the configured TOML file. - handle_
remove_ profile - Handle
remove_profile— remove a management profile by name. - handle_
run_ backtest - Handle the canonical FutureQuoteV1 execution endpoint.
- handle_
run_ backtest_ multi - handle_
run_ configured_ strategy - Handle
run_configured_strategy: validate, run, and return the result synchronously. - handle_
run_ portfolio - Handle
run_portfolio: validate, run, and return the shared result synchronously. - handle_
submit_ backtest - handle_
submit_ configured_ strategy - Handle
submit_configured_strategy: validate completely, then admit a retained job. - handle_
submit_ portfolio - Handle
submit_portfolio: validate every instance and policy, then admit a retained job. - handle_
submit_ search - Handle
submit_search: validate the whole search without loading data, then admit a retained job. - run_
job_ and_ store - subscribe_
backtest_ status - Subscribe to the current and future coalesced snapshots of a retained job.
- watch_
backtest_ stream - Build the server stream for a retained backtest job.