nautechsystems/nautilus_trader · error
Lighter execution client cannot modify without credentials
Error message
Lighter execution client cannot modify without credentials
What it means
modify_order was invoked while the Lighter execution client holds no API credential; order modification requires signing with account credentials, and without them the command cannot be dispatched, so the handler errors immediately.
Source
Thrown at crates/adapters/lighter/src/execution.rs:4361
Err(e) => {
let reason = OrderDeniedReason::SubmitFailed {
detail: format!("Lighter submit_order_list failed: {e}"),
};
context
.emitter
.emit_order_denied(&order, &reason.to_string());
}
}
}
Ok(())
});
Ok(())
}
fn modify_order(&self, cmd: ModifyOrder) -> anyhow::Result<()> {
let credential = self.credential.as_ref().ok_or_else(|| {
anyhow::anyhow!("Lighter execution client cannot modify without credentials")
})?;
self.dispatch_signed_modify_order(&cmd, credential);
Ok(())
}
fn cancel_order(&self, cmd: CancelOrder) -> anyhow::Result<()> {
let credential = self.credential.as_ref().ok_or_else(|| {
anyhow::anyhow!("Lighter execution client cannot cancel without credentials")
})?;
self.dispatch_signed_cancel_order(&cmd, credential);
Ok(())
}
fn cancel_all_orders(&self, cmd: CancelAllOrders) -> anyhow::Result<()> {
// Iterate over open orders for the instrument and cancel each. The
// venue offers a `CancelAllOrders` tx but it spans the whole account
// rather than a single market; doing per-order cancels keeps scope
// tight and avoids cancelling positions in unrelated markets.View on GitHub (pinned to 18893faf8b)
Solutions
- Add the Lighter signing credential to the client config (api/private key and indexes)
- Confirm the env/config in the running process actually contains the key material
- Route modifications through a credentialed client
Example fix
// before export LIGHTER_API_KEY= # empty // after export LIGHTER_API_KEY=... LIGHTER_PRIVATE_KEY=...
Defensive patterns
Strategy: validation
Validate before calling
if client.credential().is_none() {
return Err(anyhow!("cannot modify order: credentials missing"));
} Type guard
fn has_credential(c: &LighterExecutionClient) -> bool {
c.credential().is_some()
} Try / catch
match client.modify_order(cmd) {
Err(e) if e.to_string().contains("cannot modify without credentials") => { /* load creds, retry */ }
other => other?,
} Prevention
- Fail fast at startup if credentials are absent but trading is enabled
- Verify signing key env vars in the deployment manifest
- Route all order mutations through a credentialed client
When it happens
Trigger: Calling modify_order (amend price/quantity) on a Lighter execution client constructed without credentials.
Common situations: Credential omitted from adapter config; using the same client for read-only queries and trading; environment variables for the signing key not set in the deployment.
Related errors
- Lighter execution client cannot submit without credentials
- Lighter execution client cannot cancel without credentials
- Lighter query_order requires credentials
- Redis config error: username supplied without password. Eith
- Binance Spot market data mode SBE requires Ed25519 API crede
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/b87cf90e524c8c55.
Report an issue: GitHub.