> For the complete documentation index, see [llms.txt](https://docs.cryptohero.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cryptohero.ai/connecting-exchanges/okex.md).

# OKX

{% hint style="info" %}
Please note that your funds in OKX must be in the Trading account. You can transfer the funds to your Trading account in your OKX >> Assets >> Transfer page.
{% endhint %}

### 1. API Management

Login to your OKX account and click on your Profile icon. You should see a dropdown menu shown in the image below. Click API.

<figure><img src="/files/7QTH6xDKiT2iGD0DvJYU" alt=""><figcaption></figcaption></figure>

### 2. Create API

Click the \[Create API key] button. You will see the following page:

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

Give this API a name. You can name it "CryptoHero".&#x20;

Check the "API trading" option

Check the permissions **Read** AND **Trade**. Do **NOT** check the Withdraw permission. CryptoHero will **never ever** need to withdraw your funds.

Enter a unique **Passphrase (note this passphrase as you will need to copy it into CryptoHero)**. Be sure to write this down as you will need to enter it in CryptoHero. A passphrase is needed to create the API. This is not your account password. Each passphrase should be unique to each API.&#x20;

Click the \[Submit All] button.

A verification window will appear. Please fulfil the verification checks.

### 3. View API

Once the API is created successfully, you will see this pop up window in OKX.

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

Click the "Show info" link.

You will see the API Key and Secret Key values.&#x20;

### 4. Add API to CryptoHero

Now, login to your CryptoHero account and go to Settings >> Exchange API. Select OKX and enter the following values into the respective fields in CryptoHero.

* API Key
* Secret Key
* Passphrase

Click Add Exchange. If the keys and passphrase are correct, you will see OKX listed in the "Connected Exchanges" section.
