Integrated Trading System

Trading on HTX is so convenient!

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

A Global Leading Crypto Exchange

Offering a wide array of crypto trading and management services to satisfy diverse trading needs.

Industry-Leading Bonus Rate

Beginners enjoy the most competitive bonus rate in the industry.

Trusted Choice for Millions of Users

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

Developer Services

Get your issues resolved and track progress at any time here.

Support Tickets
View progress >

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

Submit Request
View response >

Submit your requests for API optimization or new features.

FAQs

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 /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 Support 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, and Account API. 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?

Accessing HTX API via temporary domains or proxies from mainland China is not recommended, as connection stability cannot be guaranteed.
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 use 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 large volume of data on a single connection and the client server processes much less 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 contact HTX API Tech Support?

If you require technical support for 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