> For the complete documentation index, see [llms.txt](https://hash7-gitbook.gitbook.io/en/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://hash7-gitbook.gitbook.io/en/user-guide/1.3-api-binding-tutorial/1.3.5-okx-api-binding-tutorial.md).

# 1.3.5 OKX API Binding Tutorial

{% embed url="<https://www.youtube.com/watch?v=-hdvRaYZZyQ>" %}

**For security reasons, the API secret will be displayed only 1 time. After closing the window, the API will not be available. Make sure to save the key in a safe place.**

If you are already a registered user, then log in to your existing account on the exchange. If you don't have an account, you'll need to register first and pass KYC.&#x20;

Open the OKX app and tap on the menu icon in the upper left corner.&#x20;

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FVG3u680FaO6zqW1YGdmt%2Fokx%201%20en.png?alt=media&amp;token=cc532da4-27bf-4b24-a5a8-e87b5efabb8f" alt="" width="375"><figcaption></figcaption></figure>

By scrolling a little down select "API".

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2Fg6SyrFJTuKhbmGinxHLC%2Fokx%202%20en.png?alt=media&amp;token=8cc5b7d1-2904-44e5-bd4d-53516878e680" alt="" width="375"><figcaption></figcaption></figure>

Press on the "Create API key" button.&#x20;

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FzHjuvqRGYprNLpAVLHft%2Fokx%203%20en.png?alt=media&amp;token=6806c961-de6f-4716-a2c2-55464529cfe0" alt="" width="375"><figcaption></figcaption></figure>

In the "API name" field enter the name of your API key.&#x20;

In the "Purpose" field choose "API trading".

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FISnBQIsn1Uuwuhbvf3Ll%2Fokx%204%20en.png?alt=media&amp;token=82e591d9-9cd9-4920-8ad6-1f59ab007c46" alt="" width="375"><figcaption></figcaption></figure>

Then open the HASH7 app. It the upper left corner press "Exchange".&#x20;

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FFe7zdFnDMzJNXmesU7CC%2F6.png?alt=media&amp;token=0c83c77e-f5cb-4d7f-987b-da0cb09eec24" alt="" width="375"><figcaption></figcaption></figure>

Select the OKX exchange and copy the IP-addresses.&#x20;

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FrITy1bU2SmU3FjFjV6ig%2F3%D1%8E1.png?alt=media&amp;token=7a7fdcd3-a46e-433f-b3b8-7b684e68152f" alt="" width="375"><figcaption></figcaption></figure>

Paste the copied IP-addresses in the "IP address allowist" field.&#x20;

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FkHyiir4jYu5OwLJk0dy1%2Fokx%206%20en.png?alt=media&amp;token=b5513571-a23c-4a57-b0e2-833491b84a6c" alt="" width="375"><figcaption></figcaption></figure>

In the "Permissions" section select "Trade".&#x20;

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2Ffy0yLCrhIN6wxoirpDIJ%2Fokx%207%20en.png?alt=media&amp;token=b374b4a5-5bdc-49a6-b5ee-d44aaa16d38f" alt="" width="375"><figcaption></figcaption></figure>

In the next section “Passphrase” specify your secret phrase and save it to a safe place.

*This section is required to view information and access the API. Keep it safe and create a new API key in case the passphrase is lost. The passphrase must include uppercase and lowercase letters and be 8-32 characters long. Spaces and special characters are not supported.*

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FwqL23u6hleKS7QIVeH4A%2Fokx%208%20en.png?alt=media&amp;token=a7cf20a4-2951-4409-ac68-1639b2fdd4a7" alt="" width="375"><figcaption></figcaption></figure>

Press on "Submit all".&#x20;

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FmmYmyLcgxC6y4P87aHkJ%2Fokx%208.1%20en.png?alt=media&amp;token=1cad1085-d6df-4f34-9ee8-009d97eda365" alt="" width="375"><figcaption></figcaption></figure>

To save the changes press on "Security verification".&#x20;

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FieHuYQ1q19AnOOKSsU4c%2Fokx%209%20en.png?alt=media&amp;token=d9d2db22-5868-450b-8711-1c8c0440e00d" alt="" width="375"><figcaption></figcaption></figure>

In the pop-up window press on "Show info".&#x20;

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2F85nmhZx8DrHfNMpcsuYa%2Fokx%2010%20en.png?alt=media&amp;token=5f74fb9f-2887-40f4-b5ec-fc5441bcc4e6" alt="" width="375"><figcaption></figcaption></figure>

Next copy the API key and the secret key to a safe place.

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FkuBgy9icMvcUitm1Km7N%2Fokx%2011%20en.png?alt=media&amp;token=a4e7874b-3846-49c3-b7c0-fc9442d40811" alt="" width="375"><figcaption></figcaption></figure>

Paste the copied keys into the corresponding fields in the Hash7 app and enter your secret phrase. To complete the process, click on the "Done" button.

<figure><img src="https://4045877156-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F5Z7CkeiyUfQ7J5ez8s0L%2Fuploads%2FC58tLU2LTIO9omtpWpu1%2F4.png?alt=media&amp;token=ffb40401-fd68-405c-acba-028acf4815b5" alt="" width="375"><figcaption></figcaption></figure>
