> For the complete documentation index, see [llms.txt](https://docs.tread.fi/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tread.fi/tread.fi-institutional-api-docs/account-creation-and-api-key-connection/connecting-to-exchanges/okx.md).

# OKX

{% embed url="<https://youtu.be/hKvlD0sdoi4?si=0pYqDXf2lIOjKe5->" %}

### Create a sub-account from the Sub-accounts page.

<figure><img src="https://content.gitbook.com/content/QGcP9MNIBq6caHeVJrjq/blobs/EZUspip6lQzRk7pcjjfw/Screenshot%202024-08-05%20at%2012.07.07%E2%80%AFPM.png" alt=""><figcaption><p>Click the "Create sub-accounts" button</p></figcaption></figure>

&#x20;Name and configure the sub-account

<figure><img src="https://content.gitbook.com/content/QGcP9MNIBq6caHeVJrjq/blobs/EszB7F5htZskM3cOkEIx/Screenshot%202024-08-05%20at%2012.07.43%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

Create an API Key for this sub-account

<figure><img src="https://content.gitbook.com/content/QGcP9MNIBq6caHeVJrjq/blobs/HOM0ndMnz72eqpt5JZuT/Screenshot%202024-08-05%20at%2012.08.35%E2%80%AFPM.png" alt=""><figcaption><p>From the sub-accounts page, choose "Manage API" from the "Action" menu</p></figcaption></figure>

<figure><img src="https://content.gitbook.com/content/QGcP9MNIBq6caHeVJrjq/blobs/39rdHOqODXcZOxV2gPDZ/Screenshot%202024-08-05%20at%2012.08.49%E2%80%AFPM.png" alt=""><figcaption><p>Click the "Create API" button</p></figcaption></figure>

In the Create APIs page, choose the sub-account you just created, making sure the Purpose is set to "API trading" and it has `Read` and `Trade` permissions.  Add your TaaS server's IP address to the allowlist.

<figure><img src="https://content.gitbook.com/content/QGcP9MNIBq6caHeVJrjq/blobs/8zUAb293XAYaIdtshUpM/Screenshot%202024-08-05%20at%2012.21.37%E2%80%AFPM.png" alt=""><figcaption></figcaption></figure>

Use this API key in TaaS to [connect](/tread.fi-institutional-api-docs/account-creation-and-api-key-connection/connecting-to-exchanges.md) to OKX.

### Linking Your API Key to tread.fi&#x20;

<figure><img src="https://content.gitbook.com/content/QGcP9MNIBq6caHeVJrjq/blobs/Fod5kHgmJXxanuEu9ARs/Screenshot%202568-08-04%20at%2022.40.36.png" alt=""><figcaption></figcaption></figure>

* Open up tread's Key Management menu. From the app.tread.fi home page, it can be accessed by clicking on the wallet icon on the top right.
* Click Connect CEX Account

<figure><img src="https://content.gitbook.com/content/QGcP9MNIBq6caHeVJrjq/blobs/EOq6mHaky0XzmilHJLt3/Screenshot%202568-11-27%20at%2010.12.14.png" alt=""><figcaption></figcaption></figure>

* Select OKX from the Exchange dropdown
* Set a name for this key for your own reference.
* Copy and Paste the API Key and Secret from OKX into the respective boxes.
* Click submit.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXcxPKL5LuLWoy8DhaDHamKZHxvlg_XxfPWItdQAsszl7-i0PaGiYD1VCKxBeewjJBQUxbITppwpIrG5JuE6TM_I9P4BPOEM7eijX6gi6DPdUrhHYBW1QDER5NuRZEBfkap2GxjrOICcVywn-NCJS7Oe01XN?key=0Y_t4MkkxDXunkOK3-fvXw" alt=""><figcaption></figcaption></figure>

<br>
