> ## Documentation Index
> Fetch the complete documentation index at: https://docs.redmind.global/llms.txt
> Use this file to discover all available pages before exploring further.

# Connect an exchange (OKX)

> How to create an API key on OKX and connect it to RedMind. The process is similar for the other supported exchanges.

This guide shows the 15 steps of the RedMind tutorial "Connect an exchange (OKX)". Each step has a screenshot, the action and the details. Select a screenshot to zoom.

> [!NOTE]
>
> The RedMind Terminal and most exchange screens are in Portuguese. This guide gives each label as it shows on the screen, with the translation in parentheses.

**1. In RedMind, open Contas e acessos (Accounts and access) and choose OKX**

In Contas e acessos (Accounts and access), click **Conectar exchange** (Connect exchange) and choose OKX.

![In RedMind, open Contas e acessos (Accounts and access) and choose OKX](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/01-na-redmind-abra-contas-e-acessos-e-escolha-okx.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=f764f5dc11fbb0c2f750a5f4acb145e4)

Log in to the RedMind Terminal. Click your name in the bottom-left corner and choose **Contas e acessos** (Accounts and access).

Click **Conectar exchange** (Connect exchange) in the top-right corner. In the **Conectar exchange** window, choose **OKX**.

Keep this window open: you will come back to it in Step 14.

**2. On the OKX website, go to Institucional → APIs (Institutional → APIs)**

On the OKX website, hover over Institucional (Institutional) and click **APIs**.

![On the OKX website, go to Institucional → APIs (Institutional → APIs)](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/02-no-site-da-okx-acesse-institucional-apis.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=c31a5c1b9252ae02815c1e9a78be85b8)

Open **okx.com** and log in. In the top menu, hover over **Institucional** (Institutional) and click **APIs**.

**3. Click Crie sua chave de API (Create your API key)**

On the OKX API page, click **Crie sua chave de API** (Create your API key).

![Click Crie sua chave de API (Create your API key)](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/03-clique-em-crie-sua-chave-de-api.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=d40098f1896aba8d68dd3b9fd9c6301e)

You land on the **API da OKX** (OKX API) page. Click the **Crie sua chave de API** (Create your API key) button.

**4. Click Criar chave de API (Create API key)**

Click the green **+ Criar chave de API** (Create API key) button.

![Click Criar chave de API (Create API key)](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/04-clique-em-criar-chave-de-api.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=2c5576b173cbaa5706676d3d79010981)

If you don't have any keys yet, you see the message *Nenhuma chave de API ainda* (No API keys yet). Click the green **+ Criar chave de API** (+ Create API key) button.

> [!NOTE]
>
> **Limit:** The main account and each subaccount can have up to 50 active keys.

**5. Name the key and choose Negociação de API (API trading)**

Type a name for the key and keep **Negociação de API** (API trading) selected under Uso (Usage).

![Name the key and choose Negociação de API (API trading)](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/05-preencha-o-nome-e-escolha-negociacao-de-api.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=6cef6a4c060167d450032f0bd6c80129)

Enter an easy-to-remember name in **Nome da chave de API** (API key name). We suggest `api-para-redmind`.

Under **Uso** (Purpose), leave **Negociação de API** (API trading) selected. Don't use "Vincular apps de terceiros" (Link third-party apps).

**6. Add all available cryptos**

In the Cripto (Crypto) section, click **+ Adicionar** (Add), then **Selecionar tudo** (Select all).

![Add all available cryptos](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/06-adicione-todas-as-criptos-disponiveis.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=5e203473e7589e2b43ca92c34bbbdac9)

OKX requires you to select at least **1 market** and **1 crypto**. In the Cripto (Crypto) section, click **+ Adicionar** (+ Add) to open the list.

In the dialog that opens, click **Selecionar tudo** (Select all) in the top-right corner. This unlocks all **329 cryptos** available for trading on OKX.

This way, the RedMind Autopilot can trade any pair without you having to reconfigure the API later.

**7. Confirm the selection**

Scroll to the bottom of the window and click the green **Confirmar** (Confirm) button.

![Confirm the selection](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/07-confirme-a-selecao.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=c342280870fcbec736ca42aac591e266)

Scroll to the bottom of the dialog and click the green **Confirmar** (Confirm) button.

**8. Set a secure passphrase**

In the Segurança (Security) section, fill in the Frase secreta (Passphrase) field with 8 to 32 characters and store it safely.

![Set a secure passphrase](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/08-defina-uma-frase-secreta-segura.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=7cabffb1f3bc7d2ffacc093f86b0a6d9)

Scroll to the **Segurança** (Security) section. Fill in the **Frase secreta** (Passphrase) field. It must meet these requirements:

✓ 8 to 32 characters · ✓ Lowercase letter · ✓ Uppercase letter · ✓ Number · ✓ Special character (! @ # \$ %).

> [!WARNING]
>
> **Warning:** Store this passphrase somewhere safe: you'll need it to connect to RedMind. It's different from your OKX account password.

**9. UNCHECK the Sacar (Withdraw) permission**

Under Permissões (Permissions), keep Ler, Earn and Negociar checked and uncheck Sacar and Transferir. Never grant Sacar (Withdraw).

![UNCHECK the Sacar (Withdraw) permission](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/09-desmarque-a-permissao-sacar.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=ac32eea00d163c0edcd0db1a7b59e85a)

Go back to the **Permissões** (Permissions) section at the top. You'll see: Ler (Read), Sacar (Withdraw), Earn, Transferir (Transfer), and Negociar (Trade).

To trade with RedMind, keep **Ler** (Read), **Earn**, and **Negociar** (Trade) checked. **UNCHECK Sacar** (Withdraw) and **Transferir** (Transfer).

> [!WARNING]
>
> **Golden rule: never grant Withdraw permission:** RedMind NEVER needs permission to withdraw your funds. If any platform asks for this permission, be suspicious. Keeping Withdraw unchecked guarantees that no one can take your money out of the exchange.

**10. Submit the key for creation**

Click the black **Enviar tudo** (Submit all) button.

![Submit the key for creation](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/10-envie-a-chave-para-criacao.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=596a3c792c1474615a7341dab35d118d)

Once the name is filled in, the purpose is set to "Negociação de API" (API trading), the cryptos are added, the permissions are correct (no Withdraw), and the passphrase is saved, the draft shows as valid in the left panel.

Click the black **Enviar tudo** (Submit all) button.

**11. Confirm that the key was created**

In the Revise sua chave de API (Review your API key) window, click **OK**.

![Confirm that the key was created](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/11-confirme-a-criacao-da-chave.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=6038b64f225ed1885a986c681793295e)

OKX opens the **Revise sua chave de API** (Review your API key) dialog, which shows *"1 chave de API criada"* (1 API key created) with the green **Criada** (Created) status. Click **OK**.

**12. Open the new key's details**

In the Ações (Actions) column, click the magnifier icon **Ver detalhes** (See details) of your key.

![Open the new key's details](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/12-acesse-os-detalhes-da-chave-criada.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=9bb1f5a9cc83767f9a3e8e407d667a65)

Your `api-para-redmind` key now appears in the **API e conexões** (API and connections) list with the permissions *Ler / Earn / Negociar* (Read / Earn / Trade).

In the **Ações** (Actions) column, click the magnifying glass icon (**Ver detalhes**, View details) to open the credentials.

**13. Copy the Chave de API (API key) and the Chave secreta (Secret key)**

Click **Copiar credenciais** (Copy credentials) and save everything: the Chave secreta (Secret key) is shown only once.

![Copy the Chave de API (API key) and the Chave secreta (Secret key)](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/13-copie-a-chave-de-api-e-a-chave-secreta.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=82dc2557e7803ed60a03d8e35642337f)

The dialog shows the **Credenciais da API** (API credentials). Copy both values:

**Chave de API** (API key), for example `b17cb9f1-4274-44f7-9ebf-1cce26941bce`

**Chave secreta** (Secret key): a long code in uppercase letters

Use the **Copiar credenciais** (Copy credentials) button or copy each value individually.

> [!WARNING]
>
> **Last chance:** The full Secret key appears only on this screen. If you close it without copying it, you'll have to generate a new key. Store the credentials and the passphrase somewhere safe (a password manager).

**14. Paste the credentials into RedMind**

Paste Chave API (API key), Segredo API (API secret) and Passphrase into the RedMind window and click **Conectar e verificar** (Connect and verify).

![Paste the credentials into RedMind](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/14-cole-as-credenciais-na-redmind.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=92b0814ecd47d3d4bd5566915c78931a)

Go back to RedMind, to the OKX window that you opened in Step 1, and paste the three values:

**Chave API** (API key): the Chave de API (API key) that you copied from OKX

**Segredo API** (API secret): the Chave secreta (Secret key)

**Passphrase**: the passphrase that you created in Step 8

Click **Conectar e verificar** (Connect and verify).

The credentials are used only to create the connection. They are not saved in your browser.

**15. OKX connected successfully**

Check the Conectada (Connected) badge and the USDT balance. Click **Sincronizar** (Sync) to refresh the balance.

![OKX connected successfully](https://mintcdn.com/red-mind/5_H-MtwoZ7t_m7Up/images/02-conectar-exchange/15-okx-conectada-com-sucesso.webp?fit=max\&auto=format\&n=5_H-MtwoZ7t_m7Up\&q=85\&s=775a23c3f53f3acb7b23995bb1d9cef6)

Within seconds, the badge changes from **Aguardando** (Waiting) to **Conectada** (Connected), and the message *Conexão verificada com a exchange* (Exchange connection verified) appears. You see the **available USDT balance** and the date of the **last sync**.

Use **Sincronizar** (Sync) to update the balance, **Atualizar credenciais** (Update credentials) to replace the keys, or **Desconectar** (Disconnect) to remove the connection. To open this window again, go to **Contas e acessos** (Accounts and access) and click **Gerenciar conexão** (Manage connection).

Your exchange is now integrated. Next step: *create your first portfolio*.

> [!NOTE]
>
> **Other exchanges:** The process for Binance, Kraken, Bitpanda, and Mercado Bitcoin is similar. Click **Conectar exchange** (Connect exchange), choose the exchange, and paste the keys. Only the fields change: only OKX asks for a **Passphrase**, and the others ask only for the **Chave API** (API key) and the **Segredo API** (API secret). Always uncheck the **Sacar** (Withdraw) permission.

## Next steps

> [card] [Create your first portfolio](https://docs.redmind.global/guides/first-portfolio.md)
>
> Describe the portfolio that you want and let RedMind AI build it.

> [card] [Common questions](https://docs.redmind.global/help/common-questions.md)
>
> Find short answers about accounts, exchanges and portfolios.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.