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

# FalconX and OKX

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

Once FalconX has created the keys, check each OKX setting below before the strategy starts.

**1. Request your OKX sub-account and keys**

In Blockhouse, on the **OKX** tab of the Credentials step, copy the **Read-only API IPs** and the **Trading API IPs**.

Then ask your FalconX customer success contact to open a sub-account on OKX for this strategy, with two API keys: a read-only key whitelisted to the **Read-only API IPs**, and a trading key whitelisted to the **Trading API IPs**.

**2. Enter the keys in Blockhouse**

Once FalconX has sent the keys, 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**

FalconX needs no account ID per exchange, so there's nothing more to enter on the **OKX** tab.

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

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