{"record":{"id":"b89c92c788a0f749","repo":"nautechsystems/nautilus_trader","slug":"continuous-future-last-post-instrument-id-instrum","errorCode":null,"errorMessage":"Continuous future last_post_instrument_id {instrument_id} was not found in transitions","messagePattern":"Continuous future last_post_instrument_id (.+?) was not found in transitions","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/data/src/engine/requests.rs","lineNumber":417,"sourceCode":"        anyhow::bail!(\"Continuous future transitions must not be empty\");\n    }\n\n    if let Some(instrument_id) = first_pre_instrument_id\n        && !transitions\n            .iter()\n            .any(|row| row.pre_instrument_id == instrument_id)\n    {\n        anyhow::bail!(\n            \"Continuous future first_pre_instrument_id {instrument_id} was not found in transitions\"\n        );\n    }\n\n    if let Some(instrument_id) = last_post_instrument_id\n        && !transitions\n            .iter()\n            .any(|row| row.post_instrument_id == instrument_id)\n    {\n        anyhow::bail!(\n            \"Continuous future last_post_instrument_id {instrument_id} was not found in transitions\"\n        );\n    }\n\n    Ok(ContinuousFutureRequest {\n        primary_bar_type,\n        request_bar_aggregation: RequestBarAggregation {\n            bar_types,\n            update_subscriptions: false,\n            // Roll gaps and weekends must not emit synthetic last-close bars (v1 parity)\n            disable_build_with_no_updates: true,\n            skip_first_non_full_bar: None,\n        },\n        transitions,\n        adjustment_mode,\n        first_pre_instrument_id,\n        last_post_instrument_id,\n    })","sourceCodeStart":399,"sourceCodeEnd":435,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/data/src/engine/requests.rs#L399-L435","documentation":"The optional `last_post_instrument_id` chain bound supplied with a continuous-future bar request/subscription does not match the `post_instrument_id` of any transition row. The library requires every explicit chain endpoint to exist in the parsed transitions table.","triggerScenarios":"Calling continuous_future_request_from_bars or continuous_future_subscription_from_bars with a `last_post_instrument_id` request parameter that matches no row's `post_instrument_id` in the `transitions` parameter.","commonSituations":"Specifying a future contract that has not yet been added as a transition (e.g. next quarter's expiry not yet in the roll table); typo or wrong symbol format; passing a pre-side ID where a post-side ID is required; stale bound after the roll schedule changed.","solutions":["Set `last_post_instrument_id` to exactly the `post_instrument_id` of the last transition row.","Omit `last_post_instrument_id` so the series runs through the final available transition.","Update the transitions data to include a roll into the requested ending contract.","Verify you used the post-side (not pre-side) contract ID."],"exampleFix":"// before\n\"last_post_instrument_id\": \"ESH6-CME\"  // not yet in roll table\n// after\n\"last_post_instrument_id\": \"ESZ5-CME\"  // post_instrument_id of last transition","handlingStrategy":"validation","validationCode":"if let Some(bound) = &params.last_post_instrument_id {\n    assert!(transitions.iter().any(|t| &t.post_instrument_id == bound),\n        \"last_post_instrument_id {bound} not in transitions\");\n}","typeGuard":"fn post_bound_in_transitions(bound: &InstrumentId, transitions: &[Transition]) -> bool {\n    transitions.iter().any(|t| t.post_instrument_id == *bound)\n}","tryCatchPattern":null,"preventionTips":["Use the post-side ID of the final roll row","Ensure the ending contract exists in the roll schedule before requesting","Fall back to unbounded series when unsure"],"tags":["validation","continuous-futures","request-params"],"backgroundTag":"resource-not-found","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"}