# Trading Hub Strategy

Any exchange allows us to have one **Main Account** and multiple **Sub-Accounts** (*the purpose is to avoid having to register too many accounts on the same exchange, helping you manage everything while still ensuring separation*)

<figure><img src="https://embed-ssl.wistia.com/deliveries/c3c3fab699130f0544b73e1c2b5f8407.webp?image_crop_resized=1280x720" alt=""><figcaption><p>For example, the Binance exchange</p></figcaption></figure>

To use XAPY's **Trading Hub All-In-One** feature, you’ll need to **create a sub-account** and connect it to the XAPY platform.

***

### We need to go through the following steps

***

{% tabs %}
{% tab title="Step 1: Create Sub-Account" %}
Below is the guide for operating on the **OKX exchange**. For other exchanges, you can follow similar steps, as they are almost the same

<details>

<summary>Create Sub-Account on OKX</summary>

**Step 1:** **Sub-account Management** Click on the account avatar icon on the main screen and select the sub-account feature.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdb1HR9tOmrZcZyeGuZ7PbPac82SDnpviDc7tkYnPx0Wn1btDfbfgT24nrpL6TLJI52kpjucqFIkXkwfbYfCx8kXtcoOfX73G48wwUCMFYfRrEb2Xhic7OOeG_oP6wAhQXrlqXy5EgjTLa8qqtxPPg?key=PabicGv_40Ra-AurFJ_Bhg" alt=""><figcaption><p>Sub-account</p></figcaption></figure>

**Step 2:** **Create Sub-account:** In the sub-account section, select "Create Sub-account" to create a new sub-account

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdedOC9Xe_ZUVLV3EUSeaTwbvd_QBpPn5-MNZlDj-m6kJ6vJDIqQi8EH86deKWAd6f-aJrt3xN-VGOJivbCASMcNVFhhtq2lw8i25l366i21P5cuyAxvPBLH4C36B9YYKxHUGoMQ2_nQ_ktBdZztVc?key=PabicGv_40Ra-AurFJ_Bhg" alt=""><figcaption></figcaption></figure>

**Step 3**: Users need to follow the instructions in the attached images to input and select the information.

<figure><img src="/files/0czXuLUSJYAmTGuwg1yU" alt=""><figcaption><p>After selecting Standard Sub-Account (1), you need to proceed to step (2), which is editing the parameters.</p></figcaption></figure>

**Step 4:** Select the parameters as shown in the image below (you can skip the **Options** section).

<figure><img src="/files/0iaO1V3M8qE145U8rfiM" alt=""><figcaption><p>Select the parameters</p></figcaption></figure>

</details>

<details>

<summary>Create Sub-Account on Bybit</summary>

XAPY will provide direct guide links from the exchange below. Please review and follow them

<https://www.bybit.com/en/help-center/article/How-to-Get-Started-With-Standard-Subaccount>

</details>

<details>

<summary>Create Sub-Account on Binance</summary>

XAPY will provide direct guide links from the exchange below. Please review and follow them

<https://www.binance.com/en/support/faq/detail/360020632811>

</details>

<details>

<summary>Create Sub-Account on Bitget</summary>

XAPY will provide direct guide links from the exchange below. Please review and follow them

<https://www.bitget.com/support/articles/7974920237977>

</details>

<details>

<summary>Create Sub-Account on BingX</summary>

XAPY will provide direct guide links from the exchange below. Please review and follow them

<https://bingx.com/en/support/articles/20255260567065-BingXSubaccountFeatureIntroductionandFAQs/>

</details>

<details>

<summary>Create Sub-Account on Coinex</summary>

XAPY will provide direct guide links from the exchange below. Please review and follow them

<https://support.coinex.com/hc/en-us/articles/15029721047705-How-to-Use-and-Manage-Sub-Accounts>

</details>

<details>

<summary>Create Sub-Account on Gate</summary>

XAPY will provide direct guide links from the exchange below. Please review and follow them

<https://www.gate.io/help/guide/functional_guidelines/22421/how-to-create-sub-accounts>

</details>

<details>

<summary>Create Sub-Account on Huobi</summary>

XAPY will provide direct guide links from the exchange below. Please review and follow them

<https://www.htx.com/support/24947620043266>

</details>

{% hint style="info" %}
If you haven’t seen your exchange in this guide section, please contact us or use the Google Search with the keyword: "create sub-account + the name of the exchange you want to view the guide for."
{% endhint %}
{% endtab %}

{% tab title="Step 2: Transfer Funds" %}
You need to transfer funds from the main account to the sub-account to be able to trade

Below is the guide for operating on the OKX exchange. For other exchanges, you can follow similar steps, as they are almost the same.

Step 1: You select the fund transfer section

<figure><img src="/files/Szd0hYsM7qnw4X79YcoP" alt=""><figcaption></figcaption></figure>

Step 2: Select to transfer funds to the trading account of the Sub-Account.

<figure><img src="/files/shS0EplgWArq4Uu1GedE" alt=""><figcaption></figcaption></figure>

Step 3: Enter the amount and click transfer
{% endtab %}

{% tab title="Step 3: Connect API" %}
Obtain the API key, security code, and API password (if applicable) from the CEX exchange, and enter them into the XAPY API connection portal.

<details>

<summary>Get API - ( OKX Guide)</summary>

Go to the API Key management section: Create API Key

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe6zzpLHveROHy5HYt5xqo167M8GqejHrMGP4dPXSmxmojiVwnIzmBNgUhcFcZNvuztLCf3TbSwrbzTOTuhsXm7z4qabQXizuXQ_Jf57fViXOZpgS7MezLoEne8TT5sPcYcyeRQwoWarzjDBEjGSjc?key=PabicGv_40Ra-AurFJ_Bhg" alt=""><figcaption></figcaption></figure>

Select the parameters as shown in the image below

<figure><img src="/files/eVI71cvMgSctOtzhOMMc" alt=""><figcaption></figcaption></figure>

1 -> Name the API

2 -> Select that this API is for a sub-account

3 -> Add the list of XAPY server IP addresses ( *Please review the list of XAPY server addresses in the account information section* -> **View now**)

4 -> Grant permissions to the API (See also: Enhancing security when granting API permissions)

5 -> Enter a private password (your preferred password) for the API

</details>

<details>

<summary>Connect API to XAPY</summary>

</details>
{% endtab %}
{% endtabs %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.xapy.io/document-guide/account-setup/trading-hub-strategy.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
