nautechsystems/nautilus_trader · error · anyhow::Error
AX dated contract {} has different quote and settlement curr
Error message
AX dated contract {} has different quote and settlement currencies: {} and {} What it means
For definitions with an expiration (dated futures), the parser requires quote_currency == funding_settlement_currency, because dated contracts are mapped onto a single-currency contract model (info gets one expiration and multiplier). A contract quoted in one currency but settled in another (inverse-style or cross-collateral futures) is rejected.
Source
Thrown at crates/adapters/architect_ax/src/http/parse.rs:296
);
}
if let Some(v) = definition.price_band_upper_deviation_pct {
info.insert(
"price_band_upper_deviation_pct".to_string(),
json!(v.to_string()),
);
}
if let Some(v) = definition.price_band_lower_deviation_pct {
info.insert(
"price_band_lower_deviation_pct".to_string(),
json!(v.to_string()),
);
}
if let Some(expiration) = definition.expiration {
anyhow::ensure!(
definition.quote_currency == definition.funding_settlement_currency,
"AX dated contract {} has different quote and settlement currencies: {} and {}",
definition.symbol,
definition.quote_currency,
definition.funding_settlement_currency
);
let expiration_ns = datetime_to_unix_nanos(Some(expiration))
.context("Failed to convert AX contract expiration to Unix nanoseconds")?;
let multiplier = decimal_to_quantity(definition.multiplier, "multiplier")?;
info.insert(
"expiration".to_string(),
json!(expiration.display_with_offset(Offset::UTC).to_string()),
);
info.insert(
"activation_source".to_string(),
json!("unavailable_from_ax"),
);
View on GitHub (pinned to a4b06ed870)
Solutions
- Verify both fields for the symbol (curl /instrument) and confirm the mismatch is real, not a config typo
- If the currencies are operationally the same (e.g. USD vs USDC by convention), align funding_settlement_currency in venue config with the quote currency
- For genuine cross-currency settlement, the adapter's contract model must be extended — file an issue with the symbol's raw definition; do not drop the check
- Exclude the contract from subscription until supported
Example fix
// before (AX contract metadata)
{"symbol": "BTC-27MAR26", "quote_currency": "USD", "funding_settlement_currency": "BTC"}
// after
{"symbol": "BTC-27MAR26", "quote_currency": "USD", "funding_settlement_currency": "USD"} Defensive patterns
Strategy: try-catch
Validate before calling
// Pre-check dated-contract currency alignment if you vet definitions upstream
if definition.expiration.is_some()
&& definition.quote_currency != definition.funding_settlement_currency
{
anyhow::bail!(
"dated contract {} settles in {} but quotes in {}; unsupported cross-currency settlement",
definition.symbol, definition.funding_settlement_currency, definition.quote_currency
);
} Try / catch
match parse_instrument(&definition, ts_event, ts_init) {
Ok(instrument) => Ok(instrument),
Err(e) if e.to_string().contains("different quote and settlement currencies") => {
log::error!("cross-collateral dated contract {} unsupported by adapter", definition.symbol);
Err(e)
}
Err(e) => Err(e),
} Prevention
- Keep quote and settlement currencies identical in AX config for dated contracts
- Screen new listings for cross-currency settlement before enabling subscription
- File an adapter issue with the raw definition when a legitimate contract is rejected — extension is a code change
When it happens
Trigger: A dated future quoted in USD but settled in USDC or the base asset (e.g. quote_currency=USD, funding_settlement_currency=BTC); any new dated contract with cross-collateral settlement hits this on instrument load.
Common situations: AX lists inverse or multi-collateral dated futures after the adapter was written; contract config with a typo'd settlement currency that differs from the quote; environments mirroring exotic exchange contracts.
Related errors
- AX instrument product must be non-empty without surrounding
- AX minimum_order_size must be a positive whole number, was {
- AX initial_margin_pct must be positive, was {initial_margin_
- AX maintenance_margin_pct must be positive, was {maintenance
- AX maintenance_margin_pct {maintenance_margin_pct} exceeds i
AI-assisted analysis of nautechsystems/nautilus_trader@a4b06ed870 (2026-08-16).
Data as JSON: /api/errors/37a6062597a10630.
Report an issue: GitHub.