# 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.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.cryptohero.ai/connecting-exchanges/okex.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
