nautechsystems/nautilus_trader · error

AX whoami account supplied no fee rates

Error message

AX whoami account {} supplied no fee rates

What it means

After picking the first account from AX whoami, request_account_fees requires both maker_fee and taker_fee to be present. If either (or both) is None on the account record, fees cannot be resolved and this error names the offending account id.

Solutions

  1. Check the account in the AX console and confirm fee tiers are configured
  2. Contact the venue/admin to have maker and taker fee rates assigned to the account
  3. Verify you are using credentials for the intended trading account that has fees set
Defensive patterns

Strategy: try-catch

Validate before calling

let acct = &client.get_whoami().await?.accounts[0];
if acct.maker_fee.is_none() || acct.taker_fee.is_none() {
    return Err(anyhow::anyhow!("account {} missing fee rates", acct.id));
}

Try / catch

match client.request_account_fees().await {
    Err(e) if e.to_string().contains("no fee rates") => {
        log::warn!("falling back to default fee assumptions");
        (default_maker_fee, default_taker_fee)
    }
    Ok(fees) => fees,
    Err(e) => return Err(e),
}

Prevention

When it happens

Trigger: Calling request_account_fees where the selected account has maker_fee = None and/or taker_fee = None (at least one missing; the error text is emitted whenever the tuple destructure fails).

Common situations: Newly created AX accounts that have not been assigned fee tiers; account types that do not carry fee rates; stale/incorrect environment with accounts lacking fee configuration.

Understand the failure class

Background: "missing required config value" errors: why libraries refuse to start when a configuration key is empty, unset, or blank — this error's family across 48 libraries.

Related errors


AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08). Data as JSON: /api/errors/63aacac3c7b18cd4. Report an issue: GitHub.

Appendix: source

Thrown at crates/adapters/architect_ax/src/http/client.rs:1395

            .get_whoami()
            .await
            .map_err(|e| anyhow::anyhow!(e))
            .context("failed to request AX whoami")?;

        let Some(account) = whoami.accounts.first() else {
            anyhow::bail!("AX whoami returned no accounts to resolve fees from");
        };

        if whoami.accounts.len() > 1 {
            log::warn!(
                "AX credentials cover {} accounts, using fee rates from {}",
                whoami.accounts.len(),
                account.id,
            );
        }

        let (Some(maker_fee), Some(taker_fee)) = (account.maker_fee, account.taker_fee) else {
            anyhow::bail!("AX whoami account {} supplied no fee rates", account.id);
        };

        let fees = (maker_fee, taker_fee);
        self.account_fees.store(Some(Arc::new(fees)));

        Ok(fees)
    }

    /// Requests all instruments from Ax.
    ///
    /// Fee rates fall back to the rates last resolved from `GET /whoami`, and to zero when no
    /// rates have been resolved.
    ///
    /// # Errors
    ///
    /// Returns an error if the HTTP request fails or instrument parsing fails.
    pub async fn request_instruments(
        &self,

View on GitHub (pinned to 18893faf8b)