{"record":{"id":"66953fcf8ee0dac1","repo":"nautechsystems/nautilus_trader","slug":"signature-expiry-secs-signature-expiry-secs-s-mus","errorCode":null,"errorMessage":"signature_expiry_secs {signature_expiry_secs}s must be greater than the Derive minimum {min_ttl_secs}s","messagePattern":"signature_expiry_secs (.+?)s must be greater than the Derive minimum (.+?)s","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"crates/adapters/derive/src/execution.rs","lineNumber":3052,"sourceCode":"                strategy_id,\n                instrument_id,\n                client_order_id,\n                Some(venue_order_id),\n                &reason,\n                clock.get_time_ns(),\n            );\n            None\n        }\n    }\n}\n\nfn normal_order_signature_expiry(\n    clock: &'static AtomicTime,\n    signature_expiry_secs: u64,\n) -> anyhow::Result<i64> {\n    let min_ttl_secs = MIN_SIGNATURE_TTL.as_secs();\n    if signature_expiry_secs <= min_ttl_secs {\n        anyhow::bail!(\n            \"signature_expiry_secs {signature_expiry_secs}s must be greater than the Derive minimum {min_ttl_secs}s\"\n        );\n    }\n\n    let now_secs_u64 = clock.get_time_ns().as_u64() / 1_000_000_000;\n    let now_secs = i64::try_from(now_secs_u64).with_context(|| {\n        format!(\"current UNIX time {now_secs_u64}s cannot fit in Derive signature_expiry_sec\")\n    })?;\n    let ttl_secs = i64::try_from(signature_expiry_secs).with_context(|| {\n        format!(\n            \"signature_expiry_secs {signature_expiry_secs}s cannot fit in Derive signature_expiry_sec\"\n        )\n    })?;\n\n    now_secs.checked_add(ttl_secs).ok_or_else(|| {\n        anyhow::anyhow!(\n            \"signature expiry overflows Derive signature_expiry_sec: now {now_secs}s plus TTL {ttl_secs}s\"\n        )","sourceCodeStart":3034,"sourceCodeEnd":3070,"githubUrl":"https://github.com/nautechsystems/nautilus_trader/blob/18893faf8b356be3320add8de2f861b0b647cf06/crates/adapters/derive/src/execution.rs#L3034-L3070","documentation":"Derive order signatures have a minimum time-to-live (MIN_SIGNATURE_TTL). normal_order_signature_expiry validates that the configured signature_expiry_secs is strictly greater than that minimum, bailing otherwise, before computing the expiry timestamp.","triggerScenarios":"Submitting an order with a Derive exec client configured with signature_expiry_secs <= MIN_SIGNATURE_TTL.as_secs(); constructing signature expiry for a normal (non-batch) order.","commonSituations":"Config copied from another adapter with shorter expiry; user sets expiry to exactly the minimum (must be strictly greater); typo like 30 instead of 300 seconds.","solutions":["Increase signature_expiry_secs in the Derive client config to a value strictly above MIN_SIGNATURE_TTL","Check the MIN_SIGNATURE_TTL constant in the derive adapter for the current minimum","If expiry must be short for safety, restructure to refresh signatures rather than shortening below the minimum"],"exampleFix":"// before\nDeriveExecClientConfig { signature_expiry_secs: 60, .. } // <= minimum\n// after\nDeriveExecClientConfig { signature_expiry_secs: 3600, .. }","handlingStrategy":"validation","validationCode":"if cfg.signature_expiry_secs <= DERIVE_MIN_SIGNATURE_TTL_SECS {\n    return Err(format!(\"signature_expiry_secs must be > {}\", DERIVE_MIN_SIGNATURE_TTL_SECS));\n}","typeGuard":null,"tryCatchPattern":"match normal_order_signature_expiry(&clock, expiry_secs) {\n    Ok(exp) => submit_with(exp),\n    Err(e) => { log::error!(\"config fix needed: {e}\"); return Err(e.into()); }\n}","preventionTips":["Centralize Derive client config defaults with a safe expiry (e.g. 3600s)","Validate config at construction time, not at order time","Check MIN_SIGNATURE_TTL when upgrading the adapter"],"tags":["rust","config","signature","validation"],"backgroundTag":"invalid-config-value","analyzedSha":"18893faf8b356be3320add8de2f861b0b647cf06","analyzedAt":"2026-09-08T20:49:34.690Z","contentChangedAt":"2026-09-08T20:49:34.690Z","schemaVersion":2},"datasetVersion":"2026-09-14T00:17:10.932Z"}