Where to Find OKX API Error Codes? KYC and Permissions Documentation

 / 
OKX
 / 
2

On OKX, API error codes, KYC permission requirements, signing rules, etc. are all centralized in the official API documentation. There is no separate page dedicated solely to querying error codes; error codes are explained alongside specific endpoints and scenarios. Meanwhile, KYC status and API permissions are also viewed on the same "API Management" page.

Step 1: Check API Error Codes – Search the Official API Docs

Whenever an interface call returns an error code, go directly to OKX's official API documentation to look up the corresponding meaning.

  • What to do: Open the error codes section of the OKX official API documentation.

  • How to do it: Go to the OKX website → top menu [API] → enter the API Documentation Center, and find the "Error Codes" section in the navigation bar. The documentation lists common error codes by API type (REST, WebSocket, Web3, etc.) and business module.

  • Common error code examples:

    • 50101: API Key and environment mismatch (live key used on demo platform, or demo key used on live platform).

    • 50119: API Key does not exist or regional domain mismatch (EEA users must use eea.okx.com domain).

    • 50120: API Key lacks trading permission, or account has not completed derivatives KYC verification.

    • 50011: Rate limit triggered.

    • 50103-50113: Request header signature errors (missing or invalid OK-ACCESS-KEY, OK-ACCESS-SIGN, etc.).

  • Completion standard: Find the error code you received and read the corresponding solution.

Step 2: Check if KYC Affects API – Go to "API Management" Page to View Permissions

KYC status is not looked up in the error code documentation; it is tied to the permission settings of the API key.

  • What to do: On the OKX account's "API Management" page, view the current API Key's permissions and confirm whether the account has completed KYC for the relevant product.

  • How to do it:

    1. Check API permissions: Log in to OKX → click the avatar in the upper right corner → API → select the API Key to review, and check if "Read", "Trade", and "Withdraw" permissions are enabled.

    2. Check KYC status: API permissions themselves don't show the KYC level, but if you get a 50120 error when trying to call futures or derivatives endpoints, it means the account has not completed derivatives KYC verification, or derivatives trading is restricted in that region.

    3. API agreement explicitly requires: Before using API services, users must complete KYC and AML verification procedures at the level required for API access.

  • Completion standard: Confirm that the API Key has the required permissions checked, and the account's KYC level meets the compliance requirements for the target trading product.

Common failure reasons: Many people think that just creating an API Key allows direct use, overlooking that incomplete KYC or permissions not being enabled are the most common reasons for call failures. Interfaces related to derivatives trading usually have stricter KYC requirements than spot trading.

Verification after operation: After confirming the permission status on the API Management page, send a read-only request (e.g., query account balance) using the sample code provided in the official documentation (such as Python SDK). If data is returned normally, it means both permissions and KYC are fine. If an error code is returned, go to the documentation as in Step 1 to find its specific meaning.