The following is a general tutorial for creating an API. However, we recommend using sub-account APIs for trading whenever possible to reduce the risk to the main account. Sub-accounts are independent accounts that contribute to enhanced security and facilitate the assessment and optimization of different trading strategies' performance.There will be a separate page description for the sub-account API.
Sub-Accounts Page
(1)Go to OKX official website and login
(2)Click on your profile picture, then find [API Keys] and click on it.

(1)Click [Create V5 API key] on the API management page

(2)On the following page,
1. [Purpose] Select [API Trading]
2. [API Name] Fill in the name you need
3. [Passphrase] Fill in the characters and letters that comply with the OKX system regulations;
4. [IP address allowlist (optional)] Fill in:
54.64.46.83,52.198.134.2,18.179.130.89,52.68.229.228
Please copy and paste the IP directly.
5. Permissions select [Read], [Trade]。
6.Press [confirm].

(3) Verify email, mobile phone, and identity verification application according to system requirements.
When the following picture appears, please take a screenshot and save it, and click [Copy API Information] to paste the important information into other documents and save it.
