nautechsystems/nautilus_trader · error

Pool has no fee tier

Error message

Pool {instrument_id} has no fee tier

What it means

prepare_swap looked up the pool for the instrument and its fee tier is None; the cached Pool record lacks the Uniswap-style fee necessary to route the swap, so the swap request is rejected before amount calculations.

Solutions

  1. Ensure the pool's fee tier is discovered/persisted before submitting orders (complete the data subscription so pool metadata loads)
  2. Verify the instrument maps to a fee-tiered (V3-style) pool; route V2/other pool types through the correct executor
  3. Refresh/rebuild the pool cache entry so `pool.fee` is populated
  4. If adding the pool definition manually, set the correct fee tier in configuration

Example fix

// before
let pool = load_pool(instrument_id); // fee: None
// after: wait for metadata then validate
let pool = load_pool(instrument_id);
assert!(pool.fee.is_some(), "pool fee tier missing for {instrument_id}");
Defensive patterns

Strategy: validation

Validate before calling

if pool.fee.is_none() {
    return Err(format!("pool {instrument_id} fee tier not loaded; refresh metadata before trading"));
}

Type guard

fn has_fee_tier(pool: &Pool) -> Option<u64> {
    pool.fee
}

Try / catch

match client.submit_order(order).await {
    Err(e) if e.to_string().contains("has no fee tier") => {
        refresh_pool_metadata(&instrument_id).await?;
        client.submit_order(order).await
    }
    r => r,
}

Prevention

When it happens

Trigger: `submit_order()` -> `prepare_swap()` on an instrument whose cached pool object lacks a fee tier (fee not yet discovered, or pool type without tier populated).

Common situations: Pool metadata fetched from a source that does not expose fee tier; subscribing to a V2-style or non-tiered pool through a V3 swap path; stale/partial pool cache after restart before pool metadata refresh.

Understand the failure class

Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.

Related errors


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

Appendix: source

Thrown at crates/adapters/blockchain/src/execution/client.rs:1573

            );
        }

        if !matches!(order.order_side(), OrderSide::Buy | OrderSide::Sell) {
            anyhow::bail!(
                "Unsupported order side {}; only Buy and Sell are supported",
                order.order_side()
            );
        }

        if order.is_quote_quantity() {
            anyhow::bail!(
                "Quote-denominated quantities are not supported; quantity must be denominated in the base token"
            );
        }

        let fee = pool
            .fee
            .ok_or_else(|| anyhow::anyhow!("Pool {instrument_id} has no fee tier"))?;
        let fee = U24::try_from(fee)
            .map_err(|_| anyhow::anyhow!("Pool {instrument_id} fee {fee} exceeds uint24"))?;

        let base_token = pool.get_base_token();
        let quote_token = pool.get_quote_token();
        let quote_currency = Currency::new_checked(
            &quote_token.symbol,
            quote_token.decimals,
            0,
            &quote_token.name,
            CurrencyType::Crypto,
        )?;
        let (token_in, token_out) =
            swap_token_pair(order.order_side(), base_token.address, quote_token.address)?;

        if !self
            .transaction_limits
            .allowed_token_pairs

View on GitHub (pinned to 18893faf8b)