How to Connect HTX (Huobi) to ZeroLoss: API Key Setup
ZeroLoss trades HTX (formerly Huobi) USDT-margined perpetual swaps on your own HTX account. It connects through an API key that you create on HTX, not through your password, and the key only needs permission to read your account and trade futures. Your money stays on HTX the whole time. This guide shows how to create that key, restrict it, and connect it to ZeroLoss. It takes about five minutes.
Want to see the bot trade before connecting anything? The free 7-day paper test needs no exchange at all.
Before you start
- An HTX account with two-factor authentication turned on.
- USDT-M futures activated. Open the USDT-M futures section once, meet the listed requirements (HTX may ask for identity verification, depending on your region), accept the user agreement and risk reminder, and click Activate Now.
- At least 100 USDT in your USDT-M account. Use Transfer on the futures trading page or the Assets page, from Spot to USDT-M.
- A ZeroLoss account. You can start with the free paper test and connect later.
Step 1: Create the API key on HTX
- Log in on the HTX website, click the account icon and open API Management.
- Enter a note for the key, such as “ZeroLoss” (HTX requires one).
- Set the permissions (Step 2) and the IP addresses (Step 3).
- Confirm with the verification codes HTX asks for (SMS, email and/or Google Authenticator).
- Copy the Access Key and the Secret Key. HTX shows the secret only once.
Step 2: Choose the permissions
HTX keys have three permissions:
- Read: always on.
- Trade: on. On HTX this one permission covers placing and cancelling orders and moving funds between your own HTX accounts; it cannot be split. It cannot send money off HTX.
- Withdraw: off. This is the one that matters.
Step 3: Restrict the key to ZeroLoss’s IP addresses
Restricting a key to a few IP addresses means it only works from those servers, even if someone copied it. In the ZeroLoss app, open Connect Exchange; the step Add our IPs lists ZeroLoss’s server addresses with a Copy all button. Paste them into the IP restriction field on HTX.
HTX accepts up to 20 IP addresses or ranges, separated by commas. A key with trading permission and no IP binding is deactivated after 90 days without use; a bound key avoids that.
Step 4: Connect the key in ZeroLoss
- Log in to ZeroLoss and open Connect Exchange.
- Under 1 · Pick your exchange, choose HTX.
- Under 2 · Paste your API key, paste your API key and secret key.
- Click Verify & connect. ZeroLoss checks the key and reads your futures balance. The connection needs at least 100 USDT in your HTX USDT-M account.
Check that the key is safe
Open the API management page on HTX and look at the key you created. It should allow reading and futures trading, with withdrawals off. To stop ZeroLoss at any time, delete the key on HTX; trading through it ends immediately, without any action from us. Our guide to trade-only API keys explains why this is the setting that matters.
Common problems
- The key stopped after a quiet spell: it had no IP binding and HTX deactivated it after 90 days unused. Create a new key bound to ZeroLoss’s IPs.
- “Invalid API Key or Secret”: a character was missed when copying. Copy both again; if the secret was not saved, delete the key and create a new one.
- “API key missing required permissions”: futures trading or reading is not ticked on the key. Edit the key, or create a new one with both.
- “API IP restriction issue”: the key is restricted, but not to all of ZeroLoss’s addresses. Use Copy all in the app and paste the full list again.
- “Minimum 100 USDT required in Futures wallet”: your USDT is still in Spot, or futures are not activated yet. Activate USDT-M futures, transfer from Spot to USDT-M, and try again.
Crypto futures trading carries a high risk of loss, and automation does not remove it. Exchange screens change from time to time; if a menu looks different, the permission names above are what to look for. This page is general information, not financial advice. See our Risk & Liability Disclaimer.