HTX
Connect HTX spot and USDT-M perpetuals to Coinrule with one API key — permissions, scope picker, and troubleshooting.
HTX (formerly Huobi) connects to Coinrule with a single API key that can cover spot, USDT-M perpetuals, or both. Coinrule never has your password and the key must never carry withdrawal rights.
How do I connect HTX?
Create an API key on HTX
Open HTX API key management, create a new key, and enable Read plus the Trade permission for the products you plan to automate (Spot, USDT-M perpetuals, or both). Leave withdrawals and transfers off.
Open the HTX tile on the Connect page
Go to cloud.coinrule.com/connect and select HTX.
Pick the account scope
Choose Spot, Perps, or Both. Both reuses the same key for the spot and USDT-M perpetual accounts and creates two account records in Coinrule.
Paste the AccessKeyId and SecretKey
HTX shows the secret once. Copy the entire value before closing the dialog, then press Connect.
Enable these permissions
- ✓Read— required to validate the key and read balances.
- ✓Trade (Spot)— place and reconcile spot orders.
- ✓Trade (USDT-M perpetuals)— place and reconcile USDT-M swap orders.
Leave these OFF
- ✕Withdrawals / transfers
Notes
- ℹOptional API-key IP binding
- ℹHTX cannot introspect key permissions
HTX cannot prove the Trade permission up front
HTX offers no API to inspect a key's permissions, so Coinrule validates the key by reading balances. If Trade was left off, the connection succeeds but the first live order is rejected by HTX with its own error message. Double-check the permission before launching a live strategy.
Which markets are supported?
- Spot: HTX spot pairs quoted in USDT.
- Perpetuals: USDT-M perpetual swaps (cross margin). Orders are rounded down to whole contracts, the default leverage is 10x, and closing orders are sent as reduce-only.
Which timeframes are available?
1m, 5m, 15m, 1h, 4h, and 1d candles are available for both live and paper HTX strategies. 30m is not available on HTX.
Can I paper trade on HTX?
Yes. Paper strategies run on paper_htx (spot) and paper_htx_perps (perpetuals) using public HTX prices and simulated fills. No API key is required.
Troubleshooting
| Error | Fix |
|---|---|
| Signature or authentication error on connect | Re-copy the AccessKeyId and SecretKey; a trailing space or a truncated secret is the usual cause |
| First order rejected with a permission error | Enable Trade for the matching product (Spot or USDT-M) on the HTX key, then reconnect |
| Perp order rejected for size | HTX perps trade in whole contracts; increase the order size so at least one contract is reached |
| IP forbidden | If you bound the key to an IP allowlist, add Coinrule's trading IPs shown on the Connect page |
Get started
- Learn how Coinrule automates HTX trading on the Coinrule website.
- Sign in to Coinrule Cloud and connect HTX from the Connect page.