Token API

Error Codes#

API error handling#

CodeHTTP statusMessage
0200Succeeded
50011429Rate limit reached. Please refer to API documentation and throttle requests accordingly
50014400Parameter {param0} cannot be empty
50026500System error. Try again later
50103401Request header "OK-ACCESS-KEY" cannot be empty
50104401Request header "OK-ACCESS-PASSPHRASE" cannot be empty
50105401Request header "OK-ACCESS-PASSPHRASE" incorrect
50106401Request header "OK-ACCESS-SIGN" cannot be empty
50107401Request header "OK-ACCESS-TIMESTAMP" cannot be empty
50111401Invalid OK-ACCESS-KEY
50112401Invalid OK-ACCESS-TIMESTAMP
50113401Invalid signature
51000400Parameter {param0} error

Payment error handling#

Error MessageMeaningTroubleshooting Action
Empty / null responseRequest did not include PAYMENT-SIGNATURE or X-PAYMENT headerInclude PAYMENT-SIGNATURE or X-PAYMENT in the request after signing
invalid payment headerPAYMENT-SIGNATURE content is invalidCheck for truncation / encoding issues / multiple base64 nesting
param_mismatchMissing required fields or invalid parameters (address / nonce format)Verify that parameters in the signature match the expected values
toAddr mismatchPayTo address does not match or is zero addressEnsure the address matches exactly and is not 0x0000…
amount mismatchSigned amount does not match returned amountEnsure value in EIP-3009 signature equals the returned amount
unsupported_chainParsed chainIndex from network is not supportedCurrently only X Layer (eip155:196) is supported
payer_blockedauthorization.from triggered risk control rulesContact OKX support / risk team
risk_addresspayer or payTo is flagged (blacklist / sanctioned address)Use a different address
resource mismatchSigned URL does not match request URLUse the exact request URL when signing; do not reuse payload
no matching payment optionPayment token does not match required tokenSign using the token specified in the response
invalid_signatureInvalid signature format (length, r/s range, v value, etc.)Use OKXEvmSigner; avoid manual EIP-712 construction
not_yet_validvalidAfter > nowCheck system time
expiredvalidBefore <= nowCheck system time
invalid signature, nonce_usedNonce already used on-chainGenerate a new 32-byte nonce and sign again
insufficient_balanceInsufficient balanceFund the account or reduce concurrent payments
onchain_errorOn-chain RPC / multicall failureRetry the request
payment processingDuplicate request within cache windowAvoid reusing the same signature within cache period