{"record":{"id":"702b293fc74c9a44","repo":"nautechsystems/nautilus_trader","slug":"invalid-ticksize-of-0","errorCode":null,"errorMessage":"Invalid tickSize of 0","messagePattern":"Invalid tickSize of 0","errorType":"validation","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/common/parse.rs","lineNumber":786,"sourceCode":"\n    let price_filter = symbol\n        .filters\n        .iter()\n        .find(|filter| filter.filter_type == \"PRICE_FILTER\")\n        .context(\"Missing PRICE_FILTER in symbol filters\")?;\n    let lot_filter = symbol\n        .filters\n        .iter()\n        .find(|filter| filter.filter_type == \"LOT_SIZE\")\n        .context(\"Missing LOT_SIZE in symbol filters\")?;\n\n    let tick_size = decimal_price(\n        price_filter\n            .tick_size\n            .as_deref()\n            .context(\"Missing PRICE_FILTER tickSize\")?,\n    )?;\n    anyhow::ensure!(!tick_size.is_zero(), \"Invalid tickSize of 0\");\n    let step_size = decimal_quantity(\n        lot_filter\n            .step_size\n            .as_deref()\n            .context(\"Missing LOT_SIZE stepSize\")?,\n    )?;\n    anyhow::ensure!(!step_size.is_zero(), \"Invalid stepSize of 0\");\n\n    let instrument = CurrencyPair::builder()\n        .instrument_id(InstrumentId::new(\n            Symbol::from_str_unchecked(&symbol.symbol),\n            Venue::new(BINANCE),\n        ))\n        .raw_symbol(Symbol::new(&symbol.symbol))\n        .base_currency(get_currency(&symbol.base_asset))\n        .quote_currency(get_currency(&symbol.quote_asset))\n        .price_precision(tick_size.precision)\n        .size_precision(step_size.precision)","sourceCodeStart":768,"sourceCodeEnd":804,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/binance/src/common/parse.rs#L768-L804","documentation":"A spot symbol's PRICE_FILTER contains a tickSize of 0, which cannot represent a valid price increment; the adapter rejects the instrument because all price rounding logic depends on a positive tick size.","triggerScenarios":"parse_spot_instrument_json_with_fees building a spot instrument when the exchange-info PRICE_FILTER.tickSize field is \"0\" (or numerically zero).","commonSituations":"Binance exchange-info anomalies for newly listed or special symbols; testnet data with placeholder filters; mock/recorded responses with zeroed filter values.","solutions":["Skip or exclude the affected symbol from instrument loading","Verify the raw exchange-info entry for the symbol and report/update if Binance fixed it","Refresh exchange-info data and retry","Use load_ids to load only known-good symbols"],"exampleFix":"// before\nclient.request_instruments();  // loads all symbols incl. bad tickSize\n// after\nif exchange_info_tick_size(symbol) == \"0\" { eprintln!(\"skip {symbol}: zero tickSize\"); continue; }","handlingStrategy":"validation","validationCode":"let tick = price_filter[\"tickSize\"].as_str().unwrap_or(\"0\"); if tick.parse::<Decimal>().map(|d| d.is_zero()).unwrap_or(true) { skip_symbol(); }","typeGuard":"fn valid_tick(f: &serde_json::Value) -> bool { f[\"tickSize\"].as_str().and_then(|s| s.parse::<Decimal>().ok()).map_or(false, |d| !d.is_zero()) }","tryCatchPattern":"match build_instrument(&sym) { Ok(i) => Some(i), Err(e) if e.to_string().contains(\"tickSize\") => { warn!(\"skip: {e}\"); None }, Err(e) => return Err(e) }","preventionTips":["Sanity-check PRICE_FILTER values before loading instruments","Re-fetch exchange-info if filters look like placeholders","Use explicit load_ids on testnet where filters may be incomplete"],"tags":["binance","instruments","tick-size","validation"],"backgroundTag":"invalid-argument-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}