sim-cli 0.23.0

CLI tool for running and comparing Solana simulator backtests
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//! One construction point, so the CLI product token is set once rather than at
//! each command's call site.

use simulator_api::client_identity::ClientProduct;
use simulator_client::BacktestClient;

/// An empty `api_key` is the keyless case, which the client already handles by
/// omitting the header rather than sending a blank one.
pub fn new(url: &str, api_key: &str) -> BacktestClient {
    BacktestClient::builder()
        .url(url)
        .api_key(api_key)
        .product(ClientProduct::Cli)
        .product_version(env!("CARGO_PKG_VERSION"))
        .build()
}