nautechsystems/nautilus_trader · error
failed to submit Lighter integrator approval nonce={} api_ke
Error message
failed to submit Lighter integrator approval nonce={} api_key_index={}{hint} What it means
During Lighter execution client connect, submit_integrator_auto_approval signs and sends an ApproveIntegrator on-chain transaction via send_tx. If the submission fails, the error is wrapped with the nonce and api_key_index; when the earlier maker-only pre-flight check could not complete, a hint warns that a maker-only key may be rejected by the venue with error 62007.
Source
Thrown at crates/adapters/lighter/src/execution.rs:808
let response = match self.http_client.send_tx(&request).await {
Ok(response) => response,
Err(e) => {
if lighter_http_error_is_definite_api_rejection(&e) {
let _ = self.dispatch.nonce_manager.ack_failure_if_latest(
credential.account_index(),
approval.api_key_index,
approval.nonce,
);
}
approval.send_reservation.release();
let hint = if maker_only_check_failed {
" (maker-only pre-flight check failed earlier; venue may reject with 62007 \
if this key is maker-only)"
} else {
""
};
return Err(anyhow::Error::new(e).context(format!(
"failed to submit Lighter integrator approval nonce={} api_key_index={}{hint}",
approval.nonce, approval.api_key_index,
)));
}
};
let _ = self.dispatch.nonce_manager.ack_success(
credential.account_index(),
approval.api_key_index,
approval.nonce,
);
approval.send_reservation.release();
log::debug!(
"Submitted Lighter integrator approval: integrator={}, nonce={}, \
api_key_index={}, approval_expiry={}, tx_hash={}",
integrator_account_index,
approval.nonce,View on GitHub (pinned to 18893faf8b)
Solutions
- Check the inner error for API code 62007 and, if so, use a non-maker-only API key or have the account pre-approved by one.
- Verify credentials (api_key_index, private key) match the Lighter account.
- Retry connect after backoff if the inner error is a network/5xx failure; the nonce manager acks failures for definite rejections so nonce state stays consistent.
- Ensure only one approval flow runs concurrently; nonce reservations must complete before reuse.
Example fix
// before
// key index 0 is maker-only
LighterExecClientConfig { api_key_index: 0, ... } // 62007 rejection at connect
// after
LighterExecClientConfig { api_key_index: 1, ... } // non-maker-only key Defensive patterns
Strategy: try-catch
Validate before calling
// before connect: verify the API key is not maker-only
let maker_only = client.is_maker_only_api_key(&credential).await.unwrap_or(false);
if maker_only { /* use another key or skip auto-approval */ } Try / catch
match client.connect().await {
Err(e) if format!("{e:#}").contains("integrator approval") => {
if format!("{e:#}").contains("62007") {
// switch to a non-maker-only api_key_index and retry
}
}
r => r?,
} Prevention
- Use a non-maker-only API key for accounts needing integrator approval
- Verify signing credentials (api_key_index, private key) before connect
- Avoid concurrent approval flows that desync nonces
- Retry transient network/5xx failures with backoff
When it happens
Trigger: connect() on an execution client configured with an integrator account, where http_client.send_tx(ApproveIntegrator) returns Err — API rejection (e.g. 62007 for maker-only keys, nonce conflict), network failure, or invalid signature/credentials.
Common situations: Using a maker-only API key that cannot approve integrators (venue error 62007), stale/incorrect L1/L2 signing keys, nonce desync after retries, or Lighter API downtime during startup.
Related errors
- Binance Spot market data mode SBE requires Ed25519 API crede
- L3 order book requires API credentials; configure api_key an
- failed to re-subscribe Lighter account channels: {error}
- API credentials not configured
- failed to request AX whoami: {e}
AI-assisted analysis of nautechsystems/nautilus_trader@18893faf8b (2026-09-08).
Data as JSON: /api/errors/367d8636e45c3f34.
Report an issue: GitHub.