Error codes / OKX DEX Aggregation Router V2
OKX DEX Aggregation Router V2 error codes
Every custom error code published by OKX DEX Aggregation Router V2, with what it means and what to do about it.
6m2CDdhRgxpH4WjvdzxAYbGxwdGUz5MziiL5jek2kBma
- 6000 · 0x1770TooManyHops
Too many hops
- 6001 · 0x1771MinReturnNotReached
Min return not reached
- 6002 · 0x1772AmountInMustBeGreaterThanZero
amount_in must be greater than 0
- 6003 · 0x1773MinReturnMustBeGreaterThanZero
min_return must be greater than 0
- 6004 · 0x1774InvalidExpectAmountOut
invalid expect amount out
- 6005 · 0x1775AmountsAndRoutesMustHaveTheSameLength
amounts and routes must have the same length
- 6006 · 0x1776TotalAmountsMustBeEqualToAmountIn
total_amounts must be equal to amount_in
- 6007 · 0x1777DexesAndWeightsMustHaveTheSameLength
dexes and weights must have the same length
- 6008 · 0x1778WeightsMustSumTo100
weights must sum to 100
- 6009 · 0x1779InvalidSourceTokenAccount
Invalid source token account
- 6010 · 0x177aInvalidDestinationTokenAccount
Invalid destination token account
- 6011 · 0x177bInvalidTokenAccount
Invalid token account
- 6012 · 0x177cInvalidCommissionRate
Invalid commission rate
- 6013 · 0x177dInvalidTrimRate
Invalid trim rate
- 6014 · 0x177eInvalidCommissionTokenAccount
Invalid commission token account
- 6015 · 0x177fInvalidCommissionTemporaryTokenAccount
Invalid commission temporary token account
- 6016 · 0x1780InvalidAccountsLength
Invalid accounts length
- 6017 · 0x1781InvalidHopAccounts
Invalid hop accounts
- 6018 · 0x1782InvalidHopFromAccount
Invalid hop from account
- 6019 · 0x1783SwapAuthorityIsNotSigner
Swap authority is not signer
- 6020 · 0x1784InvalidAuthorityPda
Invalid authority pda
- 6021 · 0x1785InvalidSwapAuthority
Invalid swap authority
- 6022 · 0x1786InvalidProgramId
Invalid program id
- 6023 · 0x1787InvalidPool
Invalid pool
- 6024 · 0x1788InvalidTokenMint
Invalid token mint
- 6025 · 0x1789CalculationError
Calculation error
- 6026 · 0x178aInvalidSanctumLstStateListData
Invalid sanctum lst state list data
- 6027 · 0x178bInvalidSanctumLstStateListIndex
Invalid sanctum lst state list index
- 6028 · 0x178cInvalidSanctumSwapAccounts
Invalid sanctum swap accounts
- 6029 · 0x178dInvalidSwapAuthorityAccounts
Invalid swap authority account
- 6030 · 0x178eInvalidBridgeSeed
Bridge Seed Error
- 6031 · 0x178fInvalidBundleInput
Invalid accounts and instruction length
- 6032 · 0x1790MissingSaAccount
SA is required
- 6033 · 0x1791InvalidPlatformFeeRate
Invalid platform fee rate
- 6034 · 0x1792AmountOutMustBeGreaterThanZero
Amount out must be greater than 0
- 6035 · 0x1793InvalidDampingTerm
Invalid DampingTerm
- 6036 · 0x1794InvalidMint
Invalid mint
- 6037 · 0x1795InvalidPlatformFeeAmount
Invalid platform fee amount
- 6038 · 0x1796InvalidFeeTokenAccount
Invalid fee token account
- 6039 · 0x1797InvalidSaAuthority
Invalid sa authority
- 6040 · 0x1798CommissionAccountIsNone
Commission account is none
- 6041 · 0x1799PlatformFeeAccountIsNone
Platform fee account is none
- 6042 · 0x179aTrimAccountIsNone
Trim account is none
- 6043 · 0x179bInvalidFeeAccount
Invalid fee account
- 6044 · 0x179cInvalidSourceTokenSa
Invalid source token sa
- 6045 · 0x179dSaAuthorityIsNone
Sa authority is none
- 6046 · 0x179eSourceTokenSaIsNone
Source token sa is none
- 6047 · 0x179fSourceTokenProgramIsNone
Source token program is none
- 6048 · 0x17a0DestinationTokenSaIsNone
Destination token sa is none
- 6049 · 0x17a1DestinationTokenProgramIsNone
Destination token program is none
- 6050 · 0x17a2ResultMustBeGreaterThanZero
Calculation result must be greater than zero
- 6051 · 0x17a3InvalidAccountData
Invalid account data
- 6052 · 0x17a4InvalidRfqParameters
Invalid RFQ parameters
- 6053 · 0x17a5TobAuthorityPdaRequired
TOB mode requires authority PDA
- 6054 · 0x17a6TobWsolSaRequired
TOB mode with WSOL fees requires wsol_sa account
- 6055 · 0x17a7InvalidWsolSa
Invalid WSOL SA account
- 6056 · 0x17a8InvalidTrimAccount
Invalid trim account
- 6057 · 0x17a9InvalidCommissionAccount
Invalid commission account
- 6058 · 0x17aaInvalidPlatformFeeAccount
Invalid platform fee account
- 6059 · 0x17abInvalidActualAmountIn
Invalid actual amount in
- 6060 · 0x17acUnexpectedSaTokenAccount
Unexpected SA token account in CPI
- 6061 · 0x17adInvalidSourceTokenSaMint
Invalid source token sa mint
- 6062 · 0x17aeInvalidDestinationTokenSaMint
Invalid destination token sa mint
- 6063 · 0x17afAdapterAbort
Adapter abort
- 6064 · 0x17b0InsufficientFunds
The account does not hold enough of the token or SOL this instruction tried to spend.
- 6065 · 0x17b1InvalidDiffLamports
Invalid diff lamports
- 6066 · 0x17b2InvalidTokenProgram
Invalid token program
- 6067 · 0x17b3InvalidSigner
Invalid signer
- 6068 · 0x17b4InvalidAssociatedTokenProgram
Invalid associated token program
- 6069 · 0x17b5SolReceiverMustBeSystemAccount
SOL receiver must be a system account
- 6070 · 0x17b6InsufficientBalance
The account does not hold enough of the token or SOL this instruction tried to spend.
- 6071 · 0x17b7SolReceiverRequiresAccCloseFlag
SOL receiver requires acc_close_flag to be true
- 6072 · 0x17b8DestinationMustBeWsolForSolReceiver
Destination must be wSOL when sol_receiver is specified
- 6073 · 0x17b9InvalidGoonfiParameters
Invalid Goonfi parameters
- 6074 · 0x17baInvalidTrimAmount
Invalid trim amount