{"record":{"id":"0bb9a82451d6f4ac","repo":"nautechsystems/nautilus_trader","slug":"failed-to-parse-field-value-e","errorCode":null,"errorMessage":"Failed to parse {field}='{value}': {e}","messagePattern":"Failed to parse (.+?)='(.+?)': (.+?)","errorType":"exception","errorClass":"anyhow::Error","httpStatus":null,"severity":"error","filePath":"crates/adapters/binance/src/common/parse.rs","lineNumber":159,"sourceCode":"        f.get(\"filterType\")\n            .and_then(|v| v.as_str())\n            .is_some_and(|t| t == filter_type)\n    })\n}\n\n/// Parses a string field from a JSON value.\nfn parse_filter_string(filter: &Value, field: &str) -> anyhow::Result<String> {\n    filter\n        .get(field)\n        .and_then(|v| v.as_str())\n        .map(String::from)\n        .ok_or_else(|| anyhow::anyhow!(\"Missing field '{field}' in filter\"))\n}\n\n/// Parses a Price from a filter field.\nfn parse_filter_price(filter: &Value, field: &str) -> anyhow::Result<Price> {\n    let value = parse_filter_string(filter, field)?;\n    Price::from_str(&value).map_err(|e| anyhow::anyhow!(\"Failed to parse {field}='{value}': {e}\"))\n}\n\n/// Parses a Quantity from a filter field.\nfn parse_filter_quantity(filter: &Value, field: &str) -> anyhow::Result<Quantity> {\n    let value = parse_filter_string(filter, field)?;\n    Quantity::from_str(&value)\n        .map_err(|e| anyhow::anyhow!(\"Failed to parse {field}='{value}': {e}\"))\n}\n\n/// Parses the futures `MIN_NOTIONAL` filter into a `Money` value in `currency`.\n///\n/// Returns `None` when the filter is absent, the `notional` field cannot be\n/// parsed, or the value is non-positive.\nfn parse_futures_min_notional(filters: &[Value], currency: Currency) -> Option<Money> {\n    let filter = get_filter(filters, \"MIN_NOTIONAL\")?;\n    let raw = filter.get(\"notional\").and_then(|v| v.as_str())?;\n    let amount = f64::from_str(raw).ok()?;\n    if amount <= 0.0 {","sourceCodeStart":141,"sourceCodeEnd":177,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/a4b06ed870971b5671d12754ea138a3ab99b1dec/crates/adapters/binance/src/common/parse.rs#L141-L177","documentation":"A Binance exchangeInfo filter field was present as a string, but Price::from_str / Quantity::from_str rejected its contents. The domain types expect fixed-point decimal strings; values in other notations (e.g. scientific notation like \"1e-8\") or non-numeric text fail here.","triggerScenarios":"Binance returns a filter value the strict decimal parser cannot read - scientific notation, empty string, or non-numeric text; or a mangled/captured payload altered the numeric formatting.","commonSituations":"Exchange-side formatting changes for very small ticks; responses rewritten by proxies; stale or corrupted captures being replayed.","solutions":["Inspect the exact field=value printed in the message against the raw Binance response to identify the offending notation","Update the adapter - numeric parsers gain coverage for new notations over time","Report the field/value pair to maintainers if the live exchange really emits it"],"exampleFix":"// before: strict fixed-point parse\nlet price = Price::from_str(&value)?;\n\n// after: normalize scientific notation first\nlet normalized = Decimal::from_str(&value)?.normalize().to_string();\nlet price = Price::from_str(&normalized)?;","handlingStrategy":"validation","validationCode":"fn is_parseable_decimal(value: &str) -> bool {\n    rust_decimal::Decimal::from_str(value.trim()).is_ok()\n}\n// check filter field values with this before Price/Quantity::from_str","typeGuard":"fn is_fixed_point_decimal_string(s: &str) -> bool {\n    !s.is_empty()\n        && s.chars().all(|c| c.is_ascii_digit() || c == '.')\n        && s.matches('.').count() <= 1\n}","tryCatchPattern":"let price = match Price::from_str(&value) {\n    Ok(p) => p,\n    Err(e) => {\n        log::warn!(\"non-standard filter value {field}='{value}': {e} - normalizing via Decimal\");\n        let d = rust_decimal::Decimal::from_str(&value)?;\n        Price::from_str(&d.normalize().to_string())?\n    }\n};","preventionTips":["Route unexpected numeric notations through a Decimal normalize step before strict domain parsers","Capture raw exchangeInfo responses at integration time to diff formatting changes","Upgrade the adapter when new value notations appear - parsers gain coverage release over release"],"tags":["binance","exchange-info","filters","decimal-parsing","instrument-parsing"],"backgroundTag":"invalid-numeric-format","analyzedSha":"a4b06ed870971b5671d12754ea138a3ab99b1dec","analyzedAt":"2026-08-16T22:54:50.089Z","schemaVersion":2},"datasetVersion":"2026-08-16T23:17:17.608Z"}