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

# BIT and OKX

> BIT creates the OKX sub-account and its two API keys in one request; you enter the keys in Blockhouse and set up the sub-account.

Once BIT has created the keys, check each OKX setting below before the strategy starts, even if BIT carried some over from your main account.

**1. Apply for your OKX sub-account and keys**

In Blockhouse, on the **OKX** tab of the Credentials step, choose **Copy** → **Comma** on the **Read-only API IPs**, and again later on the **Trading API IPs**.

In the BIT Prime Brokerage portal, open **Accounts** → **Open Account**. On the **CEFI** tab, choose **Application** next to OKX, then set:

* **Custody:** **OKX with no external Custody**
* **Account's Api:** **Authorize BIT to create your API**

Choose **Add** twice, once for each key, and fill them in:

| | Read-only key | Trading key |
| - | - | - |
| **API Permissions** | **Read-only** | **Trading** |
| **Account Notice** | **Default authorized email** | **Default authorized email** |
| **Remarks** | A label, such as `Blockhouse read-only` | A label, such as `Blockhouse trading` |
| **Binding IP address** | The **Read-only API IPs** | The **Trading API IPs** |

**Account Notice** is where BIT sends the new key, and **Binding IP address** takes up to 10 addresses, comma-separated. Choose **Confirm** and complete the verification.

> [!NOTE]
>
> The other custody options, such as Copper or Oasis, are only needed if you're taking out a loan through BIT. If you are, ask BIT which one to choose, and make sure every sub-account you apply for is in the same [risk control unit (RCU)](https://docs.blockhouse.app/reference/glossary.md#risk-control-unit-rcu): confirm both with your BIT contact.

<video autoPlay src="https://mintcdn.com/blockhouse/lG-XTofc-2encmxB/images/bit-request-with-keys.mp4?fit=max&auto=format&n=lG-XTofc-2encmxB&q=85&s=64586439e7cd314dea2dde139af28501" aria-label="Application next to OKX, with no external custody and Authorize BIT to create your API, then two keys, Trading and Read-only, each with Default authorized email, a label and the IPs" />

**2. Enter the keys in Blockhouse**

BIT usually creates the keys within a day. When it sends them to your authorized email, copy each key's API key, secret and passphrase into the matching fields on the **OKX** tab in Blockhouse, and tick **IPs are whitelisted for read-only API** and **IPs are whitelisted for trading API**.

**3. Switch to Multi-currency margin**

Log in to the sub-account on okx.com and open a perpetual's trading page, such as BTCUSDT. Open **Settings**, the hexagon icon in the bar on the right. **Account mode** should read **Multi-currency margin mode**.

If it doesn't, open **Account mode**, scroll to **Advanced mode**, choose **Multi-currency** and **Switch**. When OKX asks you to **Set margin collateral**, choose **All crypto** and **Confirm**. Complete the knowledge test if OKX asks for one.

<video autoPlay src="https://mintcdn.com/blockhouse/lG-XTofc-2encmxB/images/okx-1-multi-currency-margin.mp4?fit=max&auto=format&n=lG-XTofc-2encmxB&q=85&s=cedab6a491ab7a760ff0436e9c85f2fa" aria-label="Settings on the OKX trading page, then Account mode, Advanced mode, Multi-currency and Switch, then All crypto as margin collateral" />

**4. Turn on Auto-borrow**

In the same **Settings** panel, under **Preferences**, turn **Auto-borrow** on.

<video autoPlay src="https://mintcdn.com/blockhouse/lG-XTofc-2encmxB/images/okx-2-auto-borrow.mp4?fit=max&auto=format&n=lG-XTofc-2encmxB&q=85&s=44a952a7303dcea1c9d6906c373b3223" aria-label="Turning Auto-borrow on under Preferences in OKX Settings" />

**5. Set one-way mode**

In the same panel, **Position mode** should read **One-way mode**. If it doesn't, open it, choose **One-way mode** and **OK**.

<video autoPlay src="https://mintcdn.com/blockhouse/lG-XTofc-2encmxB/images/okx-3-one-way.mp4?fit=max&auto=format&n=lG-XTofc-2encmxB&q=85&s=c1e429e0da098f32798491a9f182de9b" aria-label="Opening Position mode in OKX Settings, with One-way mode selected, then OK" />

**6. Finish in Blockhouse**

In the BIT Prime Brokerage portal, open **Accounts** → **My Accounts**. In the **Sub-account List**, copy the **Account Number** for OKX, for example `1234567_okx_000001`. In Blockhouse, on the **OKX** tab, enter it in **BIT account number for OKX**.

Check that every key field on the tab is filled in and both IP boxes are ticked. Set up any other exchange from the [BIT guide](https://docs.blockhouse.app/open-an-account/connect-your-exchanges/prime-brokers/bit), then [submit the Credentials step](https://docs.blockhouse.app/open-an-account/connect-your-exchanges).

<video autoPlay src="https://mintcdn.com/blockhouse/lG-XTofc-2encmxB/images/bit-2-account-list.mp4?fit=max&auto=format&n=lG-XTofc-2encmxB&q=85&s=8fd7ba48653d4f25ab2e073708560198" aria-label="Accounts, then My Accounts, showing the Sub-account List with each account's Account Number and Exchange" />

> **OKX sources**
>
> Checked against OKX's help centre and API docs on 9 October 2026. OKX renames menus from time to time; if a label differs, use the nearest match.
>
> * [What is a sub-account](https://www.okx.com/en-us/help/what-is-sub-account)
> * [Sub-accounts, account mode and API connections FAQ](https://www.okx.com/en-us/help/subaccounts-account-mode-and-api-connections-faq)
> * [Trading settings FAQ](https://www.okx.com/en-us/help/trading-settings-faq)
> * [Comparing Futures mode and Multi-currency margin mode](https://www.okx.com/en-us/help/comparing-futures-mode-and-multi-currency-margin-mode)
> * [Borrowing and repaying in Multi-currency and Portfolio margin](https://www.okx.com/en-us/help/borrowing-and-repaying-in-multi-currency-and-portfolio-margin-account-modes)
> * [API FAQ](https://www.okx.com/en-us/help/api-faq)
> * [OKX API v5 docs](https://www.okx.com/docs-v5/en/)


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