Solana error codes › OKX DEX Aggregation Router V2

OKX DEX Aggregation Router V2 error codes

75 error codes defined by OKX DEX Aggregation Router V2 (program ID 6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma). In logs they appear as custom program error: 0x… after Program 6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma failed.

Custom errors start at 6000 (0x1770). If a code is below 6000 and not listed here, see the Anchor framework errors.

HexCodeError
0x17706000TooManyHops
Too many hops
0x17716001MinReturnNotReached
Min return not reached
The name points to a slippage or minimum-output check: the price moved past the limit set in the transaction.
0x17726002AmountInMustBeGreaterThanZero
amount_in must be greater than 0
0x17736003MinReturnMustBeGreaterThanZero
min_return must be greater than 0
The name points to a slippage or minimum-output check: the price moved past the limit set in the transaction.
0x17746004InvalidExpectAmountOut
invalid expect amount out
0x17756005AmountsAndRoutesMustHaveTheSameLength
amounts and routes must have the same length
0x17766006TotalAmountsMustBeEqualToAmountIn
total_amounts must be equal to amount_in
0x17776007DexesAndWeightsMustHaveTheSameLength
dexes and weights must have the same length
0x17786008WeightsMustSumTo100
weights must sum to 100
0x17796009InvalidSourceTokenAccount
Invalid source token account
0x177a6010InvalidDestinationTokenAccount
Invalid destination token account
0x177b6011InvalidTokenAccount
Invalid token account
0x177c6012InvalidCommissionRate
Invalid commission rate
0x177d6013InvalidTrimRate
Invalid trim rate
0x177e6014InvalidCommissionTokenAccount
Invalid commission token account
0x177f6015InvalidCommissionTemporaryTokenAccount
Invalid commission temporary token account
0x17806016InvalidAccountsLength
Invalid accounts length
0x17816017InvalidHopAccounts
Invalid hop accounts
0x17826018InvalidHopFromAccount
Invalid hop from account
0x17836019SwapAuthorityIsNotSigner
Swap authority is not signer
The name points to a permission check: the wrong signer or owner account was passed.
0x17846020InvalidAuthorityPda
Invalid authority pda
The name points to a permission check: the wrong signer or owner account was passed.
0x17856021InvalidSwapAuthority
Invalid swap authority
0x17866022InvalidProgramId
Invalid program id
0x17876023InvalidPool
Invalid pool
0x17886024InvalidTokenMint
Invalid token mint
0x17896025CalculationError
Calculation error
0x178a6026InvalidSanctumLstStateListData
Invalid sanctum lst state list data
0x178b6027InvalidSanctumLstStateListIndex
Invalid sanctum lst state list index
0x178c6028InvalidSanctumSwapAccounts
Invalid sanctum swap accounts
0x178d6029InvalidSwapAuthorityAccounts
Invalid swap authority account
0x178e6030InvalidBridgeSeed
Bridge Seed Error
0x178f6031InvalidBundleInput
Invalid accounts and instruction length
0x17906032MissingSaAccount
SA is required
0x17916033InvalidPlatformFeeRate
Invalid platform fee rate
0x17926034AmountOutMustBeGreaterThanZero
Amount out must be greater than 0
0x17936035InvalidDampingTerm
Invalid DampingTerm
0x17946036InvalidMint
Invalid mint
0x17956037InvalidPlatformFeeAmount
Invalid platform fee amount
0x17966038InvalidFeeTokenAccount
Invalid fee token account
0x17976039InvalidSaAuthority
Invalid sa authority
0x17986040CommissionAccountIsNone
Commission account is none
0x17996041PlatformFeeAccountIsNone
Platform fee account is none
0x179a6042TrimAccountIsNone
Trim account is none
0x179b6043InvalidFeeAccount
Invalid fee account
0x179c6044InvalidSourceTokenSa
Invalid source token sa
0x179d6045SaAuthorityIsNone
Sa authority is none
0x179e6046SourceTokenSaIsNone
Source token sa is none
0x179f6047SourceTokenProgramIsNone
Source token program is none
0x17a06048DestinationTokenSaIsNone
Destination token sa is none
0x17a16049DestinationTokenProgramIsNone
Destination token program is none
0x17a26050ResultMustBeGreaterThanZero
Calculation result must be greater than zero
0x17a36051InvalidAccountData
Invalid account data
0x17a46052InvalidRfqParameters
Invalid RFQ parameters
0x17a56053TobAuthorityPdaRequired
TOB mode requires authority PDA
0x17a66054TobWsolSaRequired
TOB mode with WSOL fees requires wsol_sa account
0x17a76055InvalidWsolSa
Invalid WSOL SA account
0x17a86056InvalidTrimAccount
Invalid trim account
0x17a96057InvalidCommissionAccount
Invalid commission account
0x17aa6058InvalidPlatformFeeAccount
Invalid platform fee account
0x17ab6059InvalidActualAmountIn
Invalid actual amount in
0x17ac6060UnexpectedSaTokenAccount
Unexpected SA token account in CPI
0x17ad6061InvalidSourceTokenSaMint
Invalid source token sa mint
0x17ae6062InvalidDestinationTokenSaMint
Invalid destination token sa mint
0x17af6063AdapterAbort
Adapter abort
0x17b06064InsufficientFunds
Insufficient funds
The name points to a balance check: an account holds less than the instruction needs.
0x17b16065InvalidDiffLamports
Invalid diff lamports
0x17b26066InvalidTokenProgram
Invalid token program
0x17b36067InvalidSigner
Invalid signer
The name points to a permission check: the wrong signer or owner account was passed.
0x17b46068InvalidAssociatedTokenProgram
Invalid associated token program
0x17b56069SolReceiverMustBeSystemAccount
SOL receiver must be a system account
0x17b66070InsufficientBalance
Insufficient balance for transfer
The name points to a balance check: an account holds less than the instruction needs.
0x17b76071SolReceiverRequiresAccCloseFlag
SOL receiver requires acc_close_flag to be true
0x17b86072DestinationMustBeWsolForSolReceiver
Destination must be wSOL when sol_receiver is specified
0x17b96073InvalidGoonfiParameters
Invalid Goonfi parameters
0x17ba6074InvalidTrimAmount
Invalid trim amount

Decode an error

Free, no sign-up, nothing to connect. Works offline from a bundled list; we do not look anything up on-chain.

Swapping a token you do not know? A free Rugsight check shows mint and freeze authority, Token-2022 extensions, holder concentration and liquidity before you trade.

Source: solana-idls@1.2.1. Data: program error lists from published IDLs (solana-idls 1.2.1, MIT) and the System, SPL Token, Token-2022 and Associated Token Account source code, snapshot 2026-11-16. Programs can be upgraded and add or change errors; the failing program's current IDL is the final word.