nautechsystems/nautilus_trader · error
Invalid tickSize of 0 for symbol
Error message
Invalid tickSize of 0 for symbol '{}', cannot create instrument What it means
A tradable instrument requires a strictly positive price increment. When the PRICE_FILTER of a USD-M symbol reports tickSize = 0, a valid Price precision/increment cannot be constructed, so the adapter aborts instrument creation. This almost always indicates malformed or corrupted exchange filter data from the exchange payload.
Solutions
- Check the raw exchangeInfo entry for the symbol and confirm its filters[PRICE_FILTER].tickSize value
- Re-fetch exchangeInfo in case the payload was truncated/corrupted in transit
- Fix the test fixture or data source so tickSize is a positive decimal
- Skip the offending symbol when loading instruments if the exchange genuinely reports tickSize 0
Example fix
// before (fixture)
"PRICE_FILTER": { "tickSize": "0", ... }
// after
"PRICE_FILTER": { "tickSize": "0.10", ... } Defensive patterns
Strategy: validation
Validate before calling
fn has_valid_tick_size(symbol: &BinanceSymbol) -> bool {
symbol.filters.iter()
.find(|f| f.filter_type == "PRICE_FILTER")
.and_then(|f| f.tick_size.as_deref())
.and_then(|t| t.parse::<Decimal>().ok())
.map(|t| !t.is_zero())
.unwrap_or(false)
} Try / catch
match parse_usdm_instrument(symbol) {
Ok(inst) => instruments.push(inst),
Err(e) if e.to_string().contains("Invalid tickSize of 0") => {
log::warn!("skipping symbol {} with zero tick size", symbol.symbol);
}
Err(e) => return Err(e),
} Prevention
- Sanity-check PRICE_FILTER fields (tickSize > 0) on any exchangeInfo data you cache or synthesize
- Do not hand-build fixtures with zeroed tick sizes
- Re-fetch exchangeInfo if a payload looks truncated or corrupted
When it happens
Trigger: parse_usdm_instrument_with_fees reads the PRICE_FILTER via get_filter and parse_filter_price and finds tickSize == 0 — e.g. an exchangeInfo payload with missing/zero tick size for the symbol, or a hand-crafted test fixture omitting it.
Common situations: Corrupted or partial exchangeInfo responses; synthetic fixtures built for tests that set tickSize to 0; exchange-side misconfiguration for a newly listed symbol.
Understand the failure class
Background: "Invalid value" and "allowed values are" config errors: what your library rejected and how to fix it — this error's family across 41 libraries.
Related errors
- Invalid tickSize of 0
- Symbol ' ' is not trading (status: )
- Unsupported underlying type
- Unsupported USD-M contract type
- base_coin is empty for symbol
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/84b45dd259cbdbfc.
Report an issue: GitHub.
Appendix: source
Thrown at crates/adapters/binance/src/common/parse.rs:314
anyhow::bail!(
"Symbol '{}' is not trading (status: {:?})",
symbol.symbol,
symbol.status
);
}
let quote_currency = get_currency(symbol.quote_asset.as_str());
let settlement_currency = get_currency(symbol.margin_asset.as_str());
let instrument_id = format_instrument_id(&symbol.symbol, BinanceProductType::UsdM);
let raw_symbol = Symbol::new(symbol.symbol.as_str());
let price_filter = get_filter(&symbol.filters, "PRICE_FILTER")
.context("Missing PRICE_FILTER in symbol filters")?;
let tick_size = parse_filter_price(price_filter, "tickSize")?;
if tick_size.is_zero() {
anyhow::bail!(
"Invalid tickSize of 0 for symbol '{}', cannot create instrument",
symbol.symbol,
);
}
let max_price = parse_filter_price(price_filter, "maxPrice").ok();
let min_price = parse_filter_price(price_filter, "minPrice").ok();
let lot_filter =
get_filter(&symbol.filters, "LOT_SIZE").context("Missing LOT_SIZE in symbol filters")?;
let step_size = parse_filter_quantity(lot_filter, "stepSize")?;
let max_quantity = parse_filter_quantity(lot_filter, "maxQty").ok();
let min_quantity = parse_filter_quantity(lot_filter, "minQty").ok();
let min_notional = parse_futures_min_notional(&symbol.filters, quote_currency);
// Default margin (0.1 = 10x leverage)
let default_margin = Decimal::new(1, 1);View on GitHub (pinned to 18893faf8b)