{"record":{"id":"63378fa30c5f2f76","repo":"nautechsystems/nautilus_trader","slug":"only-depth-10-is-currently-supported-for-order-boo","errorCode":null,"errorMessage":"Only depth=10 is currently supported for order book depths","messagePattern":"Only depth=10 is currently supported for order book depths","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/databento/src/historical.rs","lineNumber":498,"sourceCode":"        &self,\n        params: RangeQueryParams,\n        depth: Option<usize>,\n    ) -> anyhow::Result<Vec<OrderBookDepth10>> {\n        let symbols: Vec<&str> = params.symbols.iter().map(String::as_str).collect();\n        check_consistent_symbology(&symbols)?;\n\n        let first_symbol = params\n            .symbols\n            .first()\n            .ok_or_else(|| anyhow::anyhow!(\"No symbols provided\"))?;\n        let stype_in = infer_symbology_type(first_symbol);\n        let end = params.end.unwrap_or_else(|| self.clock.get_time_ns());\n        let time_range = get_date_time_range(params.start, end)?;\n\n        // For now, only support MBP_10 schema for depth 10\n        let _depth = depth.unwrap_or(10);\n        if _depth != 10 {\n            anyhow::bail!(\"Only depth=10 is currently supported for order book depths\");\n        }\n\n        let range_params = GetRangeParams::builder()\n            .dataset(params.dataset)\n            .date_time_range(time_range)\n            .symbols(symbols)\n            .stype_in(stype_in)\n            .schema(dbn::Schema::Mbp10)\n            .maybe_limit(params.limit.and_then(NonZeroU64::new))\n            .build();\n\n        let price_precision_arg = params.price_precision;\n\n        let mut client = (*self.inner).clone();\n        let mut decoder = client\n            .timeseries()\n            .get_range(&range_params)\n            .await","sourceCodeStart":480,"sourceCodeEnd":516,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/databento/src/historical.rs#L480-L516","documentation":"`get_range_order_book_depth10` fetches MBP-10 snapshots, and the `depth` parameter currently only accepts 10 (the default). Any other depth value bails because the implementation only supports the MBP_10 schema. This is an explicit capability limitation, not a data problem.","triggerScenarios":"Calling `get_range_order_book_depth10(params, Some(n))` where `n != 10` (e.g. Some(5) or Some(20)).","commonSituations":"Configuring desired book depth generically in an application and passing it straight through; assuming the adapter supports Databento's other depth schemas (mbp-2, mbp-5, etc.).","solutions":["Pass `None` (defaults to 10) or `Some(10)` for the depth parameter.","If a different depth is needed, fetch the corresponding MBP schema directly or extend the adapter to support additional depth schemas.","Clamp/validate user-configured depth values to 10 before calling."],"exampleFix":"// before\nlet depth = app_config.book_depth; // e.g. 5\nhistorical.get_range_order_book_depth10(params, Some(depth)).await?;\n// after\nlet depth = if app_config.book_depth != 10 { None } else { Some(10) };\nhistorical.get_range_order_book_depth10(params, depth).await?;","handlingStrategy":"validation","validationCode":"let depth = depth.unwrap_or(10);\nif depth != 10 { panic!(\"only depth=10 supported, got {depth}\"); }","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Hard-code or clamp depth to 10 when calling get_range_order_book_depth10.","Pass None to accept the default depth of 10.","Check adapter docs for newly supported depths before configuring other values."],"tags":["databento","order-book","depth","unsupported-feature"],"backgroundTag":"unsupported-operation","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}