Skip to content
RebatesHow it worksFee calculator Get cashback / 🤖 Open rebate station
HTXHTX APIAPI tradingquant tradingfee rebate

HTX API Trading Setup 2026: Permissions, IPs, V5 Futures, Rebates

HTX API keys: 3 permissions, 20 IPs, 90-day expiry without IP, KYC L2 for futures API, V5 migration, rate limits, cancel-ratio rule. Code FEEOTTER: 50% rebate.

You create an HTX (formerly Huobi) API key under API Management on the website, and one key works for both spot and futures. HTX's API documentation allows up to 20 keys per main account, with three permissions (read, trade, withdraw) and up to 20 bound IP addresses per key. A key with no IP bound expires after 90 days. Two 2026 changes matter: since March 30, newly registered accounts without KYC Level 2 cannot place futures orders through the API, and the old USDT-M futures API was switched off on July 13, so futures bots must use the V5 endpoints (HTX API docs and announcements, checked 2026-10-17).

This guide covers creating the key, which permissions to tick, sub-account keys, signing and domains, spot and futures rate limits, the cancellation-ratio rule, and how HTX's referral rules treat API orders. Sign up for HTX with code FEEOTTER and link your UID on Fee Otter for a 50% futures rebate (30% automatic rebate from the exchange + 20% extra rebate), 2.5 times a typical 20% code, so half of the fees your bot pays come back.

Key points

  • Where: profile menu → API Management on the website. You confirm with SMS, email and Google Authenticator, and the Secret Key is shown only once.
  • Three permissions: read, trade, withdraw. Trade covers placing and cancelling orders and transfers. Never enable withdraw on a bot key.
  • IPs and expiry: up to 20 IPs (host or network) per key; unbound keys expire after 90 days.
  • KYC gate: from March 30, 2026, new users below KYC Level 2 cannot open futures positions via API. Sub-accounts inherit the main account's level.
  • Futures need V5: the old USDT-M futures API stopped at 15:59 UTC on July 13, 2026.
  • No testnet: HTX shut its spot testnet and tells developers to test on the live environment.
  • Rebate: referral commission is paid on net spot and futures fees, and API orders are not excluded. Market makers cannot take part.

Creating the key

From HTX's help article How to apply for API Trading? How to create an API Key? (checked 2026-10-17):

  1. Log in on the website, click the account icon, choose API Management.
  2. Fill in the note (required) and, optionally, the IPs to bind, separated by commas.
  3. Pick the permissions, click Create, and complete the SMS, email and Google Authenticator codes.
  4. The Access Key and Secret Key appear in a pop-up. The Secret Key is shown only this once; if you lose it, delete the key and make a new one.
  5. Later you can edit the note, bind IPs or delete the key from the same page.

That article dates from 2019 and says each user can create 5 keys and should bind up to 4 IPs. HTX's current API documentation (Preparation) says 20 keys per main account and 20 IPs per key. Where they differ, go by the API docs and what the management page actually lets you create.

Permissions: which to enable

Per the API docs, one key covers spot, futures and options, with three permissions:

PermissionWhat it allowsFor a bot?
ReadQuery orders, fills, balancesAlways
TradePlace and cancel orders, transfersOnly if it trades
WithdrawCreate and cancel withdrawalsNo

Note that trade includes transfers, so a program with trade access can move funds between your accounts. Monitoring and bookkeeping tools only need read.

Sub-account keys

The docs' Sub User section says a main account can create 200 sub-accounts, each with up to 5 keys, and sub-account keys only get read and trade, never withdraw. Sub-accounts cannot transfer to each other; only the main account can move funds. Sub-account keys can be IP-bound and expire on the same rules. One strategy per sub-account limits the damage if a key leaks. How sub-account volume counts for rebates is in sub-account rebate rules.

HTX's docs warn you not to share the Access Key and Secret Key with anyone, including any product or person claiming to be from HTX, and to delete a key at once if it leaks. Linking your account for Fee Otter rebates needs only your UID, never an API key.

KYC level: API limits since March 30, 2026

HTX's announcement on futures leverage limits and API permissions for new users (effective 07:00 UTC, March 30, 2026; checked 2026-10-17) says, for newly registered users:

  • No KYC or KYC Level 1 only: no futures orders via API until Level 2 or higher is done.
  • Below KYC Level 2: futures leverage capped at 5x.
  • Sub-accounts: inherit the main account's KYC level and the same limits.
  • Existing positions: unaffected and cancellation still works. Hedge mode can place closing orders, one-way mode can place reduce-only orders; opening, adding, reversing and changing leverage prompt you to verify first.
  • Trading bots are not affected by this change; Futures Copy Trading is.

What each KYC level needs is in the HTX KYC guide.

Domains and signing

From the API docs:

ProductREST domainNote
Spot, marginhttps://api.huobi.pro, https://api-aws.huobi.proUse api-aws if your server is on AWS
USDT-M futureshttps://api.hbdm.com, https://api.hbdm.vnhbdm.vn uses AWS CDN, hbdm.com uses Cloudflare

HTX recommends hosting in AWS Tokyo, advises against proxies, and asks you to call the API from outside mainland China.

  • Signature methods: HmacSHA256 or Ed25519, signature version 2. The string to sign is the HTTP method, lowercase host, path and the ASCII-sorted, URL-encoded parameters, joined by newlines; the result is Base64-encoded.
  • Timestamp: UTC in YYYY-MM-DDThh:mm:ss, valid for 5 minutes. Keep the server clock synced.
  • GET vs POST: GET signs every parameter; POST signs only AccessKeyId, SignatureMethod, SignatureVersion and Timestamp, with the rest in the body.
  • New signing: the copy trading API already uses header-based API-KEY, API-SIGN and API-TIMESTAMP, and HTX says other features will move to it over time.

A minimal example that lists your spot accounts (HmacSHA256). A read-only key is enough, and the key comes from environment variables:

import base64, hashlib, hmac, os, urllib.parse
from datetime import datetime, timezone
import requests

ACCESS = os.environ["HTX_ACCESS_KEY"]   # read-only key is enough
SECRET = os.environ["HTX_SECRET_KEY"]
HOST, PATH = "api.huobi.pro", "/v1/account/accounts"

params = {
    "AccessKeyId": ACCESS,
    "SignatureMethod": "HmacSHA256",
    "SignatureVersion": "2",
    "Timestamp": datetime.now(timezone.utc).strftime("%Y-%m-%dT%H:%M:%S"),
}
query = urllib.parse.urlencode(sorted(params.items()), quote_via=urllib.parse.quote)
payload = "\n".join(["GET", HOST, PATH, query])
sig = base64.b64encode(hmac.new(SECRET.encode(), payload.encode(), hashlib.sha256).digest()).decode()

r = requests.get(f"https://{HOST}{PATH}?{query}&Signature={urllib.parse.quote(sig, safe='')}")
print(r.status_code, r.json())

We ran this on 2026-10-17 with a fake key and HTX answered api-signature-not-valid (incorrect Access Key), which means the request format is right. With your own key it returns your account list.

USDT-M futures: the old API is gone, use V5

HTX's API upgrade announcement for the USDT-M futures system (May 26, 2026) set the migration window from 08:00 UTC on May 26 to 15:59 UTC on July 13, 2026. After the deadline the old API was permanently discontinued, and accounts that had not migrated cannot place or cancel orders. Every futures interface except market data (account, orders, positions, algo orders, copy trading) had to be re-integrated.

  • HTX suggests creating a test sub-account and calling /v5/account/asset_mode to switch it to the new single-asset (asset_mode=2) or multi-asset (asset_mode=1) collateral mode.
  • After switching, that account's private endpoints work only through V5, for example POST /v5/trade/order to place orders and GET /v5/account/balance for balances.
  • Some trading logic changed too: cross margin now counts potential loss from open orders and can trigger risk-control cancellation, and liquidation now looks only at the maintenance margin ratio on mark price. Recalibrate your strategy parameters; details are in the HTX futures guide.

On spot, the docs say the testnet was closed because few people used it and it cost a lot to run; HTX suggests the live environment instead. With no testnet, start live with small size and low leverage.

Rate limits and the cancellation-ratio rule

From the API docs (checked 2026-10-17):

CategoryScopeLimit
Spot order placement/v1/order/orders/place, all keys under one UID combined100 per 2 s
Futures private endpointsPer UID144 per 3 s (72 trade + 72 read)
Futures public, non-market dataPer IP240 per 3 s
Futures market data RESTPer IP800 per second
Futures private WebSocketConcurrent connections per UID30

Spot responses carry X-HB-RateLimit-Requests-Remain and futures responses carry ratelimit-remaining, so your code can slow down on its own. Main and sub-accounts are counted separately.

Cancellation ratio: on USDT-M futures, once an API user places 3,000 or more limit, post-only, FOK or IOC orders within 10 minutes, HTX computes the cancellation ratio. Above 99%, those four order types are blocked for 5 minutes; three blocks within an hour means 30 minutes. An "invalid cancellation" is an order with zero fill cancelled within 3 seconds of placement. Cancelling and other order types still work during a block. If your strategy quotes and cancels fast, check this ratio before going live.

Fees and rebates on API orders

Fees: regular HTX users (Prime 0) pay 0.2% maker and taker on spot, and 0.02% maker / 0.06% taker on USDT-M futures. At 5 million USDT of 30-day futures volume you reach Prime 2 with 0.05% taker (full table in HTX VIP fee tiers). HTX lists no separate API fee schedule; your account's fee page is final.

Rebates: under Rules for HTX's Referral Program (checked 2026-10-17), the inviter earns a share of the net trading fees an invitee actually pays on spot or futures. The rules do not exclude API orders, but these are excluded or split:

  • Fees on trades using spot cashback vouchers, futures trial bonuses, zero fees or negative fees.
  • Market makers are not eligible for the referral program, and the API docs' market maker program says makers cannot use point cards, VIP rates or rebates.
  • Users at Prime 9 or above no longer generate referral bonuses for their inviter.
  • Orders placed through a broker: at least 70% goes to the inviter and up to 30% to the broker.

So a normal account trading through its own code or the API earns commission like any spot or futures trade, as long as a fee is paid; check your rebate statement to confirm. MEXC is different: its affiliate rules say API trades earn no commission at all.

At a typical bot size: 5 million USDT of monthly futures volume, all taker, puts you at Prime 2 with 0.05% taker, so 2,500 USDT in fees. Through Fee Otter 50% comes back, 1,250 USDT: 750 USDT refunded by HTX into your account and 500 USDT settled daily by Fee Otter. A typical 20% code returns 500 USDT.

This is our own example using HTX's published fees; your fills and rebate statement are what count. Rebates apply to trading fees only, not funding payments. HTX rebate screenshots are on the rebate rates page, sign-up steps in how to register on HTX. An HTX referral code cannot be changed once bound; if you signed up with someone else's code, see the HTX rebind guide. Multi-exchange estimates are in fee rebates for quant traders.

If you are already a VIP at an exchange or run high volume, and want to switch or open an account elsewhere, contact Fee Otter support. We work directly with exchange teams to request special trading benefits or a higher rebate rate; the exchange decides what is granted.

Need help? Contact support

For any binding or rebate question, or to learn about our exclusive OKX rewards and promotions, reach our support through the channels below.

If you trade at high volume or hold exchange VIP status and need more from your rebate, message support directly and we will talk it through.

Telegram · @feeotter

Security: one key per job

  • Separate keys for your own strategy, third-party bots and bookkeeping tools, each with only the permissions it needs.
  • Bind IPs: HTX's best-practice page strongly recommends it, and unbound keys die after 90 days. If every request suddenly fails authentication, check this first.
  • Third-party platforms get read or trade only, never withdraw. Delete the key when you stop using the service.
  • Keep keys out of version control: use environment variables or a secrets manager, not screenshots or chat groups.

Where HTX is available

Clause 1.2 of the HTX User Agreement (updated September 2026, checked 2026-10-17) bars all services in mainland China, the US, Hong Kong, the UK, Singapore, Russia, every EU member state and other listed places. Users from Israel, Iraq, Bangladesh, Bolivia, Ecuador, Kyrgyzstan and New Zealand cannot trade derivatives, so the futures API does not apply to them. In May 2026 the UK government added Huobi Global S.A., which operates HTX, to its Russia sanctions list (UK government notice). Licensing by country is covered in crypto exchange licenses by country.

Risks

Bugs cost more than manual mistakes. A bad signature or timestamp only blocks orders, but a wrong quantity unit or leverage value can open a far bigger position than you meant. HTX has no spot testnet, and futures just moved to V5 with new liquidation rules, so run small for a while first. Keep only the funds your strategy is using on the exchange; HTX's reserves are covered in HTX proof of reserves. Do not hand an API key to anyone offering managed trading or promised profits.

FAQ

Where do I create an HTX API key?

Profile icon → API Management on the website. You confirm with SMS, email and Google Authenticator, and the Secret Key is shown once.

When does an HTX API key without an IP expire?

After 90 days. Bind IPs (up to 20 per key) to avoid it.

Why can't my API place futures orders?

Accounts registered after March 30, 2026 without KYC Level 2 cannot place futures orders via API. Also, the old USDT-M futures API stopped on July 13, 2026; you need the V5 endpoints.

Does HTX have an API testnet?

No. The spot testnet was shut down and HTX suggests testing on the live environment.

Do API trades earn a rebate on HTX?

HTX's referral rules pay on net spot and futures fees and do not exclude API orders. Market makers, Prime 9+ users and trades with trial bonuses, zero or negative fees are excluded. Your rebate statement is final.

Does Fee Otter need my API key?

No. Linking needs only your UID. Fee Otter never asks for API keys and never trades for you.

Further reading

Permissions, rate limits, signing and migration rules come from HTX's official API documentation and help-center announcements, checked 2026-10-17. The help-center article on creating keys was published in 2019, so screens and limits may have changed. HTX adjusts limits and rules; its live documentation is final. The code is a demonstration only; test before trading live. Rebate rates are set by the exchange and the platform and may change. This article is information, not investment advice.

Data verified: 2026-10-17

ⓘ Fee Otter rebate rates are for futures unless marked spot; spot: HTX 45% (30% automatic + 15% extra).

HTXHTX: 50% futures fee rebate
HTX Referral code FEEOTTER
This is the actual HTX signup page opened through our link, with the code already filled in. Plenty of codes that advertise high rebates come without a single screenshot, and people only find out after signing up that no rebate arrives. We put up each exchange's signup page or dashboard so you can check before you register.
HTX rebate 50%: 2.5× a typical 20% codeGet it →