nautechsystems/nautilus_trader · error · anyhow::Error
AX whoami account {} supplied no fee rates
Error message
AX whoami account {} supplied no fee rates What it means
Thrown by request_account_fees() when GET /whoami succeeds but the selected account object has maker_fee or taker_fee set to null (the fields are Option<Decimal> in models.rs). The client deliberately refuses to substitute zero because zero is itself a valid fee rate and a silent zero would persist in cached instruments after the cause disappeared. The account id is included so you can identify which AX account is misconfigured.
Source
Thrown at crates/adapters/architect_ax/src/http/client.rs:1409
.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 a4b06ed870)
Solutions
- Verify the account fee schedule with Architect (dashboard or support) and confirm the account id in the error message actually has maker/taker rates assigned.
- Check which account is first in whoami.accounts: if your key covers multiple accounts, the client uses the first one, which may be the fee-less account while another account has rates.
- Re-run request_account_fees() after the fee schedule is attached; if AX changed the response schema, inspect the raw /whoami JSON and report the contract change.
- As a workaround for instrument building, call request_instruments(Some(maker), Some(taker)) with explicit rates - it does not require request_account_fees to succeed.
Example fix
// before
let (maker, taker) = client.request_account_fees().await?; // bails on null rates
// after: fall back to explicit rates while the account is fixed
let (maker, taker) = match client.request_account_fees().await {
Ok(fees) => fees,
Err(e) if e.to_string().contains("supplied no fee rates") => {
log::warn!("AX fee resolution failed ({e}); using configured rates");
(dec!(0.0002), dec!(0.0025))
}
Err(e) => return Err(e),
}; Defensive patterns
Strategy: try-catch
Validate before calling
// No public pre-check exists for whoami contents; validate after the call let fees = client.request_account_fees().await;
Try / catch
match client.request_account_fees().await {
Ok(fees) => { /* proceed */ }
Err(e) if e.to_string().contains("supplied no fee rates") => {
// account misconfigured: use explicitly configured rates downstream
log::warn!("AX fee resolution failed: {e}");
}
Err(e) => return Err(e),
} Prevention
- Provision and verify fee schedules on every AX account before generating API keys for it.
- When credentials cover multiple accounts, confirm the first whoami account is the intended trading account - that is the one whose fees are used.
- Pass explicit maker_fee/taker_fee to request_instruments so instrument building never depends on whoami succeeding.
- Treat this error as configuration, not transient: do not blind-retry; fix the account or credentials.
When it happens
Trigger: Calling request_account_fees() (or any startup flow that resolves fees) with credentials whose first whoami account returns "maker_fee": null or "taker_fee": null. Note an empty string "" parses to Decimal::ZERO and does NOT trigger this; only a missing/null field does.
Common situations: New or sub-account on AX without a fee schedule attached yet; API key provisioned with entitlements but no trading fee tier; AX backend/API version change dropping the fields from /whoami; test environment accounts that never had fees configured.
Related errors
- failed to request AX whoami
- AX whoami returned no accounts to resolve fees from
- Chart '{name}' not found.{suggestion_text} Available charts:
- plotly is required for visualization. Install it with: pip i
- Authentication failed: {e}
AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16).
Data as JSON: /api/errors/63aacac3c7b18cd4.
Report an issue: GitHub.