---
id: document_item.connecting-to-the-htx-exchange
page_type: documentation_article
title: "Connecting to the HTX exchange"
description: "How to connect the HTX exchange to Moonbot: create API keys, activate the spot accounts, configure the terminal settings."
section: documentation
category: "Settings Button / “Settings → Login” Tab"
url: https://moonbot.pro/documentation/settings-login-tab/connecting-to-the-htx-exchange?format=md
locale: en
alternate_ru: https://moonbot.pro/ru/documentation/settings-login-tab/connecting-to-the-htx-exchange?format=md
alternate_zh: https://moonbot.pro/zh/documentation/settings-login-tab/connecting-to-the-htx-exchange?format=md
parent: https://moonbot.pro/documentation/settings-login-tab?format=md
previous: https://moonbot.pro/documentation/settings-login-tab/connecting-to-the-binance-exchange?format=md
next: https://moonbot.pro/documentation/settings-login-tab/connecting-to-the-bybit-exchange?format=md
status: published
updated_at: 2026-11-17T23:18:46+03:00
---

# Connecting to the HTX exchange

**Attention!**\
Currently, the HTX exchange is under sanctions, so we recommend temporarily refraining from new registrations on it.

Before using Moonbot as a terminal for HTX, we recommend that you register an account on the HTX exchange via our referral link: \
🔗 [https://www.htx.com/invite/en-us/1f?invite_code=joinmoonbot](https://www.htx.com/invite/en-us/1f?invite_code=joinmoonbot)

Moonbot, as a trading terminal for HTX, currently only supports trading on the spot market.

When using the Moonbot trading terminal for HTX on a dedicated server, it is best to select the "Japan" (Tokyo) location for the best ping.

The terminal is activated for HTX via the Moon Credits window (instructions are provided below) and requires 500 Moon Credits - both for activating the main HTX account and for activating each subsequent sub-account. Moon Credits are only available to users of the PRO version of Moonbot. Before activating HTX, you must have the PRO version of the Moonbot terminal activated for trading cryptocurrencies on any other exchange.

Iceberg order mode is not supported.

The **Pencil** **→** **Emulator** and the [BackTest](https://moonbot.pro/en/documentation/menu-button/backtest?format=md) functionality are not supported.

To enable an additional discount on fees in your HTX exchange account (see the image below), follow these steps:

1. Open an account on the HTX exchange;
2. Go to the **My Fee Rates** section;

![](https://moonbot.pro/storage/editor-images/01%20HTX%20API%20eng.jpg)

![(dark)](https://moonbot.pro/storage/editor-images/01%20HTX%20API%20eng.jpg)

1. In the **Select fee rate discount** block, choose the options:
   - **Extra 25% OFF: \
     Reduce Spot Fees by Deducting HTX.**
   - **Extra 5% OFF:\
     Reduce futures fees with HTX deduction.**\
     \* This will be useful when trading futures via the exchange’s web interface, as the Moonbot terminal cannot currently be connected to HTX Futures.

![](https://moonbot.pro/storage/editor-images/02%20HTX%20API%20eng.jpg)

![(dark)](https://moonbot.pro/storage/editor-images/02%20HTX%20API%20eng.jpg)

### Instructions on how to create an API key on HTX for Moonbot

Before creating API keys in your HTX exchange account, you must complete identity verification (KYC). Without completing KYC, API keys will not have permission to perform trading operations.

**To create an API keys:**

1. In your HTX exchange account, open the **API Management** section.

![](https://moonbot.pro/storage/editor-images/03%20HTX%20API%20eng.jpg)

![(dark)](https://moonbot.pro/storage/editor-images/03%20HTX%20API%20eng.jpg)

2. Please read the information from the HTX exchange and click the **Create API Key** button.

![](https://moonbot.pro/storage/editor-images/04%20HTX%20API%20eng.jpg)

![(dark)](https://moonbot.pro/storage/editor-images/04%20HTX%20API%20eng.jpg)

**Note**

You can use our robust API to access services, such as market data querying and automated trading. Read "[API Documentation](https://www.htx.com/en-us/opend/newApiPages/)" to learn more.

Each account can create **up to 20 API Keys**.

Do not disclose your API Keys to prevent asset losses. For security reasons, it is recommended to link API keys to specific IP addresses. **An API Key can be linked to a maximum of 20 IP addresses or IP segments**. You may input a single IP address or multiple addresses directly, and separate different addresses with a comma. For example: 192.168.1.1,192.168.1.2,192.168.0.0/24

An API key not linked with an IP address but has trading or withdrawal permissions will be automatically **deactivated after 90 days of inactivity**. If used regularly, the API key's validity will be **extended automatically for 90 days from the last usage**".

If API keys not linked to IP address whitelists have been activated in the Moonbot terminal, information regarding the number of days remaining until the API keys expire will be recorded in the log when the terminal is launched. **Seven days before** this expiry date, a warning highlighted in red will appear in the main terminal window, **in the HT tokens balance section: "API: N days"**, which indicates the number of days remaining before the API keys expire; a notification to this effect will also be sent via Telegram (initially no more than once every 6 hours; if fewer than 4 days remain, messages will be sent once an hour).

3. In the **Select API Key Type** window, choose the top option **System generated**.

![](https://moonbot.pro/storage/editor-images/05%20HTX%20API%20eng.jpg)

![(dark)](https://moonbot.pro/storage/editor-images/05%20HTX%20API%20eng.jpg)

4. In the next step, in the **Create API Key** window, in the **Notes\*** field enter any key name, for example **MOONBOT** — this is for your reference only.

![](https://moonbot.pro/storage/editor-images/06%20HTX%20API%20eng.jpg)

![(dark)](https://moonbot.pro/storage/editor-images/06%20HTX%20API%20eng.jpg)

5. Enable the **Trade** checkbox.
6. If necessary, bind the API key to an IP address or IP segment: in the corresponding field, enter one or more IP addresses separated by commas (no more than 20 IP addresses).
7. Click the **Create HMAC API** button, after which the **Risk Reminder** window will open.
8. In the **Risk Reminder** window, carefully read all items, check the required boxes, and click the **I understand** button.

![](https://moonbot.pro/storage/editor-images/07%20HTX%20API%20eng.jpg)

![(dark)](https://moonbot.pro/storage/editor-images/07%20HTX%20API%20eng.jpg)

9. In the **Security Verification** window (see image below), perform the following actions:
   - In the top field **E-mail Verification Code**, click the phrase **Get verification code**. \
     Receive the verification code via email and enter it in this field;
   - In the middle field **SMS code**, click the phrase **Get verification code**. \
     Receive the verification code via SMS and enter it in this field;
   - In the bottom field **GA code**, enter the code from the Google Authenticator app or its equivalent;
   - Click the **Confirm** button.

![](https://moonbot.pro/storage/editor-images/08%20HTX%20API%20eng.jpg)

![(dark)](https://moonbot.pro/storage/editor-images/08%20HTX%20API%20eng.jpg)

After that, the **Successfully Create** window will open with information about the created API key.

**⚠️ Attention!**

The API key will be shown only once and cannot be recovered if lost. Please store it properly.

To avoid loss of assets, do not disclose your **Access** **Key** or **Secret** **Key** to anyone.

If you forget your **Secret** **Key**, delete it and request the creation of a new key pair.

Copy the **Access** **Key** and **Secret** **Key** to a secure storage device (for example, a flash drive) or write them down on paper, then click the **Confirm** button (see image below).

![](https://moonbot.pro/storage/editor-images/09%20HTX%20API%20eng.jpg)

![(dark)](https://moonbot.pro/storage/editor-images/09%20HTX%20API%20eng.jpg)

### Instructions on how to connect HTX to the Moonbot terminal

1. Create API keys on the HTX exchange website for the main account or a subaccount;
2. Copy the folder containing your main PRO terminal for another exchange into a new folder and run the copy of the terminal in administrator mode so that you can then configure it as the terminal for HTX;
3. Go to **Settings → Login**, select **HTX Spot** (for spot) in the Exchange field, and click the **Apply** button;
4. In **Settings → Login**, register the HTX API keys from your main account or subaccount of the HTX exchange;
5. To avoid manually monitoring the balance of HTX tokens used to pay trading fees, open **Settings → Advanced → Engine Settings** and enable the option **Auto buy BNB**.\
   For the HTX exchange, in this mode the terminal will automatically purchase HTX tokens (instead of BNB, as on the Binance exchange).In the adjacent fields, specify the minimum threshold amount of HTX tokens and the number of HTX tokens for auto-purchase;
6. In the lower-right corner of the main window of the Moonbot terminal for HTX, click the **PRO version** label to open the Moon Credits window with activations of additional modules;
7. In the Moon Credits window, the lower section displays the balance of your Moon Credits; activating the main account or one subaccount requires 500 Moon Credits; if the balance is sufficient, in the **Activate API Key** block click the **Activate for 500 Credits** button - the API keys will then be activated on this terminal for trading cryptocurrencies on the HTX exchange;
8. If you need to activate additional subaccounts of the same exchange, repeat the procedure the required number of times.

![](https://moonbot.pro/storage/editor-images/MoonCredits_W-eng.jpg)

![(dark)](https://moonbot.pro/storage/editor-images/MoonCredits_B-eng.jpg)

Once you have obtained the API keys for HTX and registered them in the Moonbot terminal, you can either continue with the configuration or proceed to create strategies for detecting volatile price movements and automated cryptocurrency trading on the HTX exchange (see the [What Is Autotrading in Moonbot >>](https://moonbot.pro/en/begin/simple-auto-trading/what-is-autotrading-in-moonbot?format=md)).

## Navigation

Path: [Main](https://moonbot.pro/?format=md) / [Documentation](https://moonbot.pro/documentation?format=md) / [Settings Button](https://moonbot.pro/documentation/settings-button?format=md) / [“Settings → Login” Tab](https://moonbot.pro/documentation/settings-login-tab?format=md) / Connecting to the HTX exchange

Parent section: [“Settings → Login” Tab](https://moonbot.pro/documentation/settings-login-tab?format=md)

Previous: [Connecting to the Binance exchange](https://moonbot.pro/documentation/settings-login-tab/connecting-to-the-binance-exchange?format=md)

Next: [Connecting to the Bybit exchange](https://moonbot.pro/documentation/settings-login-tab/connecting-to-the-bybit-exchange?format=md)

## Related

- [Connecting to the Bybit exchange](https://moonbot.pro/documentation/settings-login-tab/connecting-to-the-bybit-exchange?format=md)
- [Connecting to the Gate exchange](https://moonbot.pro/documentation/settings-login-tab/connecting-to-the-gate-exchange?format=md)
- [Connecting to the Bitget exchange](https://moonbot.pro/documentation/settings-login-tab/connecting-to-the-bitget-exchange?format=md)
- [Connecting to the Hyperliquid exchange](https://moonbot.pro/documentation/settings-login-tab/connecting-to-the-hyperliquid-exchange?format=md)
- [Connecting to the OKX exchange](https://moonbot.pro/documentation/settings-login-tab/connecting-to-the-okx-exchange?format=md)
