Open Platform

Integrated Trading System

Trading on HTX is so convenient!

Users
Create and manage API keys
Deploy API
API
Trade and request
HTX

Leading Digital Asset Exchange

A wide array of digital asset trading and management services to satisfy diverse trading needs

Industry-Leading Commission Rate

Join our Referral Program to enjoy the most competitive commissions

Trusted Choice for Millions of Users

Providing localized trading services in numerous regions and countries, creating a unified blockchain ecosystem for diverse business lines

Developer Service

Get your issues fixed at any time with the assistance of our tech team

Support Ticket
View status >

Submit a ticket in the event of API failures. Our technical staff will resolve your issues as soon as possible.

Submit Request
View status >

Submit your requests for API optimization or new features.

FAQ

How can I create an API key on HTX?

To obtain an API key, log in to your HTX account, and click Profile > API Management > Create. Make sure you are logged in to your account before creating the API key.

Where can I view HTX's API documentation?

Click this link https://www.htx.com/en-us/opend/newApiPages to read our API documentation in detail.

What should I do if I encounter any issues while trading on HTX?

For any issues or suggestions during your usage, please contact us through any of the following methods:
Join our official Telegram group: HTX API Discussion Group 01
Contact our Customer Support team through the Help Center on our official website or by sending an email to htxsupport@htx-inc.com.

How can I use HTX API?

To use HTX API, please follow these steps:
Sign up and log in to your HTX account.

Create an API Key, which will generate an access_key and secret_key for you.
Use the access_key and secret_key to sign your requests.
Depending on your needs, you can utilize various APIs provided by HTX, such as Market Data API, Trading API, Account API, and more. For each request, make sure to follow the instructions in the API documentation and ensure that your requests include the appropriate HTTP headers and signatures.

What's relatively stable and convenient access to HTX API?

It is not recommended accessing the HTX API using temporary domains or proxies in mainland China, as the stability of API connections through such methods is difficult to guarantee.
It is advised to use AWS Japan for access.
HTX's official domains for spot trading are: api.huobi.pro and api-aws.huobi.pro, while the domains for futures trading are: api.hbdm.com and api.hbdm.vn. If you are using AWS cloud services, it is recommended to use api-aws.huobi.pro for spot trading or api.hbdm.vn for futures trading. These domains have been optimized for AWS users, resulting in relatively lower latency.

How to use REST and WEBSOCKET?

REST API:
REST is a communication method based on HTTP, where you can use HTTP methods like GET and POST to send requests.
For instance, to obtain market data from HTX, you can send a GET request to the relevant URL.
All requests require proper signatures and HTTP headers.
WebSocket API:
On the other hand, WebSocket provides a two-way communication channel that allows real-time interaction between clients and servers.
To utilize HTX's WebSocket API, you need to establish a WebSocket connection to HTX's WebSocket server.
Once the connection is established, you can subscribe to specific market updates or order information and receive real-time notifications when data updates occur.

Why does signature verification fail on HTX?

API Key Error: The access_key or secret_key you're using may be incorrect.
Incorrect Signing Method: You might not use the HMAC SHA256 method correctly to sign your request.
Timestamp Issue: To prevent replay attacks, HTX requires all requests to have a timestamp. A time deviation between your server and HTX's server can lead to signature verification failure.
Request Parameter Error: Any changes to request parameters will affect the signature. To avoid any issues with the verification, make sure not to modify any request parameters after signing.
URL, Path, or Method Error: Make sure you correctly specify the URL, path, and HTTP method for your request.

Why do WebSocket disconnects happen?

WebSocket disconnections, such as close 1006 (abnormal closure), can easily occur due to varying network conditions.
When a client subscribes to a significant amount of data on a single connection and the client server processes much fewer data than it receives, the server may proactively disconnect.
When the client fails to respond to the server's ping messages sent every 5 seconds for 5 times, the server will proactively disconnect.
When the server is under heavy load, it may proactively disconnect some connections to prevent unattended connections from consuming excessive server resources.

How can I get contact with HTX API Tech Support?

If you require technical support for the HTX API, please consider joining our official Telegram group, HTX API Discussion Group 01, or reaching out to our customer support.
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
  • caseLogo.png
Мова
简体中文
English