> For the complete documentation index, see [llms.txt](https://help.utrading.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.utrading.io/en/exchange/create-api/okx-api-import-guide.md).

# OKX - API Import Guide

Please follow the instructions in the pictures below:

{% embed url="<https://youtube.com/shorts/xZzjhS3XuKc?feature=share>" %}

**Step 1: Generate Your API key**

**1.1** Sign into your OKx account with app and click on **\[**<mark style="color:blue;">**User Icon**</mark>**]** in the top left corner on **\[**<mark style="color:blue;">**OKX**</mark>**]** page. As follows:

<figure><img src="/files/zIIsoK6mr0n0ArgP13sA" alt=""><figcaption></figcaption></figure>

**1.2** After entering this page, slide to the bottom, Click on the **\[**<mark style="color:blue;">**API**</mark>**]**. As follows:

<figure><img src="/files/yBhwNr6LkBWY8Vq8OcRb" alt="" width="472"><figcaption></figcaption></figure>

**1.3** Click on **\[**<mark style="color:blue;">**Create API Key**</mark>**]**. As follows:

<figure><img src="/files/mh2SVqjP19xM7AXwnvSs" alt="" width="477"><figcaption></figcaption></figure>

**Step 2: Configure the API permissions.**&#x20;

<figure><img src="/files/I4ZTm3c3TkS1Cmur9l8F" alt=""><figcaption></figcaption></figure>

**IP group of the uTrading server:** <mark style="color:red;">13.213.132.125,13.251.83.60,18.139.102.94,3.1.7.213,46.137.215.117,52.220.111.151,52.220.117.151,52.220.31.227,52.77.45.93,54.169.15.234,13.215.122.202,18.136.175.80,18.141.82.149,18.142.40.60,18.142.65.141,3.0.128.217,3.0.26.171,52.221.111.151,52.221.18.185,54.179.229.52</mark>

Please copy and paste all the above IPs at once.

2.1 Give a name to your API Key, and set a Passphrase. Make sure to remember that Passphrase, as you will need to use it again in a few moments.

2.2 uTrading needs the \[Read] and \[Trade] function to be able to trading from OKEx.

2.3 Click on Confirm, then click on \[View] to see your API Key and API Secret.

**Step 3: Linking Your API Key with uTrading.**

3.1 Open the uTrading APP, go to the **\[**<mark style="color:blue;">**Home**</mark>**]** page, and then click **\[**<mark style="color:blue;">**API Binding**</mark>**]**. As follows:

<figure><img src="/files/UvUVWhyG1JWTSm4ikCQ8" alt=""><figcaption></figcaption></figure>

3.2 Enter the **\[**<mark style="color:blue;">**API Binding**</mark>**]** page, and then click **\[**<mark style="color:blue;">**OKX**</mark>**]**. As follow:

<figure><img src="/files/dSsf9Ig5lk7iSUmY5sRr" alt=""><figcaption></figcaption></figure>

3.3 Open the API import page, paste the **\[**<mark style="color:blue;">**API Key**</mark>**]** and **\[**<mark style="color:blue;">**Secret Key**</mark>**]** from the OKX into uTrading, click **\[**<mark style="color:blue;">**Import**</mark>**]** after filled. As follow:

<figure><img src="/files/cnL0WcJlYjhmXOi7t7M5" alt=""><figcaption></figcaption></figure>

Success! If you have successfully completed these steps, the status will show as "API is running normally".
