INNER CODE UNIT · Rust

new

pbeets/rithmic-rs · src/config.rs:182

    pub fn new(
        fcm_id: impl Into<String>,
        ib_id: impl Into<String>,
        account_id: impl Into<String>,
    ) -> Self {
        Self {
            account_id: account_id.into(),
            fcm_id: fcm_id.into(),
            ib_id: ib_id.into(),
        }
    }

    /// Load the account identity from `RITHMIC_{DEMO,LIVE,TEST}_ACCOUNT_ID`,
    /// `_FCM_ID` and `_IB_ID`, using the prefix for `env`.
    ///
    /// Returns [`ConfigError::MissingEnvVar`] naming the first one not set.
    /// See [`examples/.env.blank`](https://github.com/pbeets/rithmic-rs/blob/main/examples/.env.blank)
    /// for a template of all required environment variables.

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…