For the complete documentation index, see llms.txt. This page is also available as Markdown.

Troubleshooting

Symptoms, causes and fixes for the most common integration problems.

Error codes and their names are listed in Data Structures, Constants and Errors. This page covers what usually causes them.

For the current binary options discovery methods and response models, use lighter-sdk 1.1.8 or newer, or lighter-go v1.0.12 or newer. Python 1.1.8 also fixes the boPnl authorization header. The standard create, modify and cancel order flow is unchanged; discover binary options market IDs through events.

The shared-library signer uses signed 64-bit market indices (int64). If you call it directly from C/C++ or a custom FFI binding, use a .h file and bindings that match your signer library. Update declarations that still use int cMarketIndex to long long int cMarketIndex, as shown in the current signer header.

See the Python binary options examples, especially create_order_from_event.py, for market discovery through events followed by create_order.

sendTx returned 200 but my order isn't there

200 means the API accepted the transaction. The sequencer can still reject it, for example because of a price outside the allowed band, a taker order that can't fill at your worst price, or insufficient margin for a taker order. Check account_tx/{account} on WebSocket or GET /api/v1/tx?by=hash&value=<tx_hash>.

invalid nonce (21104)

  • Two processes are using the same API key concurrently. Use one key per process, or serialize.

  • A previous tx failed in the sequencer without consuming its nonce (e.g. ExpiredAt passed, not enough margin for a resting order), so the later nonces you already sent are now one step ahead and fail too. Refetch nextNonce and re-sign. See When a rejected transaction consumes its nonce.

  • Batch nonces must be consecutive (21105).

invalid PublicKey, please run changePubKey (21108) / key check fails

The key at that apiKeyIndex isn't registered for that accountIndex, or it was replaced by another app using the same index. Register it again (Create accounts programmatically).

Signature rejected / wrong chain

The chainId in CreateClient must be 304 for mainnet and 300 for testnet. See Environments & endpoints.

Order size or price is off by powers of ten

You mixed up decimals. base_amount = size × 10^size_decimals, price = price × 10^price_decimals, taken from orderBookDetails for that perps or spot market, or from events for binary options. If you use lighter-ts, also watch the display/real multiplier (see Market data).

Order rejected as too small

Below min_base_amount or min_quote_amount (the larger applies). For binary options, the minimum quote check uses P × size for both buy and sell orders, where P is the Up price. A Down order can fail this check even when its (1 − P) × size cost exceeds the minimum. See Binary options order rules.

Binary options create or modify rejected

Code
Check

21631

The transaction's block time must fall within the market's start_timestamp–end_timestamp. Refresh events and select a market whose trading window is open

21632

Use a price below settlement_cap; for Up/Down this means integer ticks 1–99, not 100

21638

The operator has frozen the order book; check is_frozen before retrying

These checks apply to both CreateOrder and ModifyOrder. See Binary options: Trading and fees.

Integrator fee rejected

The client is on Standard, the fee exceeds the approved max, the approval expired, or the client already has 4 partners. See Partner Attribution.

HTTP 429 / 405

Rate limited. Back off, authenticate requests, reduce polling (use WebSocket), or change tier. See Rate Limits.

WebSocket disconnects

No frame within 2 minutes, too many subscriptions, reading too slowly, or a server deployment. Send pings every ~60 s and reconnect automatically.

account not found (21100) after a deposit

Deposits take a few minutes to credit (CCTP: ~15–20 min). Poll accountsByL1Address, or check UDA status.

WASM: argument N is undefined / expects N args

Every positional argument is required. Pass 0 for unused ones. Check the order in WASM signer functions.

Still stuck?

Open a ticket in #support on Discord with the tx_hash, account index, API key index and the full response.

Last updated

Was this helpful?