Skip to content

HTX (formerly Huobi)

tradectl supports HTX (rebranded from Huobi) inverse and linear futures.

Supported features

  • Real-time market data WebSocket streams (ticker, trades, optional depth)
  • Market and limit orders
  • TP / SL exits via ExitOrder
  • Leverage configuration

API key setup

  1. Log in to HTX
  2. API ManagementCreate Key
  3. Enable Trade permission for USDT-M or Coin-M futures depending on your marketType
  4. IP whitelist the host

Configuration

json
{
  "api": { "provider": "HTX", "key": "...", "secret": "..." },
  "strats": [{
    "name": "btc-linear",
    "type": "shot",
    "marketType": "LINEAR",
    "isEmulator": false,
    "pairs": ["BTC-USDT", "ETH-USDT"],
    "leverage": 10
  }]
}

marketType accepts LINEAR (USDT-margined) or INVERSE (coin-margined).

Notes

  • HTX symbol formats vary by product. Linear perpetuals use dash-delimited names (BTC-USDT); coin-M perpetuals use shorter forms.
  • Run a paper-mode (isEmulator: true) session before going live to confirm symbols resolve correctly on your account.

tradectl — Automate Crypto Trading