Getting API Keys for OKX
Last updated
Important: when creating a key, the system will send a confirmation code to your phone and email.
Log in to your OKX account
Go to profile menu → "API" section
Click "Create API Key"
Fill in the following fields:
Name: enter a meaningful name (for example, "MoonTrader")
Purpose: Trade API
Permissions: Read and Trade
Passphrase: create a unique password for the key
When creating API keys, it is recommended to specify a list of allowed IP addresses. Only devices with the specified IPs will be able to use the key — this protects against unauthorized access, even if an attacker obtains your keys.
Which IPs to specify:
the public IP address of the server running the MoonTrader core
the public IP address of the server with Watchdog monitoring system (if used)
Configuration:
In the "IP whitelist" field, add the static IP of your server
If using Watchdog on a separate server — also add its IP
Confirm creation with codes from SMS and email
Save the API Key, Secret, and Passphrase — they are displayed only once
Complete all key creation steps described above
In the "Account" field, select the required subaccount instead of the main account
Configure the key parameters similarly to the main account
Last updated