Skip to Content
Common Errors

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 SubjectError Messages / CodesDescription & Solution
Insufficient Fundsinsufficient lamports, BALANCE_INSUFFICIENT, BANKRUPTCY_INSUFFICIENT_COVERAGECause: Wallet lacks enough SOL for transaction fees or USDC/tokens for the trade.
Solution: Deposit more funds to cover fees and order value.
Session & AuthSESSION_NOT_FOUND, INVALID_SIGNATURECause: 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 ValidationORDER_EXECUTION_LIMIT_PRICE, ORDER_EXECUTION_SIZE_LIMIT, tick size, precisionCause: Price or size does not meet market precision requirements.
Solution: Adjust values to match the market’s tick size and lot size.
Market ConstraintsPOST_ONLY_MUST_NOT_FILL_ANY_OPPOSITE_ORDERS, IMMEDIATE_ORDER_GOT_NO_FILLS, ORDER_EXECUTION_FILL_OR_KILLCause: Order constraints (Post-Only, IOC, FOK) could not be satisfied.
Solution: Relax constraints or adjust price/size to ensure execution.
Market StatusMARKET_NOT_READY, MARKET_FROZENCause: The market is currently closed or frozen.
Solution: Wait for the market to resume trading.
Position LimitsPOSITION_SIZE_LIMIT, REDUCE_ONLY, POSITION_STATE_ORDER_SIZE, position sizeCause: Position limit reached, or a reduce-only order would increase or flip the position. For perps, reduce-only supports all fill modes (Limit, PostOnly, IOC, FOK). Resting reduce-only orders are automatically shrunk or cancelled (worst price first) if total contra exposure exceeds position size.
Solution: Reduce trade size or ensure the order only closes existing positions.
Stale DataTIMESTAMP_STALE, TIMESTAMP_OUT_OF_THRESHOLD, price changedCause: Market data used for the order is too old.
Solution: Fetch fresh market data and retry the order.
Account HealthUNHEALTHY, OMFCause: Order would put account in an unhealthy state or exceed risk parameters.
Solution: Reduce order size or add more margin to your account.
Order ExecutionORDER_EXECUTION_EMPTYCause: Market has insufficient liquidity to fill the order.
Solution: Try a smaller order size or wait for more orderbook liquidity.
Minimum Sizeminimum size, MINIMUM_SIZE_DECIMALSCause: Order size is below the minimum required for the market.
Solution: Increase order size to meet the minimum lot size requirement.
Price Bandprice band, outside rangeCause: Order price is outside the allowed price band range.
Solution: Adjust price to be within the market’s price band limits.
Position Order ConflictPOSITION_STATE_ORDER_PRICECause: Market close order plus pending limit orders exceeds current position size.
Solution: Cancel some limit orders or reduce the close amount.
Atomic ConstraintsATOMICS_DUPLICATE_CANCELCause: The same order was targeted by multiple cancel sub-actions within a single atomic batch.
Solution: Remove duplicate cancel entries from the atomic actions array.
Risk (Liquidation)RISK_NOT_ENOUGHCause: The target account is not under sufficient risk for the requested liquidation action.
Solution: This is a liquidation-only error. The account does not meet the risk threshold for liquidation.
TransferSOURCE_AND_TARGET_SHOULD_NOT_BE_EQUALCause: Transfer source and destination accounts are the same.
Solution: Specify different account IDs for the source and destination.
Trigger ExecutionNO_POSITION, PLANNING_FAILED, BANKRUPTCY, RISK_CHECK_FAILED, REDUCE_ONLY_CHECK_FAILEDCause: A trigger order (TP/SL) failed to execute. Common reasons: no open position exists, the execution plan could not be built, the account is bankrupt, or the resulting state would violate risk/reduce-only constraints.
Solution: Check that the position still exists and the account is healthy before relying on trigger execution.
Nord InitializationInvalid public key inputCause: Incorrect app ID when initializing Nord.
Solution: Verify the application ID used during initialization.
Last updated on