How to Create an OKX API Key for Your Bot
This guide walks you through creating an OKX API key for automated trading and securing it for bot access.
OKX API authentication requires the key, secret, and passphrase to match exactly. Save the OKX API passphrase with the same care as the secret, because Gunbot needs the full credential set before it can place orders.
Info
An API (Application Programming Interface) key is a unique code that allows your trading bot to access your exchange account and perform actions like placing orders or reading account balances. Treat your API keys like passwords and keep them secure.
Step-by-Step Guide to Create an OKX API Key
-
Log into OKX: Access your OKX account and confirm your account meets trading requirements.
-
Navigate to API Management:
- Open your account profile.
- Select the API section.
- Click 'Create V5 API Key'.
-
Configure Key Details:
- Create a descriptive key name.
- Set a secure passphrase.
- Store your credentials safely.
-
Configure API Key Permissions: Enable only the permissions your bot needs:
- Trading capabilities.
- Account information access.
- Order management.
-
Secure Your API Key:
- Enable IP whitelisting.
- Add your bot's IP address.
- Set trading limits if available.
- Ensure withdrawal permissions are disabled.
-
Finalize API Key Creation:
- Review all permissions.
- Verify security settings.
- Complete 2FA (Two-Factor Authentication) verification.
- Store your API key, secret key, and passphrase securely.

Access your API settings directly through OKX API Management.
A properly configured API key supports reliable automated trading. Review API settings regularly, and never share your API credentials.
Ready to Start Automated Trading on OKX?
Explore our OKX Trading Bot features for automated strategies.