Error Reference

All API error codes with descriptions and suggested actions.

All errors follow this shape:

{
  "statusCode": 400,
  "code": "POSITION_INSUFFICIENT_BALANCE",
  "message": "Insufficient balance — you need enough collateral token + protocol fee (~1%), AND ~0.01 SOL for transaction fees and account rent.",
  "detail": null,
  "path": "/api/v1/positions/open-by-token",
  "timestamp": "2026-03-15T12:00:00.000Z"
}

Match on the code field — it is a stable string. The message is human-readable and may change.

Authentication Errors

CodeHTTPMessageAction
AUTH_MISSING_KEY401Missing x-api-key header.Add the x-api-key header to your request.
AUTH_INVALID_KEY401Invalid API key.Check the key is correct and not malformed.
AUTH_REVOKED_KEY401API key has been revoked.Request a new key from [email protected].
AUTH_MISSING_ADMIN_TOKEN401Missing admin authorization token.Admin endpoints only — not applicable to partner integrations.
AUTH_INVALID_ADMIN_TOKEN401Invalid or expired admin token.Admin endpoints only.
AUTH_INVALID_PASSWORD401Invalid password.Internal — not returned to partners.
AUTH_MISSING_WALLET_SIGNATURE401Missing wallet signature headers.Include x-wallet-address, x-wallet-signature, x-wallet-message for order endpoints.
AUTH_INVALID_WALLET_SIGNATURE401Invalid wallet signature.Verify signature is a valid Ed25519 signature of the message.
AUTH_WALLET_SIGNATURE_EXPIRED401Wallet signature has expired (max 5 minutes).Regenerate the signature with a current timestamp.
AUTH_WALLET_MISMATCH403Wallet address in body does not match signed wallet.The userPublicKey in the request body must match x-wallet-address.
AUTH_MISSING_LP_KEY401Missing x-lp-api-key header.LP endpoints only — use x-lp-api-key not x-api-key.
AUTH_INVALID_LP_KEY401Invalid LP API key.Check the LP API key.
AUTH_REVOKED_LP_KEY401LP API key has been revoked.Generate a new LP API key from the Lenders Portal.

Rate Limiting

CodeHTTPMessageAction
RATE_LIMIT_EXCEEDED429Rate limit exceeded. Please wait before retrying.Back off exponentially. Start with 1s, double on each retry.

Offer Errors

CodeHTTPMessageAction
OFFER_NOT_FOUND404Offer not found.The offerPublicKey does not exist or is inactive. Use open-by-token instead.
NO_OFFER_FOR_TOKEN404No active offer found for the requested token and side.No liquidity available for this token/side combination. Check GET /api/v1/offers for supported tokens.

Token Errors

CodeHTTPMessageAction
TOKEN_NOT_FOUND404Token not found.The token mint is not indexed. Check GET /api/v1/tokens for supported tokens.

Position Errors

CodeHTTPMessageAction
POSITION_NOT_FOUND404Position not found.The position address doesn't exist in the database.
POSITION_NOT_FOUND_ONCHAIN404Position account not found on chain.The position was already closed on-chain.
POSITION_OFFER_NOT_FOUND_ONCHAIN404Offer account not found on chain.The liquidity pool was removed on-chain.
POSITION_NOT_OWNER403Position does not belong to the specified wallet.Verify userPublicKey matches the position owner.
POSITION_SIDE_MISMATCH400Requested side does not match the pool direction.The offer only supports one side. Use open-by-token for automatic matching.
POSITION_INSUFFICIENT_BALANCE400Insufficient balance.User needs enough collateral + ~1% protocol fee + ~0.01 SOL for network fees and rent.
POSITION_DUPLICATE409Position already exists.Duplicate request detected. Check if the previous transaction was already confirmed.
POSITION_TX_TOO_LARGE400Transaction too large.Reduce slippage or retry. This can happen on complex swap routes.
POSITION_SPLIT_FAILED500Split did not return new position addresses.Retry. If persistent, contact support.
POSITION_MERGE_MISMATCH400Both positions must belong to the same wallet.Both positions must have the same userPublicKey.
POSITION_MERGE_NOT_FOUND404One or both positions not found on chain.Verify both position addresses are valid and still open.
POSITION_MISSING_PRICE400No price data available for the requested token.The oracle has no price for this token. Try again or use a different token.
POSITION_NOT_AVAILABLE409Position account is not yet available on-chain.The open transaction was confirmed but the account hasn't propagated yet. Wait 2-3 seconds and retry.
POSITION_TOO_SMALL422Position size too small to cover protocol fee.Increase the collateral amount. The minimum position size is approximately 0.01 SOL equivalent.
POSITION_SWAP_ROUTE_FAILED400Swap route failed — position may be too small for available liquidity pools.Try a larger collateral amount. This indicates the swap pool has insufficient depth for the requested size.

Order Errors

CodeHTTPMessageAction
ORDER_NOT_FOUND404Order not found.The order ID doesn't exist.
ORDER_NOT_OWNER403Order does not belong to this API key.Use the same API key that created the order.
ORDER_INVALID_PRICE400triggerPrice must be a positive number string.Pass triggerPrice as a numeric string like "155.50".
ORDER_NOT_CANCELLABLE400Only ACTIVE or FAILED orders can be cancelled.Check the order status before attempting cancellation.
ORDER_POSITION_NOT_OWNER403Position does not belong to this API key.The position was opened by a different API key.
ORDER_WALLET_NOT_POSITION_OWNER403Privy wallet does not belong to the position owner.The delegated wallet must match the position owner.

Partner Errors

CodeHTTPMessageAction
PARTNER_KEY_NOT_FOUND403Key not found or not owned by you.The API key doesn't exist or belongs to a different partner.
PARTNER_NOT_FOUND404Partner not found.Internal — the partner record for your API key was not found. Contact support.

Oracle Errors

CodeHTTPMessageAction
ORACLE_FEED_MISSING500No oracle feed configured for the requested token.The token exists but has no price feed. Contact support.

Swap / Jupiter Errors

CodeHTTPMessageAction
SWAP_QUOTE_FAILED422Failed to get swap quote from Jupiter.Retry. Jupiter may be temporarily unavailable.
SWAP_BUILD_FAILED422Failed to build swap transaction.Retry.
JUPITER_QUOTE_FAILED422Jupiter returned no route for this swap.Increase slippage or try a different token.
JUPITER_SWAP_BUILD_FAILED422Jupiter failed to build swap instructions.Retry with higher slippage.
TX_SIZE_EXCEEDED400Transaction too large.Reduce slippage (fewer alternative routes) or retry.
SIMULATION_FAILED422Transaction simulation failed.The transaction would fail on-chain. Check parameters and retry.
SLIPPAGE_EXCEEDED422Price moved beyond slippage tolerance.Increase slippageBps or retry immediately.

Bundle Errors

CodeHTTPMessageAction
BUNDLE_SUBMIT_FAILED422Failed to submit Jito bundle.Retry the partial-sell bundle submission.

Referral Errors

CodeHTTPMessageAction
REFERRAL_INVALID_CODE404Invalid referral code.Check the referral code is correct.
REFERRAL_SELF_REFER400Cannot refer yourself.A wallet cannot be referred by its own referral code.
REFERRAL_ALREADY_BOUND409Already bound to a referrer.A wallet can only be bound to one referrer.
REFERRAL_WALLET_NOT_REGISTERED404Wallet not registered in the referral program.Register with POST /api/v1/referral/register first.

Staking Errors

CodeHTTPMessageAction
STAKING_VAULT_NOT_FOUND404Staking vault not found.Valid vault values are SOL and USDC.
STAKING_POSITION_NOT_FOUND404Staking position not found.The staking position doesn't exist for this wallet.
STAKING_POSITION_INACTIVE400Staking position is not active.The position has already been unstaked.

LP Errors

CodeHTTPMessageAction
LP_NOTIFICATION_NOT_FOUND404Notification not found.The notification ID doesn't exist.
LP_API_KEY_NOT_FOUND404LP API key not found.Generate a key from the Lenders Portal.
LP_VAULT_ALREADY_EXISTS409A vault already exists for this operator + mint.Each operator can only have one vault per quote token.
LP_OFFER_ALREADY_EXISTS409A trading pool already exists for this vault + collateral mint.Each vault can only have one offer per collateral token.
LP_VAULT_NOT_FOUND404Vault not found on chain for this operator + mint.Create a vault first with POST /api/v1/lp/tx/create-vault.

System Errors

CodeHTTPMessageAction
SERVICE_UNAVAILABLE503Service is unhealthy.Retry after a short delay. Check status at GET /health.
VALIDATION_ERROR400Request validation failed.Check the detail field for which fields failed validation. The detail field contains the joined class-validator messages describing exactly which fields are invalid.
INTERNAL_ERROR500An unexpected error occurred.Retry. If persistent, contact support with the request timestamp for debugging.

Retryable vs Non-Retryable Errors

Retryable (transient — exponential backoff recommended):

CodeReason
INTERNAL_ERRORServer-side transient failure
SERVICE_UNAVAILABLEServer temporarily down
SWAP_QUOTE_FAILEDJupiter temporarily unavailable
SWAP_BUILD_FAILEDJupiter build failure
BUNDLE_SUBMIT_FAILEDJito bundle submission failure
POSITION_NOT_AVAILABLEAccount propagation lag — retry after 2-3s
SLIPPAGE_EXCEEDEDPrice moved — retry immediately
SIMULATION_FAILEDTransaction simulation failure — retry once

Non-retryable (fix the request, do not retry):

CodeReason
AUTH_INVALID_KEY, AUTH_REVOKED_KEYBad credentials
VALIDATION_ERRORMalformed request
POSITION_NOT_FOUNDPosition does not exist
POSITION_NOT_OWNERWrong wallet
POSITION_DUPLICATEAlready submitted — check if confirmed
POSITION_INSUFFICIENT_BALANCENot enough funds
POSITION_SIDE_MISMATCHWrong pool direction
NO_OFFER_FOR_TOKENNo liquidity for this token/side
ORDER_NOT_CANCELLABLEOrder already in terminal state