Skip to main content

create_standalone_paper_exchange

Function create_standalone_paper_exchange 

Source
pub fn create_standalone_paper_exchange(
    initial_balances: HashMap<AssetId, Decimal>,
) -> PaperExchange<NoOpExchange>
Expand description

Create a standalone paper exchange for backtesting without any inner exchange. Uses queue_quotes() or inject_quote() for price data.

§Example

let exchange = create_standalone_paper_exchange(balances);
exchange.queue_quotes(historical_quotes).await;
// Use exchange for backtesting