Quick answer
HTX, formerly Huobi Global, has spot and derivatives REST and WebSocket APIs. Private calls add AccessKeyId, SignatureMethod=HmacSHA256, SignatureVersion=2 and Timestamp to the query and sign method + host + path + sorted query with HMAC-SHA256. Public klines are keyless at /market/history/kline.
HTX (Huobi) API at a glance
- Pricing
- Free API; trading fees apply
- Availability
- Global; not US residents
- Paper trading
- No sandbox
- Integration type
- REST + API key
- In AlgoGP
- Design and backtest in AlgoGP, connect the exported code
- Auth
- Signature v2: HMAC-SHA256 of method, host, path, query
- Host
https://api.huobi.pro(also api-aws.huobi.pro)- Account id
- Fetch from
/v1/account/accountsbefore ordering
Public market data from HTX
curl -s "https://api.huobi.pro/market/history/kline?symbol=btcusdt&period=60min&size=200"Save the bars as CSV and replay them with the exported python backtest.py --csv bars.csv, or use CCXT to read the same candles in one line of Python.
What to know before automating HTX
- Symbols are lower-case (
btcusdt); orders need the numeric spot account id. - WebSocket market data is gzip-compressed.
Build a HTX (Huobi) strategy with AlgoGP
AlgoGP does not connect to HTX (Huobi) natively yet. HTX (Huobi) uses plain HTTPS with an API key, so it is a good candidate for a native adapter; it is not built in yet.
- 1
Design and backtest in AlgoGP
Describe the strategy to the copilot and backtest it on years of normalized history. The result does not depend on any vendor.
- 2
Export the Python project
Every project exports
strategy.py,market_data.py,brokers.pyandlive.py. The strategy only sees bars, cash, positions and orders, never a vendor’s wire format. - 3
Plug in HTX (Huobi)
Implement the four adapter methods (
account,positions,submit_market_orderand a candle fetcher) with HTX (Huobi)’s SDK, or keep a built-in platform for paper trading and add HTX (Huobi) when you go live.
Built-in brokers for the same markets: Alpaca, Binance, Kraken, Bybit.
HTX (Huobi) API: frequently asked questions
Do Huobi API keys work on HTX?
Yes; it is the same platform after the rebrand.
Design and backtest your HTX (Huobi) strategy first
AlgoGP turns an idea into Python and tests it on years of history before you connect it to HTX (Huobi). The exported code keeps the broker behind four small adapter methods.
- AI copilot writes and revises the rules
- Backtests with realistic costs
- Exported Python ready to wire to HTX (Huobi)
Free plan, no card required.
HTX (Huobi) alternatives
- OKX API Built into AlgoGPMajor crypto exchange with a V5 REST and WebSocket API for spot, perpetuals, futures and options, plus demo trading.
- Binance API Built into AlgoGPThe largest crypto exchange by volume, with a deep public market-data API and a free spot testnet.
- Gate (Gate.io) API GuideCrypto exchange with one of the largest altcoin listings; API v4 covers spot, margin, perpetuals and options with HMAC-SHA512.
- KuCoin API GuideGlobal crypto exchange with spot, margin and futures APIs, signed with a key, secret and passphrase; public market data is keyless.
Frameworks that connect to HTX (Huobi)
Independent guide. AlgoGP is not affiliated with HTX (Huobi). Limits, prices and availability change; confirm them in the official documentation. Nothing here is investment advice.