This is an additional explanation for Huobi API Doc
Public means public data, which is not personal data. It's market data.
Such as kline data, depth data and so on.
It means via http get
methon to get public data.
All most http get methons are getting public data.
- All the public data are got by http get methon.
- All the params are parts of url when sending request.
It means via websocket to get public data. It can be sub or request.
- When sub private data, you will receive private data for many times.
- When request private data, you will receive private data one time.
- The received data is binary data which was compressed of spot, future, coin-swap, usdt-swap
Private means private data, which is personal data. It needs your api key to get the data.
Such as your assets, position and so on.
It means via http post/get
methon to get private data.
All http post
methons are getting private data.
- In http post interface, the signature params are parts of url. And the other params are parts of body data and they must be json formation.
Some of http get
methons get private data.
- In http get interface, all the params are parts of url when sending request.
Signature Illustration:
- The signature methods of the four product(spot, future, coin-swap, usdt-swap) are the same.
- Get the binary data of signature string to make HmacSHA256 string and then the HmacSHA256 string be got base64 string.
The signature string of all as same as follow:
- GET_or_POST
lower_case_host_name
api_path_starts_with_/
AccessKeyId=your_akid&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=url_encode_utc_time
It means via websocket to get private data. It can be sub or request.
- When sub private data, you will receive private data for many times
- When request private data, you will receive private data one time.
- The received data is binary data which was compressed except spot's account and order pushed messege.
- The pushed messege of spot's account and order are plaintext data.
- In ws private, you must send signature data and then sub/req your request.
Signature Illustration:
- The signature methods of the four product(spot, future, coin-swap, usdt-swap) are the same.
- Get the binary data of signature string to make HmacSHA256 string and then the HmacSHA256 string be got base64 string.
The signature string of spot as same as follow:
- GET
lower_case_host_name
api_path_starts_with_/
accessKey=your_akid&signatureMethod=HmacSHA256&signatureVersion=2.1×tamp=url_encode_utc_time
The signature string of future, coin-swap, usdt-swap as same as follow:
- GET
lower_case_host_name
api_path_starts_with_/
AccessKeyId=your_akid&SignatureMethod=HmacSHA256&SignatureVersion=2&Timestamp=url_encode_utc_time