Common Errors
This guide lists common errors you might encounter when using the SDK or API, along with their causes and recommended solutions.
Error Reference
| Error Subject | Error Messages / Codes | Description & Solution |
|---|---|---|
| Insufficient Funds | insufficient lamports, INSUFFICIENT_BALANCE, BANKRUPTCY | Cause: Wallet lacks enough SOL for transaction fees or USDC/tokens for the trade. Solution: Deposit more funds to cover fees and order value. |
| Session & Auth | SESSION_EXPIRED, SESSION_INVALID, Invalid session ID, SIGNATURE_VERIFICATION, SESSION_NOT_FOUND | Cause: The trading session key has expired, is invalid, or the signature failed. Solution: Refresh the session or disconnect and reconnect your wallet to generate a new session. |
| Order Validation | INVALID_PRICE, INVALID_SIZE, tick size, precision | Cause: Price or size does not meet market precision requirements. Solution: Adjust values to match the market’s tick size and lot size. |
| Market Constraints | POST_ONLY_..., IMMEDIATE_ORDER_GOT_NO_FILLS, FILL_OR_KILL | Cause: Order constraints (Post-Only, IOC, FOK) could not be satisfied. Solution: Relax constraints or adjust price/size to ensure execution. |
| Market Status | MARKET_CLOSED, MARKET_FROZEN | Cause: The market is currently closed or frozen. Solution: Wait for the market to resume trading. |
| Position Limits | POSITION_SIZE_LIMIT, REDUCE_ONLY, position size | Cause: Position limit reached or “Reduce-Only” order would increase position. Solution: Reduce trade size or ensure the order only closes existing positions. |
| Stale Data | stale, outdated, price changed | Cause: Market data used for the order is too old. Solution: Fetch fresh market data and retry the order. |
| Account Health | UNHEALTHY, OMF | Cause: Order would put account in an unhealthy state or exceed risk parameters. Solution: Reduce order size or add more margin to your account. |
| Order Execution | ORDER_EXECUTION_EMPTY | Cause: Market has insufficient liquidity to fill the order. Solution: Try a smaller order size or wait for more orderbook liquidity. |
| Minimum Size | minimum size, MIN_SIZE | Cause: Order size is below the minimum required for the market. Solution: Increase order size to meet the minimum lot size requirement. |
| Price Band | price band, outside range | Cause: Order price is outside the allowed price band range. Solution: Adjust price to be within the market’s price band limits. |
| Position Order Conflict | POSITION_STATE_ORDER_PRICE | Cause: Market close order plus pending limit orders exceeds current position size. Solution: Cancel some limit orders or reduce the close amount. |
| Nord Initialization | Invalid public key input | Cause: Incorrect app ID when initializing Nord. Solution: Verify the application ID used during initialization. |
Last updated on