Skip to main content

backtest_ws_url

Function backtest_ws_url 

Source
pub fn backtest_ws_url(url: &str) -> String
Expand description

Build the backtest WebSocket URL from a user-supplied endpoint: a bare hostname becomes wss://{host}/backtest, while an explicit ws(s):// URL keeps its scheme (for local development against plain-ws:// servers) and gains the /backtest path only if missing. Any other scheme passes through untouched. Idempotent, so already-normalized URLs survive the crate::BacktestClient builder applying this to every url input.