Skip to content

HTX

Connect HTX spot and USDT-M perpetuals to Coinrule with one API key — permissions, scope picker, and troubleshooting.

Updated 2026-11-07·3 min read

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?

  1. 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.

  2. Open the HTX tile on the Connect page

    Go to cloud.coinrule.com/connect and select HTX.

  3. 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.

  4. Paste the AccessKeyId and SecretKey

    HTX shows the secret once. Copy the entire value before closing the dialog, then press Connect.

Open HTX API key management →

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

ErrorFix
Signature or authentication error on connectRe-copy the AccessKeyId and SecretKey; a trailing space or a truncated secret is the usual cause
First order rejected with a permission errorEnable Trade for the matching product (Spot or USDT-M) on the HTX key, then reconnect
Perp order rejected for sizeHTX perps trade in whole contracts; increase the order size so at least one contract is reached
IP forbiddenIf you bound the key to an IP allowlist, add Coinrule's trading IPs shown on the Connect page

Get started

Was this article helpful?

Trading involves risk. Past performance is not indicative of future results. Never trade with funds you cannot afford to lose. Coinrule does not provide financial advice.

Still stuck?

Contact support