Hibt OpenAPI Doc
API Introduction
Access preparation
Trading pairs
A trading pair consists of a base currency and a quote currency. Taking the trading pair BTC/USDT as an example, BTC is the base currency, and USDT is the quote currency.
Apply for API Key
After successful creation, please be sure to remember the following information:
Access Key
API Access KeySecret Key
Key used for signature authentication encryption (visible only during application)
Interface Authentication
Public interfaces can be used to obtain basic information and market data. Public interfaces can be called without authentication.
Private interfaces can be used for trade management and account management. Each private request must be signed and verified using your API Key.
Access URLs
REST API
https://api.hibt0.co/open-api
Signature Authentication
API requests are susceptible to tampering during transmission over the internet. To ensure that the request has not been altered, private interfaces, excluding public interfaces (basic information, market data), must use your API Key for encryption to verify whether parameters or parameter values have changed during transmission. Each API Key needs appropriate permissions to access the corresponding interfaces, and each newly created API Key requires assignment of permissions. Before using an interface, please check the permission type for each interface and confirm that your API Key has the necessary permissions.
What is required for a legitimate request:
Method request address: That is, the access server address https://api.hibt0.co/open-api。
API Access Key (X-ACCESS-KEY) : The Access Key in the API Key you applied for.
Required and Optional Parameters: Each method has a set of required and optional parameters for defining API calls. You can review these parameters and their meanings in the documentation for each method.
Signature: The value calculated by encryption, used to ensure that the signature is valid and has not been tampered with, For the security of your API Key, a parameter signature will expire after 5 minutes.
Signature Required Parameters ** : For interfaces that require signature authentication, the reqTime parameter must be added (the value passed is the latest server time, which can be obtained through the/v1/common/systemTime interface).
Encryption
Standardize the Request for Signature Calculation: Because using HMAC for signature calculation results in completely different outcomes for different content, it's essential to standardize the request before performing signature calculation. The following example illustrates the process using a request to query details for a specific order:
Order Request URL
Sort parameters in ASCII order:
The result obtained by encrypting the sorted request parameters with HMAC SHA256 using secretKey:
Build HTTP request usage
Using X-ACCESS-KEY stores access key information and passes parameters in the header
Using X-Signature stores the generated signature information and passes parameters in the header
Request method
There are currently only two methods available: GET and POST
GET request: All parameters are in the path parameters
POST request: All parameters are sent in form data format in the request body
Response Format
All interfaces are in JSON format. At the top layer of JSON, there are three fields: message, code, and data.
The first two fields represent the request status and information, and the actual business data is in the data field.
Common failure codes
1xxx (access failure class)
2xxx (business failure category)
Spot Interface
Basic Information Interface
Server Time
HTTP Request
GET
/v1/common/systemTime
Authentication: No
Rate Limit: 100 requests per second
Request Parameters
This interface does not accept any parameters.
Response Fields
All Trading Pair Information
HTTP Request
GET
/v1/common/symbols
Authentication: No
Rate Limit: 5 requests per second
Request Parameters
This interface does not accept any parameters.
Response Fields
Market Data Interface
Last Trade Price
This interface provides the current latest transaction price for the trading pair.
HTTP Request
GET
/v1/market/ticker/price
Authentication: No
Rate Limit: 10 requests per second
Request Parameters
Response Fields
Order Book Data
This interface returns the current depth data for the specified trading pair.
HTTP Request
GET
/v1/market/depth
Authentication: No
Rate Limit: 10 requests per second
Request Parameters
Response Fields
Account Interface
Account Balance
HTTP Request
POST
/v1/account/balance
Authentication: Yes
Rate Limit: 5 requests per second
Request Parameters
Response Fields
Trading Interface
Open Orders
HTTP Request
POST
/v1/trade/openOrder
Authentication: Yes
Rate Limit: 10 requests per second
Request Parameters
Response Fields
Historical Orders (Last 3 Months)
HTTP Request
POST
/v1/trade/history
Authentication: Yes
Rate Limit: 10 requests per second
Request Parameters
Response Fields
Create Order
HTTP Request
POST
/v1/trade/order
Authentication: Yes
Rate Limit: 20 requests per second
Request Parameters
Response Fields
Cancel Order
HTTP Request
POST
/v1/trade/cancel
Authentication: Yes
Rate Limit: 20 requests per second
Request Parameters
Response Fields
Last updated