OVERVIEW
Introduction
Welcome to HashKey Exchange API Documentation!
HashKey Exchange offers a comprehensive suite of APIs including FIX, REST and Websocket API tailored to cater the needs of institutional-grade clients. Our Exchange API solutions are highly scalable, providing clients with access to real-time market data feeds and insights. Client can easily integrate our Exchange API with their existing systems and applications, enabling them to streamline their workflows.
Exchange offers three types of API Connectivity methods
Rest API
Our REST API offers a simple and secure way to manage orders and monitor your digital asset portfolios. The REST API can be publicly access endpoints via market data endpoints and private authenticated endpoints for trading, funding and account data which require requests to be signed.
Websocket API
Use an asynchronous method (pub/sub) approach to efficiently deliver push notifications for orders, transactions, market and other pertinent information. By subscribing to specific topics of interest, users can receive real-time updates without the need for constant polling.
FIX API
Current available to our Omnibus institutional clients
HashKey Exchange FIX connection is an industry-standard solution for our institutional clients to take advantage of our high availability system. It is specifically engineered to handle large amount of throughput supporting end-to-end order entry, order management and access to our rich liquidity feeds.
Test our sandbox
Please direct any questions or feedback to [[email protected]] to obtain sandbox account.
📘 All 2FA/SMS/Email verification code is defaulted to "123456" in Sandbox environment for ease of use
1. Go to our sandbox website page:
📘 https://hk.sim.hashkeydev.com
2. Go to Settings -> API Management -> Create API
3. Enter API Key name, select API permission and setup IP Access Restriction
Technical Support
General Inquiry
Operating hours: Monday to Friday, 9:00 AM to 6:00 PM HKT
Preferred method of contact: [email protected]
Please provide your inquiry in the following format:
Subject:
Environment: Production / Sandbox Inquiry
Identity: UID / Email
Request Body:
Question:
Emergency Production Trading issue
Operating hours: 7 * 24
For urgent matters during non-office hours, please log in to hashkey.com and contact our online Customer Support team via instant message widget.
UPDATES
2026.02
To meet the demands of institutional users for automated asset management, we have officially launched Earn Channel API support this month. Through a series of new endpoints, users can now programmatically query, subscribe to, and redeem wealth management products, as well as manage related orders, enabling efficient allocation of assets.
Core Features & Earn channel API Overview
Query Available Products
- Endpoint: GET
/earn/offers - Function: Retrieves a list of all available wealth management products for subscription, including key information such as product ID, name, description, estimated APY, currency, subscription limits, and status.
- Use Case: Helps users dynamically discover investable options.
Product Subscription & Management
- Subscribe: POST
/earn/purchase- Used to subscribe to a specified wealth management product. Required parameters include productId, currency, amount, and a client-defined clOrderId for idempotency.
- Cancel Subscription: DELETE
/earn/purchase- Cancels a subscription order before it is filled. Requires either the system orderId or the client-defined clOrderId.
Product Redemption & Management
- Redeem: POST
/earn/redeem- Used to redeem held units of an earn channel product. Supports redemption by specifying either the unit or the percent of the holding. Also requires a clOrderId for idempotency.
- Cancel Redemption: DELETE
/earn/redeem- Cancels a redemption order before it is filled.
Order & Position Query
- Query Order History: GET
/earn/orders- Queries historical order records and their detailed status, filterable by product, order type (purchase, redeem, etc.), time range, and more.
- Query Position Overview: GET
/earn/balance- Fetches the user's current holdings in wealth management products, including comprehensive information such as held units, latest net asset value, and unrealized earnings.
Key Operational Workflow
A typical automated wealth management workflow is as follows:
- Call GET
/earn/offersto check available products. - Call POST
/earn/purchaseto execute a subscription. - (Optional) If needed, call DELETE
/earn/purchaseto cancel the subscription. - Call GET
/earn/balanceto monitor holding values. - Call POST
/earn/redeemto execute a full or partial redemption. - Call GET
/earn/ordersat any time to verify all operation records.
2026.01
To empower institutional and professional trading clients, we now provide the client-side API integration suite for the Market Place RFQ trading platform. This allows your systems to automate the initiation, monitoring, and management of large, customized trade requests (RFQs) and interact efficiently with Liquidity Providers (LPs). Integration Process & Technical Highlights
Core Operational Workflow
A typical automated RFQ workflow involves the following steps:
- Fetch Tradable Pairs: Call the GET
/api/v1/market-place/get-pairsendpoint to confirm if the target trading pair is available and matches your client type. - Initiate an RFQ: Create an RFQ via the dedicated client-side endpoint (please refer to exclusive technical documentation for specifics Get-MP-Quote-Pairs ). Key required fields include the trading pair, side (
buy/sell), quantity (sellAmount), and the RFQ mode (rfqMode). - Listen to Market & Quote Streams: Subscribe to the public
rfqsWebSocket channel for market intelligence. Simultaneously, your system will receive quote notifications for your RFQs via private channels. - Accept Quote & Track Status: Once a desirable quote is received, accept it via API. You can then track the final status (e.g.,
SUCCESSFUL,EXPIRED) of that RFQ using the order query endpoints.
Key Data Field Specifications
Pay close attention to the following fields when initiating and managing RFQs:
rfqId: The unique identifier generated by the system for each RFQ, serving as the index for all subsequent operations.buyCcy/sellCcy&sellAmount: Define the trade direction and quantity.rfqMode: The RFQ mode (e.g.,real-time), which may affect the settlement speed of quotes.status: The lifecycle status of the RFQ (e.g.,NEW,ACCEPTED,EXPIRED), crucial for determining available actions.expireTime: The validity expiry timestamp for the RFQ or a quote. Your system must make decisions before this time.
Real-time Communication (WebSocket)
- Public Channel (
rfqs): Subscribing to this channel provides real-time broadcasts of all newly created RFQs across the platform, useful for market analysis. - Private Channels: You will receive critical real-time events via private channels, such as:
- Notifications for new quotes from LPs on your RFQs.
- Confirmation status updates for quotes you have accepted.
- Final trade execution notices for relevant orders.
Error Handling & Permissions
- Permissions: All related API calls require authentication using your account's API Key and signature.
- Error Codes: Please handle common error codes (e.g.,
-6100for insufficient permissions,-6101for parameter errors) and adjust requests based on API responses. This client-side API suite is designed to help you seamlessly integrate large-volume trading workflows into your own systems, enabling automated and efficient RFQ-based trading.
2025.12
🔐 Core Security Enhancement: Overall API Security Upgrade To build a more robust, proactive defense system, we have completed a comprehensive enhancement of our API security. This upgrade is designed to mitigate potential risks across multiple dimensions, including:
- Introduction of API Key Auto-Expiration: To reduce the security threat posed by idle credentials, any API key that remains unused for 90 consecutive days will be automatically deactivated by the system. Please regularly review your keys to ensure critical ones remain active.
- Mandatory Two-Factor Authentication (2FA) for Critical Operations: If enabled, withdrawals initiated via API now require mandatory 2FA verification. This adds a vital security layer for all fund outflow activities.
- Availability of Custom Risk Control Rules: You can now create personalized monitoring and auto-blocking rules for specific sensitive activities (e.g., large withdrawals), enabling granular control over your account security.
We highly encourage you to leverage these new features. Please find the detailed configuration guide here: Risk Control Rule Configuration Guide
📢 Critical Reminder: API Key Management & Webhook push notification We would like to take this opportunity to reiterate the critical importance of API key security, as they are the core credentials for accessing your account. Please ensure you:
- Establish a regular audit cycle to revoke any unnecessary or idle API keys immediately, and strictly adhere to the "Principle of Least Privilege."
- If a third-party vendor manages your system, please verify that they have implemented stringent security measures, including, but not limited to: encrypting sensitive information, enforcing effective risk isolation, and avoiding hard-coding keys in plain text within code repositories.
Detailed guidance can be found here: General Security Principles for API Key Management
Additionally, institutional clients can subscribe to webhooks to receive notifications for digital currency deposit and withdrawal orders, enabling them to stay updated on the latest movements of digital assets in a more timely manner. Should you have any needs, please contact your account manager for integration details.
2025.11
🔐 Core Features & API Overview
Query Available Products
- Endpoint: GET
/api/v1/earn/offers - Function: Retrieves a list of all available wealth management products for subscription, including key information such as product ID, name, description, estimated APY, currency, subscription limits, and status.
- Use Case: Helps users dynamically discover investable options.
Product Subscription & Management
- Subscribe: POST
/api/v1/earn/purchase- Used to subscribe to a specified wealth management product. Required parameters include productId, currency, amount, and a client-defined clOrderId for idempotency.
- Cancel Subscription: DELETE
/api/v1/earn/purchase- Cancels a subscription order before it is filled. Requires either the system orderId or the client-defined clOrderId.
Product Redemption & Management
- Redeem: POST
/api/v1/earn/redeem- Used to redeem held units of an earn channel product. Supports redemption by specifying either the unit or the percent of the holding. Also requires a clOrderId for idempotency.
- Cancel Redemption: DELETE
/api/v1/earn/redeem- Cancels a redemption order before it is filled.
Order & Position Query
- Query Order History: GET
/api/v1/earn/orders- Queries historical order records and their detailed status, filterable by product, order type (purchase, redeem, etc.), time range, and more.
- Query Position Overview: GET
/api/v1/earn/balance- Fetches the user's current holdings in wealth management products, including comprehensive information such as held units, latest net asset value, and unrealized earnings.
Key Operational Workflow A typical automated wealth management workflow is as follows:
- Call GET
/earn/offersto check available products. - Call POST
/earn/purchaseto execute a subscription. - (Optional) If needed, call DELETE
/earn/purchaseto cancel the subscription. - Call GET
/earn/balanceto monitor holding values. - Call POST
/earn/redeemto execute a full or partial redemption. - Call GET
/earn/ordersat any time to verify all operation records.
2025.10
🔐 Core Security Enhancement: Overall API Security Upgrade (Effective) To build a more robust, proactive defense system, we have completed a comprehensive enhancement of our API security. This upgrade is designed to mitigate potential risks across multiple dimensions, including:
- Introduction of API Key Auto-Expiration: To reduce the security threat posed by idle credentials, any API key that remains unused for 90 consecutive days will be automatically deactivated by the system. Please regularly review your keys to ensure critical ones remain active.
- Mandatory Two-Factor Authentication (2FA) for Critical Operations: If enabled, withdrawals initiated via API now require mandatory 2FA verification. This adds a vital security layer for all fund outflow activities.
- Availability of Custom Risk Control Rules: You can now create personalized monitoring and auto-blocking rules for specific sensitive activities (e.g., large withdrawals), enabling granular control over your account security. We highly encourage you to leverage these new features. Please find the detailed configuration guide here: Risk Control Rule Configuration Guide
🔄 Service Optimization: API Foreign Exchange Interface Upgrade (Scheduled for November 11, 2025) To provide you with more competitive quotes and a superior service experience, we will be upgrading our Foreign Exchange interface. This upgrade will integrate a new service provider and optimize the interface. Key Changes:
- The Get Quote endpoint
/convertCurrency/getQuotenow requires thesellAmountas a mandatory parameter. The response also includes a new field: channel (foreign exchange channel). - The Execute Foreign Exchange endpoint
/convertCurrency/transactnow only acceptssellAmountas an input parameter and requires the correctchannel(returned by the above Get Quote endpoint) to be provided. Please note that this is a breaking change. The request and response fields for initiating quotes (/getQuote) and executing exchanges (/transact) will be modified. Your development team will need to adjust and test the integration code based on the upcoming latest API documentation to ensure a smooth transition.
🔄 API Changes for Multi-Chain Support (Scheduled for Launch on October 27, 2025) Hashkey will soon introduce multi-chain support for a single currency (e.g., for USDT, users can choose different blockchain networks such as ERC20 or TRON for deposits and withdrawals). Correspondingly, the API will introduce a new response field chainType for relevant operations, allowing you to better track the blockchain details of your orders. Please note that the input parameters for all endpoints will remain unchanged. Affected Endpoints:
/api/v1/whitelist/verify→ Returns the newchainTypefield/api/v1/account/depositOrders→ Returns the newchainTypefield/api/v1/account/withdrawOrders→ Returns the newchainTypefield/api/v1/account/balanceFlow(when Type = deposit/withdraw/refund) → Returns the newvaChainTypefield/api/v1/account/refundOrders→ Returns the newchainTypefield- Webhook - deposit → Returns the new
chainTypefield - Webhook - withdrawal → Returns the new
chainTypefield
⚙️ Process Improvement: API-Initiated Refunds for Failed Crypto Deposits (Scheduled for October 28, 2025) To address delays in manual processing for failed deposits, we have automated the refund process. For failed transactions due to specific reasons (e.g., third party wallet address), you can proactively initiate a refund request by calling a dedicated refund API endpoint. The system will then automatically process the refund or route it for manual approval based on predefined rules, significantly improving capital handling efficiency and user experience.
📢 Critical Advisory: API Key Management & Webhook push notification We would like to take this opportunity to reiterate the critical importance of API key security, as they are the core credentials for accessing your account. Please ensure you:
- Establish a regular audit cycle to revoke any unnecessary or idle API keys immediately, and strictly adhere to the "Principle of Least Privilege."
- If a third-party vendor manages your system, please verify that they have implemented stringent security measures, including, but not limited to: encrypting sensitive information, enforcing effective risk isolation, and avoiding hard-coding keys in plain text within code repositories. Detailed guidance can be found here: General Security Principles for API Key Management Additionally, institutional clients can subscribe to webhooks to receive notifications for digital currency deposit and withdrawal orders, enabling them to stay updated on the latest movements of digital assets in a more timely manner. Should you have any needs, please contact your account manager for integration details.
REST API
Get Started
REST Sample
import time
import requests
import hashlib
import hmac
import json
from urllib.parse import urlencode, quote
"""
####################################################################################################################################
# Test REST API
#
# Copyright: Hashkey Trading 2024 All rights reserved.
# Please note the API code is provided "As Is" basis, without warranty of any kind, either express or implied, including
# without limitation, warranties that the API code is free of defects, merchantable, non-infringing or fit for a particular purpose
####################################################################################################################################
"""
class RestAPIClient:
def __init__(self, base_url, user_key, user_secret):
"""
Initialize the RestAPIClient with base URL, user key, and user secret.
Args:
base_url (str): The base URL of the API.
user_key (str): The user key for authentication.
user_secret (str): The user secret for authentication.
"""
self.base_url = base_url
self.user_key = user_key
self.user_secret = user_secret
self.headers = {
'X-HK-APIKEY': user_key
}
def get_timestamp(self):
"""
Get the current timestamp in milliseconds.
Returns:
int: The current timestamp.
"""
return int(time.time() * 1000)
def create_signature(self, content):
"""
Create HMAC signature for authentication.
Args:
content (str): The content to be signed.
Returns:
str: The HMAC signature.
"""
content_bytes = content.encode('utf-8')
hmac_digest = hmac.new(
self.user_secret.encode('utf-8'),
content_bytes,
hashlib.sha256
).hexdigest()
return hmac_digest
def place_order(self, symbol, side, order_type, quantity, price=None):
"""
Place an order.
Args:
symbol (str): The trading pair symbol (e.g., ETHUSD).
side (str): The order side (BUY or SELL).
order_type (str): The order type (LIMIT or MARKET).
quantity (str): The order quantity.
price (str, optional): The order price (required for LIMIT orders).
Returns:
dict or None: The JSON response if successful, None otherwise.
"""
timestamp = self.get_timestamp()
data = {
"symbol": symbol,
"side": side,
"type": order_type,
"price": price,
"quantity": quantity,
"timestamp": timestamp
}
if order_type == 'MARKET':
del data['price']
data_string = urlencode(data, quote_via=quote)
signature = self.create_signature(data_string)
data['signature'] = signature
response = requests.post(
f"{self.base_url}/api/v1/spot/order",
headers=self.headers,
data=data
)
if response.status_code == 200:
response_json = response.json()
print("Response:")
print(json.dumps(response_json, indent=4)) # Print formatted JSON response
return response_json
else:
try:
error_json = response.json()
print("Error:")
print(json.dumps(error_json, indent=4)) # Print formatted error response
except json.JSONDecodeError:
print(f"Error: {response.status_code} - {response.text}")
return None
if __name__ == '__main__':
# Example usage:
# Create an instance of RestAPIClient with your API credentials
# For Production please use https://api-pro.hashkey.com
api_client = RestAPIClient(
base_url="https://api-pro.sim.hashkeydev.com",
user_key="your_user_key",
user_secret="your_user_secret"
)
# Place an order with the desired parameters
api_client.place_order("ETHUSDT", "BUY", "LIMIT", "0.01", "3000")
Sandbox Environment
Restful URL:
https://api-pro.sim.hashkeydev.comWebSocket:
wss://stream-pro.sim.hashkeydev.comFIX:
fix-gateway.sim.hashkeydev.comWebsite: https://exchange.sim.hashkeydev.com
Production Environment
Restful URL:
https://api-pro.hashkey.comWebSocket:
wss://stream-pro.hashkey.comFIX:
fix-gateway.hashkey.comWebsite: https://exchange.hashkey.com
General API Information
All responses will return a JSON object or array.
Data is returned in ascending order with the earlier data displayed first and subsequent updates appearing later
All time or timestamp-related variables are measured in milliseconds (ms)
HTTP 4XXerror code indicate that the request content is invalid. This typically originates from the client's end.HTTP 429error code indicates that the request rate limit has been exceeded.HTTP 418error code when our server have detected the IP address continues to send subsequent requests after receiving429error code and is automatically blockedHTTP 5XXindicates an internal system error. This signifies that the issue originates within the trading system. When addressing this error, it's important not to immediately categorise it as a failed task. The execution status is uncertain, it could potentially be either successful or unsuccessful.For GET endpoints, parameters must be sent as query strings.
For POST, PUT, and DELETE endpoints, unless explicitly stated otherwise, parameters must be sent as query strings or in the request body with the content type set to
application/x-www-form-urlencoded.Request Parameters can be sent in any order.
If there are parameters in both query string and request body, only the parameters of query string will be used.
Access Restrictions
If any rate limit is violated, a
429error code will be returnedEach API endpoint has an associated with a specific weight, and certain endpoints may possess varying weights based on different parameters. Endpoints that consume more resources will have a higher weight assigned to them.
Upon receiving
429error code, please take precautionary steps to cease sending requests. API abuse is strictly prohibitedIt is recommended to use Websocket API to obtain corresponding real-time data as much as possible to reduce the traffic of access restrictions caused by frequent API requests.
Order Rate Limiting
Unless explicitly stated otherwise, each API Key has a default rate limit of 2 requests per second for query-related endpoints, while order-related endpoints allow 10 requests per second.
When the number of orders exceeds the set limit, a response with an HTTP CODE 429 will be received. Please wait 1 minute for the suspended period to expire.
Endpoint Security Types
Each endpoint is assigned a security type that determines how you interact with it.
The API-KEY must be passed in the REST API header as X-APIKEY.
API-KEY and SECRET-KEY are case-sensitive.
By default, API-KEY have access to all secure endpoints.
API-KEY Management
Users have to log in the exchange website and apply for an API-KEY, please make sure to remember the following information when creating an API key:
- Access key: API access key
- Secret key: The key used for signature authentication encryption (visible to the application only)
Users have to assign permissions to API-KEY. There are two kinds of permissions,
- READ-ONLY PERMISSION: read permission is used for data query interfaces such as order query, transaction query, etc.
- READ/WRITE PERMISSION:
- Allow Withdrawal: control whether the API key allow withdrawing VA.
/api/v1/account/withdraw
- Allow Trading: control whether the API key allow trading.
/api/v1/spot/order/api/v1.1/spot/order/api/v1/spot/batchOrders/api/v1/spot/openOrders/api/v1/spot/cancelOrderByIds
- Allow wallet address whitelist: control whether the API key can access endpoints used for the wallet whitelist process.
/api/v1/whitelist/walletSigning/api/v1/whitelist/verify/api/v1/account/deposit/address
- Allow internal transfer: control whether the API key allow internal transfer.
/api/v1/account/assetTransfer
- Allow fiat withdrawal: control whether the API key allow withdrawing fiat.
/api/v1/account/fiat/withdraw
- Allow Withdrawal: control whether the API key allow withdrawing VA.
Authentication
Endpoint security type
API requests are likely to be tampered during transmission through the internet. To ensure that the request remains unchanged, all private interfaces other than public interfaces (basic information, market data) must be verified by signature authentication via API-KEY to make sure the parameters or configurations are unchanged during transmission.
Each created API-KEY need to be assigned with appropriate permissions in order to access the corresponding interface. Before using the interface, users is required to check the permission type for each interface and confirm there is appropriate permissions.
| Authentication Type | Description |
|---|---|
| NONE | Endpoints are freely accessible |
| TRADE | Endpoints requires sending a valid API-KEY and signature |
| USER_DATA | Endpoints requires sending a valid API-KEY and signature |
| USER_STREAM | The endpoints requires sending a valid API-KEY |
| MARKET_DATA | The endpoints requires sending a valid API-KEY |
Signature Authentication
Signature
TRADE & USER_DATA
The SIGNED (signature required) endpoint needs to send a parameter, signature, in the query string or request body.
The endpoint is signed with HMAC SHA256. The HMAC SHA256 signature is the result of HMAC SHA256 encryption of the key. Use your secretKey as the key and totalParams as the value to complete this encryption process.
Signature is not case sensitive.
totalParams refers to concatenation of the query string and the request body.
All HTTP requests to API endpoints require authentication and authorization. The following headers should be added to all HTTP requests:
| Key | Value | Type | Description |
|---|---|---|---|
| X-HK-APIKEY | API-KEY | string | The API Access Key you applied for |
Example 1: In queryString
- queryString:
symbol=ETHBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1538323200000
- HMAC SHA256 signature:
echo -n "symbol=ETHBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1538323200000" | openssl dgst -sha256 -hmac "lH3ELTNiFxCQTmi9pPcWWikhsjO04Yoqw3euoHUuOLC3GYBW64ZqzQsiOEHXQS76"
Shell standard output:
5f2750ad7589d1d40757a55342e621a44037dad23b5128cc70e18ec1d1c3f4c6
- curl command:
curl -H "X-HK-APIKEY: tAQfOrPIZAhym0qHISRt8EFvxPemdBm5j5WMlkm3Ke9aFp0EGWC2CGM8GHV4kCYW" -X POST 'https://$HOST/api/v1/spot/order?symbol=ETHBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1538323200000&signature=5f2750ad7589d1d40757a55342e621a44037dad23b5128cc70e18ec1d1c3f4c6'
Example 2: In the request body
- requestBody:
symbol=ETHBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1538323200000
- HMAC SHA256 signature:
echo -n "symbol=ETHBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1538323200000" | openssl dgst -sha256 -hmac "lH3ELTNiFxCQTmi9pPcWWikhsjO04Yoqw3euoHUuOLC3GYBW64ZqzQsiOEHXQS76"
Shell standard output:
5f2750ad7589d1d40757a55342e621a44037dad23b5128cc70e18ec1d1c3f4c6
- curl command:
curl -H "X-HK-APIKEY: tAQfOrPIZAhym0qHISRt8EFvxPemdBm5j5WMlkm3Ke9aFp0EGWC2CGM8GHV4kCYW" -X POST 'https://$HOST/api/v1/spot/order' -d 'symbol=ETHBTC&side=BUY&type=LIMIT&timeInForce=GTC&quantity=1&price=0.1&recvWindow=5000×tamp=1538323200000&signature=5f2750ad7589d1d40757a55342e621a44037dad23b5128cc70e18ec1d1c3f4c6'
Example 3: mixing queryString and request body
- queryString:
symbol=ETHBTC&side=BUY&type=LIMIT&timeInForce=GTC
- requestBody:
quantity=1&price=0.1&recvWindow=5000×tamp=1538323200000
- HMAC SHA256 signature:
echo -n "symbol=ETHBTC&side=BUY&type=LIMIT&timeInForce=GTCquantity=1&price=0.1&recvWindow=5000×tamp=1538323200000" | openssl dgst -sha256 -hmac "lH3ELTNiFxCQTmi9pPcWWikhsjO04Yoqw3euoHUuOLC3GYBW64ZqzQsiOEHXQS76"
Shell standard output:
885c9e3dd89ccd13408b25e6d54c2330703759d7494bea6dd5a3d1fd16ba3afa
- curl command:
curl -H "X-HK-APIKEY: tAQfOrPIZAhym0qHISRt8EFvxPemdBm5j5WMlkm3Ke9aFp0EGWC2CGM8GHV4kCYW" -X POST 'https://$HOST/openapi/v1/order?symbol=ETHBTC&side=BUY&type=LIMIT&timeInForce=GTC' -d 'quantity=1&price=0.1&recvWindow=5000×tamp=1538323200000&signature=885c9e3dd89ccd13408b25e6d54c2330703759d7494bea6dd5a3d1fd16ba3afa'
Two-Factor Authentication
optional
- Certain API endpoints have been enhanced to support two-factor authentication (2FA) via the twoFaToken field.
- When 2FA is enabled for a user, each relevant request‘s header must include a valid twoFaToken for verification.
The following headers should be added to HTTP requests:
| Key | Value | Type | Description |
|---|---|---|---|
| X-TWO-FA-TOKEN | token | STRING | 2FA token required when 2FA is enabled. Optional if 2FA is disabled. |
Request Logic
When 2FA is Enabled
- If 2FA is enabled but the request does not include twoFaToken, the API will return an error indicating that 2FA verification is required.
- Each twoFaToken is valid for 30 seconds and can only be used once during its validity period.
When 2FA is Disabled
- The request verification logic remains unchanged.
- If a twoFaToken is provided in the request, it will be ignored.
Affected Endpoints
The following endpoints have options to add the twoFaToken parameter and now invoke the Security Service for 2FA validation:
| Endpoint | Method | Description |
|---|---|---|
/whitelist/verify |
GET | Get micro-payment depositing address |
/account/withdraw |
POST | Digital asset withdrawal |
/account/fiat/withdraw |
POST | Fiat withdrawal |
/whitelist/walletSigning |
POST | Wallet signing verification |
Time-base security
📘 If your timestamp is ahead of serverTime it needs to be within 1 second + serverTime
The logic of this parameter is as follows:
if (timestamp < (serverTime + 1000) && (serverTime - timestamp) <= recvWindow)
// process request
} else {
// reject request
}
📘 A relatively small recvWindow (5000 or less) is recommended!
- For a SIGNED endpoint, an additional parameter "timestamp" needs to be included in the request. This timestamp is in milliseconds and reflect the time when the request was initiated.
- An optional parameter (not mandatory)
recvWindowcan be used to specify the validity period of the request in milliseconds. If recvWindow is not sent as part of the request, the default value is 5000 - Trading and timeliness are closely interconnected. Network can sometimes be unstable or unreliable, which can lead to inconsistent times when requests are sent to the server.
- With recvWindow, you can specify how many milliseconds the request is valid, otherwise it will be rejected by the server.
Getting Started with Postman
Postman is a popular plug and play API test environment that allows implementing and testing REST and API endpoints.
Postman provides the HTTP networking to connect to the REST API, allows the HTTP header and GET/POST data to be customised and allows for custom code to be executed using Javascript variant.
Pre-request Script
var timestamp = new Date().getTime().toString();
pm.environment.set("timestamp", timestamp);
var api_secret = pm.environment.get("secretKey");
var parameters = pm.request.url.query.toObject(excludeDisabled=true);
var paramsObject = {};
Object.keys(parameters).forEach((paramKey) => {
var paramValue = parameters[paramKey];
var disabled = false;
if (paramKey !== 'signature' && paramValue && !disabled) {
paramsObject[paramKey] = paramValue;
}
});
paramsObject.timestamp = timestamp;
var requestString = Object.keys(paramsObject).map((key) => `${key}=${paramsObject[key]}`).join('&');
var signature = CryptoJS.HmacSHA256(requestString, api_secret).toString();
pm.environment.set("signature", signature);
- Create a new environment and add environment variables

- Add in the header "X-HK-APIKEY"

- Add in params for the required endpoint and most important the timestamp and signature

- Insert the Pre-request script in the above run the API request and press "Send"

Spot Trading
Order Status
- PENDING_NEW - Pending order to be NEW
- NEW - New order, pending to be filled
- PARTIALLY_FILLED - Partially filled
- PARTIALLY_CANCELED - Partially filled and Partially cancelled
- FILLED - Completed filled
- CANCELED - Order cancelled
- REJECTED - Order refers to the rejection of an order during the order matching process.
Order Types
- LIMIT - Limit order
- MARKET - Market order
- LIMIT_MAKER - Maker limit order
Order Direction
- BUY - Buy order
- SELL - Sell Order
TimeInForce
- GTC(Currently only supports limit and limit_maker orders)
- IOC(Currently supports limit and market orders)
Test New Order
POST /api/v1/spot/orderTest
The test endpoint is solely to validate the parameters of the new order, it does not send to matching engine.
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | Y | Name of instrument, e.g. "BTCUSD", "ETHUSD" |
| side | ENUM | Y | BUY or SELL |
| type | ENUM | Y | Currently offer 3 order types: * LIMIT - Limit order * MARKET - Market order * LIMIT_MAKER - Maker Limit order |
| quantity | DECIMAL | Y | Order amount in units of the instrument. Commonly known as "orderQty" |
| price | DECIMAL | C | Required for LIMIT and LIMIT_MAKER order |
| newClientOrderId | STRING | An ID defined by the client for the order, it will be automatically generated if not sent (up to 255 characters) | |
| timeInForce | ENUM | GTC for Limit order, Limit maker order and IOC for Market order | |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
| stpMode | ENUM | C | Self Trade Prevention Mode. Enum: EXPIRE_TAKER, EXPIRE_MAKER. Default EXPIRE_TAKER if not specified. |
Response Content
{}
{}
Create Order v1.0
POST /api/v1/spot/order
📘 We provide two endpoints for creating spot trading orders:
1. Legacy Endpoint: /api/v1/spot/order
2. New Endpoint: /api/v1.1/spot/order
- Key Differences:
- Market Order Support:
- v1: Supports specifying only the cash amount for market buy orders and the quantity for market sell orders
- v1.1: Supports specifying both the cash amount and the quantity for market orders, regardless of whether it's a buy or sell order
- Quantity and Amount:
- v1: Uses a single 'quantity' parameter for specifying order size
- v1.1: Splits the order size into separate 'quantity' and 'amount' parameters
- Market Order Support:
Recommendation:
For enhanced functionality and flexibility, we strongly recommend using the new v1.1 endpoint (/api/v1.1/spot/order) for all order creations
create-order-v1.1
Certain parameters are mandatory depending on the order type:
| Type | Mandatory parameters |
|---|---|
| LIMIT | quantity, price |
| MARKET | quantity |
| LIMIT_MAKER | quantity, price |
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | Y | Name of instrument e.g. "BTCUSD", "ETHUSD" |
| side | ENUM | Y | BUY or SELL |
| type | ENUM | Y | Currently offer 3 order types: - LIMIT - Limit order - MARKET - Market order - LIMIT_MAKER - Maker Limit order |
| quantity | DECIMAL | Y | Order quantity in units of the instrument - Limit order: Represents the amount of the base asset you want to buy or sell. For example: BTC/USD pair, if quantity is 0.5, you're ordering 0.5 BTC - Market order: Represents the amount of the base asset to buy or sell For example: BTC/USDT pair, if quantity is 0.5, you're buying 0.5 BTC worth at the market price |
| price | DECIMAL | C | Required for LIMIT and LIMIT_MAKER order |
| newClientOrderId | STRING | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request. (up to 255 characters) | |
| timeInForce | ENUM | "GTC" for Limit order & Limit maker order "IOC" for Limit order & Market order "FOK" for Limit order |
|
| stpMode | ENUM | C | Self Trade Prevention Mode. Enum: EXPIRE_TAKER, EXPIRE_MAKER Default EXPIRE_TAKER if not specified. |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
{
"accountId": "1471090223379184384",
"symbol": "BTCUSD",
"symbolName": "BTCUSD",
"clientOrderId": "1768459741532390",
"orderId": "2128389008024406016",
"transactTime": "1768459741535",
"price": "98001",
"origQty": "0.01",
"executedQty": "0",
"status": "PENDING_NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"reqAmount": "0",
"concentration": "",
"alert": ""
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| accountId | LONG | 1467298646903017216 | Account number |
| symbol | STRING | BTCUSD | Trading pair |
| symbolName | STRING | BTCUSD | Trading pair name |
| clientOrderId | STRING | 1690084460710352 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
| orderId | LONG | 1470929500342690304 | System-generated order ID (up to 20 characters) |
| transactTime | LONG | 1690084460716 | Timestamp in milliseconds |
| price | DECIMAL | 28000 | Price |
| origQty | DECIMAL | 0.01 | Quantity |
| executedQty | DECIMAL | 0 | Traded Volume |
| status | ENUM | NEW | Order status (see enumeration definition for more details) |
| timeInForce | ENUM | GTC | Duration of the order before expiring |
| type | ENUM | LIMIT | Order type (see enumeration definition for more details) |
| side | ENUM | BUY | BUY or SELL |
| reqAmount | STRING | 0 | Requested Cash amount |
| concentration | STRING | Concentration reminder message | |
| alert | STRING | STO only |
Create Order v1.1
POST /api/v1.1/spot/order
Certain parameters are mandatory depending on the order type:
| Type | Mandatory parameters |
|---|---|
| LIMIT | quantity, price |
| MARKET | quantity or amount |
| LIMIT_MAKER | quantity, price |
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | Y | Name of instrument e.g. "BTCUSD", "ETHUSD" |
| side | ENUM | Y | BUY or SELL |
| type | ENUM | Y | Currently offer 3 order types: - LIMIT - Limit order - MARKET - Market order - LIMIT_MAKER - Maker Limit order |
| quantity | DECIMAL | C | Order quantity in units of the instrument - Limit order: Represents the amount of the base asset you want to buy or sell. For example: BTC/USD pair, if quantity is 0.5, you're ordering 0.5 BTC - Market order: Represents the amount of the base asset to buy or sell For example: BTC/USDT pair, if quantity is 0.5, you're buying 0.5 BTC worth at the market price |
| amount | DECIMAL | C | Cash amount in the units of quote asset. Market order only - Market order: Represents the amount of the quote asset you want to use for the trade For example: For BTC/USD pair, if amount = 1000, you are placing a MARKET buy order to purchase BTC using 1000 USD at the current market price. |
| price | DECIMAL | C | Required for LIMIT and LIMIT_MAKER order |
| newClientOrderId | STRING | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request. (up to 255 characters) | |
| timeInForce | ENUM | "GTC" for Limit order & Limit maker order "IOC" for Limit order & Market order "FOK" for Limit order |
|
| stpMode | ENUM | C | Self Trade Prevention Mode. Enum: EXPIRE_TAKER, EXPIRE_MAKER Default EXPIRE_TAKER if not specified. |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
{
"accountId": "1471090223379184384",
"symbol": "BTCUSD",
"symbolName": "BTCUSD",
"clientOrderId": "1768459741532390",
"orderId": "2128389008024406016",
"transactTime": "1768459741535",
"price": "98001",
"origQty": "0.01",
"executedQty": "0",
"status": "PENDING_NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"reqAmount": "0",
"concentration": "",
"alert": ""
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| accountId | LONG | 1467298646903017216 | Account number |
| symbol | STRING | BTCUSD | Trading pair |
| symbolName | STRING | BTCUSD | Trading pair name |
| clientOrderId | STRING | 1690084460710352 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
| orderId | LONG | 1470929500342690304 | System-generated order ID (up to 20 characters) |
| transactTime | LONG | 1690084460716 | Timestamp in milliseconds |
| price | DECIMAL | 28000 | Price |
| origQty | DECIMAL | 0.01 | Quantity |
| executedQty | DECIMAL | 0 | Traded Volume |
| status | ENUM | NEW | Order status (see enumeration definition for more details) |
| timeInForce | ENUM | GTC | Duration of the order before expiring |
| type | ENUM | LIMIT | Order type (see enumeration definition for more details) |
| side | ENUM | BUY | BUY or SELL |
| reqAmount | STRING | 0 | Requested Cash amount |
| concentration | STRING | Concentration reminder message | |
| alert | STRING | STO only |
Create Multiple orders by Symbol v1.1
POST /api/v1.1/spot/batchOrders
Create orders in batches up to 20 orders at a time. Currently only support for same symbol.
Weight: 1
Upper Limit: 20 orders/batch
Request Parameters
curl --request POST \
--url '/api/v1.1/spot/batchOrders?timestamp=1707492562526&signature=f19400b8b39964fd596280bbf03b37d39ff858d97e522a82d4994ecddd961e71' \
--header 'X-HK-APIKEY: NuVdtBcogpRjyQ6sMMlC6KEB0xuXZbng9zXDPyT0TOWHp64UEkyIJ287bBhaW4vy' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
[
{
"symbol": "BTCUSD",
"side": "SELL",
"type": "LIMIT",
"price": "52000",
"quantity": "0.01",
"newClientOrderId": "123456789"
},
{
"symbol": "BTCUSD",
"side": "BUY",
"type": "LIMIT",
"price": "43000",
"quantity": "0.01",
"newClientOrderId": "123456790"
}
]
'
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | Y | Name of instrument e.g. "BTCUSD", "ETHUSD" |
| side | ENUM | Y | BUY or SELL |
| type | ENUM | Y | Currently offer 3 order types: - LIMIT - Limit order - MARKET - Market order - LIMIT_MAKER - Maker Limit order |
| quantity | DECIMAL | C | Order quantity in units of the instrument - Limit order: Represents the amount of the base asset you want to buy or sell. For example: BTC/USD pair, if quantity is 0.5, you're ordering 0.5 BTC - Market order: Represents the amount of the base asset to buy or sell For example: BTC/USDT pair, if quantity is 0.5, you're buying 0.5 BTC worth at the market price |
| amount | DECIMAL | C | Cash amount in the units of quote asset. Market order only - Market order: Represents the amount of the quote asset you want to use for the trade For example: For BTC/USD pair, if amount = 1000, you are placing a MARKET buy order to purchase BTC using 1000 USD at the current market price. |
| price | DECIMAL | C | Required for LIMIT and LIMIT_MAKER order |
| newClientOrderId | STRING | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request. (up to 255 characters) | |
| timeInForce | ENUM | "GTC" for Limit order & Limit maker order "IOC" for Limit order & Market order "FOK" for Limit order |
|
| stpMode | ENUM | C | Self Trade Prevention Mode. Enum: EXPIRE_TAKER, EXPIRE_MAKER Default EXPIRE_TAKER if not specified. |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
{
"code": 0,
"result": [
{
"code": "0000",
"order": {
"accountId": "1471090223379184384",
"symbol": "BTCUSD",
"symbolName": "BTCUSD",
"clientOrderId": "01151450",
"orderId": "2128390066566072320",
"transactTime": "1768459867723",
"price": "98003",
"origQty": "0.01",
"executedQty": "0",
"status": "PENDING_NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"reqAmount": "0",
"alert": ""
}
},
{
"code": "0000",
"order": {
"accountId": "1471090223379184384",
"symbol": "BTCUSD",
"symbolName": "BTCUSD",
"clientOrderId": "01151451",
"orderId": "2128390066574460928",
"transactTime": "1768459867723",
"price": "98004",
"origQty": "0.01",
"executedQty": "0",
"status": "PENDING_NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"reqAmount": "0",
"alert": ""
}
}
],
"concentration": ""
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| code | INTEGER | 0 | Error code |
| result | Object Array | Batch order result | |
| -code | INTEGER | 0 | Error code of an order |
| -msg | STRING | "Create order failed" | Error message |
| -order | Object Array | Order response data | |
| order.accountId | LONG | 1467298646903017216 | Account number |
| order.symbol | STRING | BTCUSD | Trading pair |
| order.symbolName | STRING | BTCUSD | Trading pair name |
| order.clientOrderId | STRING | 1690084460710352 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
| order.orderId | LONG | 1470929500342690304 | System-generated order ID (up to 20 characters) |
| order.transactTime | LONG | 1690084460716 | Timestamp in milliseconds |
| order.price | DECIMAL | 28000 | Price |
| order.origQty | DECIMAL | 0.01 | Quantity |
| order.executedQty | DECIMAL | 0 | Traded Volume |
| order.status | ENUM | NEW | Order status (see enumeration definition for more details) |
| order.timeInForce | ENUM | GTC | Duration of the order before expiring |
| order.type | ENUM | LIMIT | Order type (see enumeration definition for more details) |
| order.side | ENUM | BUY | BUY or SELL |
| order.reqAmount | STRING | 0 | Requested Cash amount |
| order.alert | STRING | STO only | |
| concentration | STRING | Concentration reminder message |
Cancel Order
DELETE /api/v1/spot/order
Cancel an existing order. Either orderId or clientOrderId must be sent.
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| orderId | STRING | C | Order ID |
| clientOrderId | STRING | C | An ID defined by the client for the order |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
{
"accountId": "1464567707961719552",
"symbol": "ETHUSD",
"clientOrderId": "99999888912",
"orderId": "1563291927536863744",
"transactTime": "1701094920045",
"price": "1900",
"origQty": "1",
"executedQty": "0",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| accountId | LONG | 1467298646903017216 | Account number |
| symbol | STRING | BTCUSD | Trading pair |
| clientOrderId | STRING | 1690084460710352 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
| orderId | LONG | 1470929500342690304 | System-generated order ID (up to 20 characters) |
| transactTime | LONG | 1690084460716 | Timestamp in milliseconds |
| price | DECIMAL | 28000 | Price |
| origQty | DECIMAL | 0.01 | Quantity |
| executedQty | DECIMAL | 0 | Traded Volume |
| status | ENUM | NEW | Order status (see enumeration definition for more details) |
| timeInForce | ENUM | GTC | Duration of the order before expiring |
| type | ENUM | LIMIT | Order type (see enumeration definition for more details) |
| side | ENUM | BUY | BUY or SELL |
Cancel All Open Orders by Symbol
DELETE /api/v1/spot/openOrders
Cancel all open orders (Same symbol only)
Weight: 1
Upper Limit: 1000 orders/batch
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSDT | Currency pair name |
| side | STRING | BUY | BUY or SELL | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"success": true
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| success | BOOLEAN | TRUE | Whether successful |
Cancel Multiple Orders By OrderId
DELETE /api/v1/spot/cancelOrderByIds
Cancel orders in batches according to order IDs (Maximum of 100 orders in a single batch)
Weight: 1
Upper Limit: 100 orders/batch
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| ids | STRING | Y | 202212231234567895,202212231234567896 | Order id (multiple, separated) |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
Success
{
"code": "0000",
"result": []
}
Certain error happened
{
"code": "0000",
"result": [
{
"orderId": "1507155386372816640",
"code": "0211"
},
{
"orderId": "1507155487740667904",
"code": "0211"
}
]
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| code | STRING | 0000 | 0000 means request is executed |
| result | Object Array | ||
| result.orderId | STRING | 16880363408511681 | Order ID |
| result.code | STRING | 0211 | Return error code for each order (For unsuccessful order) |
Query Order
GET /api/v1/spot/order
Check a single order information
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| orderId | STRING | C | Order ID |
| origClientOrderId | STRING | C | Client order ID |
| accountId | STRING | Account ID | |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
{
"accountId": "1816094214250944000",
"exchangeId": "301",
"symbol": "BTCUSDT",
"symbolName": "BTCUSDT",
"clientOrderId": "1753258121083398",
"orderId": "2000868573824739840",
"price": "120002",
"origQty": "0.001",
"executedQty": "0.001",
"cummulativeQuoteQty": "120.00101",
"cumulativeQuoteQty": "120.00101",
"avgPrice": "120001.01",
"status": "FILLED",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"stopPrice": "0.0",
"icebergQty": "0.0",
"time": "1753258121171",
"updateTime": "1753258121278",
"isWorking": true,
"reqAmount": "0",
"feeCoin": "BTC",
"feeAmount": "0.000002",
"feeSupplementaryAmount": "0.00000634",
"sumFeeAmount": "0.000002",
"platformFeeCoin": "",
"sumPlatformFeeAmount": "",
"ordCxlReason": "",
"stpMode": "EXPIRE_TAKER"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| accountId | STRING | 1467298646903017216 | Account number |
| exchangeId | STRING | 301 | Exchange number |
| symbol | STRING | BTCUSD | Trading pair |
| symbolName | STRING | BTCUSD | Trading pair name |
| clientOrderId | STRING | 1690084460710352 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
| orderId | STRING | 1470929500342690304 | System-generated order ID (up to 20 characters) |
| price | STRING (decimal) | 28000 | Price |
| origQty | STRING (decimal) | 0.01 | Quantity |
| executedQty | STRING (decimal) | 0 | Traded Volume |
| cumulativeQuoteQty | STRING (decimal) | 0 | Cumulative volume. Commonly known as Transaction Amount |
| avgPrice | STRING (decimal) | 0 | Average traded price |
| status | STRING | NEW | Order status (see enumeration definition for more details) |
| timeInForce | STRING | GTC | Duration of the order before expiring |
| type | STRING | LIMIT | Order type (see enumeration definition for more details) |
| side | STRING | BUY | BUY or SELL |
| stopPrice | STRING (decimal) | 0.0 | Not used |
| icebergQty | STRING (decimal) | 0.0 | Not used |
| time | STRING (decimal) | 1688036585077 | Order creation Timestamp |
| updateTime | STRING (decimal) | 1688036585084 | Latest update Timestamp according to status |
| isWorking | BOOLEAN | TRUE | Not used |
| reqAmount | STRING | 0 | Requested Cash amount |
| feeCoin | STRING | USDT | The Coin to be charged as commission fee. |
| feeAmount | STRING | 0.006 | The commission fee to be charged for the last filled trade without Platform Coin deduction. The unit is number of the "feeCoin" |
| feeSupplementaryAmount | STRING | 0.00000634 | Supplementary commission fee to meet minimum commission fee requirement |
| sumFeeAmount | STRING | 0.006 | Accumulated commission to be charged for all trades of the order without Platform Coin deduction. The unit is number of the "feeCoin" |
| platformFeeCoin | STRING | HSK | Platform Coin used for commission deduction for the order |
| sumPlatformFeeAmount | STRING | 0.01710699553165824 | Accumulated Platform Coin spent as Commission fee deduction for the order. The unit is number of the platform coin. |
| ordCxlReason | STRING | Order cancel reason | |
| stpMode | STRING | EXPIRE_MAKER | Self Trade Prevention Mode. Enum: EXPIRE_TAKER, EXPIRE_MAKER Default EXPIRE_TAKER if not specified. |
Get Current Open Orders
GET /api/v1/spot/openOrders
Query current active orders
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| orderId | STRING | 1470930457684189696 | Order ID | |
| symbol | STRING | BTCUSD | Currency pair. Return all if not specified. | |
| side | STRING | BUY | Side | |
| limit | INTEGER | 20 | Default 500, Maximum 1000 | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"accountId": "1471090223379184384",
"exchangeId": "301",
"symbol": "AAVEUSD",
"symbolName": "AAVEUSD",
"clientOrderId": "1766552088727423",
"orderId": "2112386456560601088",
"price": "190",
"origQty": "5",
"executedQty": "0",
"cummulativeQuoteQty": "0",
"cumulativeQuoteQty": "0",
"avgPrice": "0",
"status": "NEW",
"timeInForce": "GTC",
"type": "LIMIT",
"side": "BUY",
"stopPrice": "0.0",
"icebergQty": "0.0",
"time": "1766552088746",
"updateTime": "1766552088766",
"isWorking": true,
"reqAmount": "0",
"feeSupplementaryAmount": "0",
"ordCxlReason": "",
"stpMode": "EXPIRE_TAKER"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| No | Object Array | Query result array | |
| - accountId | STRING | 1467298646903017216 | Account number |
| - exchangeId | STRING | 301 | Exchange number |
| - symbol | STRING | BTCUSD | Trading pair |
| - symbolName | STRING | BTCUSD | Trading pair name |
| - clientOrderId | STRING | 1690084460710352 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
| - orderId | STRING | 1470929500342690304 | System-generated order ID (up to 20 characters) |
| - price | STRING (decimal) | 28000 | Price |
| - origQty | STRING (decimal) | 0.01 | Quantity |
| - executedQty | STRING (decimal) | 0 | Traded Volume |
| - cumulativeQuoteQty | STRING (decimal) | 0 | Cumulative volume. Commonly known as Transaction Amount |
| - avgPrice | STRING (decimal) | 0 | Average traded price |
| - status | STRING | NEW | Order status (see enumeration definition for more details) |
| - timeInForce | STRING | GTC | Duration of the order before expiring |
| - type | STRING | LIMIT | Order type (see enumeration definition for more details) |
| - side | STRING | BUY | BUY or SELL |
| - stopPrice | STRING (decimal) | 0.0 | Not used |
| - icebergQty | STRING (decimal) | 0.0 | Not used |
| - time | STRING (decimal) | 1688036585077 | Order creation Timestamp |
| - updateTime | STRING (decimal) | 1688036585084 | Latest update Timestamp according to status |
| - isWorking | BOOLEAN | TRUE | Not used |
| - reqAmount | STRING | 0 | Requested Cash amount |
| - feeSupplementaryAmount | STRING | 0.00000634 | Supplementary commission fee to meet minimum commission fee requirement |
| - ordCxlReason | STRING | Order cancel reason | |
| - stpMode | STRING | EXPIRE_MAKER | Self Trade Prevention Mode. Enum: EXPIRE_TAKER, EXPIRE_MAKER Default EXPIRE_TAKER if not specified. |
Get All Traded Orders
GET /api/v1/spot/tradeOrders
Retrieve all traded orders
Weight: 5
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| accountId | STRING | Account ID | ||
| orderId | STRING | 1470930457684189696 | From Order Id, which is used to return orders whose orders' id are smaller than this orderId | |
| symbol | STRING | BTCUSD | Currency pair | |
| startTime | LONG | Start Timestamp | ||
| endTime | LONG | End Timestamp. Only supports the last 90 days timeframe | ||
| side | STRING | Side | ||
| limit | INTEGER | Default 500, Maximum 1000 | ||
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"accountId": "1471090223379184384",
"exchangeId": "301",
"symbol": "BTCUSD",
"symbolName": "BTCUSD",
"clientOrderId": "1766732444548391",
"orderId": "2113899390835099648",
"price": "0",
"origQty": "0.1",
"executedQty": "0.1",
"cummulativeQuoteQty": "10000",
"cumulativeQuoteQty": "10000",
"avgPrice": "100000",
"status": "FILLED",
"timeInForce": "IOC",
"type": "MARKET",
"side": "SELL",
"stopPrice": "0.0",
"icebergQty": "0.0",
"time": "1766732444563",
"updateTime": "1766732444569",
"isWorking": true,
"reqAmount": "0",
"feeSupplementaryAmount": "0",
"ordCxlReason": "",
"stpMode": "EXPIRE_TAKER"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| No | Object Array | Query result array | |
| - accountId | STRING | 1467298646903017216 | Account number |
| - exchangeId | STRING | 301 | Exchange number |
| - symbol | STRING | BTCUSD | Trading pair |
| - symbolName | STRING | BTCUSD | Trading pair name |
| - clientOrderId | STRING | 1690084460710352 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
| - orderId | STRING | 1470929500342690304 | System-generated order ID (up to 20 characters) |
| - price | STRING (decimal) | 28000 | Price |
| - origQty | STRING (decimal) | 0.01 | Quantity |
| - executedQty | STRING (decimal) | 0 | Traded Volume |
| - cumulativeQuoteQty | STRING (decimal) | 0 | Cumulative volume. Commonly known as Transaction Amount |
| - avgPrice | STRING (decimal) | 0 | Average traded price |
| - status | STRING | NEW | Order status (see enumeration definition for more details) |
| - timeInForce | STRING | GTC | Duration of the order before expiring |
| - type | STRING | LIMIT | Order type (see enumeration definition for more details) |
| - side | STRING | BUY | BUY or SELL |
| - stopPrice | STRING (decimal) | 0.0 | Not used |
| - icebergQty | STRING (decimal) | 0.0 | Not used |
| - time | STRING (decimal) | 1688036585077 | Order creation Timestamp |
| - updateTime | STRING (decimal) | 1688036585084 | Latest update Timestamp according to status |
| - isWorking | BOOLEAN | TRUE | Not used |
| - reqAmount | STRING | 0 | Requested Cash amount |
| - feeSupplementaryAmount | STRING | 0.00000634 | Supplementary commission fee to meet minimum commission fee requirement |
| - ordCxlReason | STRING | Order cancel reason | |
| - stpMode | STRING | EXPIRE_MAKER | Self Trade Prevention Mode. Enum: EXPIRE_TAKER, EXPIRE_MAKER Default EXPIRE_TAKER if not specified. |
Futures Trading
Create New Futures Order
POST /api/v2/futures/order
This endpoint allows you to create a new Futures order.
You can get contracts' price, quantity precision configuration data in the Get Exchange Information.
Weight: 1
Request Parameters
{
"symbol": "BTCUSD-PERPETUAL",
"side": "BUY",
"orderType": "LIMIT",
"baseQty": 0.01,
"price": 90000,
"timeInForce": "GTC",
"clientOrderId": "99999989990119a",
"timestamp": 1714311403031
}
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSD-PERPETUAL | Name of contract |
| side | STRING | Y | BUY | Direction of the order. Possible values include: BUYSELL |
| orderType | STRING | Y | LIMIT | The order type, possible types: LIMITMARKETLIMIT_MAKERSTOP (If price is inputted, then stop limit order, if price not inputted, then stop market order) |
| baseQty | STRING | C | Amount in base asset BTC, 0.01 means the contracts of 0.01 BTC Either baseQty or quoteQty is required |
|
| quoteQty | STRING | C | Amount in quote asset USD, calculated in markPrice, 6000 means the contracts of value 6,000 USD Either baseQty or quoteQty is required |
|
| price | STRING | C | 3000 | Price of the order, required if orderType = LIMIT, LIMIT_MAKER |
| stopPrice | STRING | C | 2800 | The price at which the trigger order will be executed, required if orderType = STOP, triggered by mark price |
| timeInForce | STRING | GTC | Time in force for LIMIT orders. Possible values include: GTC,FOK,IOC. |
|
| clientOrderId | STRING | Y | 99999999980000 | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: ^[.A-Z:/a-z0-9_-]. Max length 100 |
| stpMode | STRING | C | EXPIRE_TAKER | Self Trade Prevention Mode. Enum: EXPIRE_TAKER, EXPIRE_MAKERDefault EXPIRE_TAKER if not specified. |
| slTriggerPrice | DECIMAL | C | Stop loss trigger price | |
| slTriggerBy | ENUM | C | last / mark Required when slTriggerPrice is filled |
|
| tpTriggerPrice | DECIMAL | C | Take profit trigger price | |
| tpTriggerBy | ENUM | C | last / mark Required when tpTriggerPrice is filled |
|
| recvWindow | LONG | 5000 | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"time": "1768794550630",
"orderId": "2131197590285846784",
"clientOrderId": "99999989990119a",
"symbol": "BTCUSD-PERPETUAL",
"status": "PENDING_NEW"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| time | STRING | 1714403283482 | Timestamp when the order is created |
| orderId | STRING | 2131197590285846784 | Order ID |
| clientOrderId | STRING | 99999999980001 | A unique ID of the order. |
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract. |
| status | STRING | PENDING_NEW | The state of the order. Possible values include PENDING_NEW (for limit orders), ORDER_NEW (for stop orders) |
Query Futures Order
GET /api/v2/futures/order
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| orderId | INTEGER | REQUIRED for clientOrderId when not sent | 1674945624754144000 | Order Id |
| clientOrderId | STRING | REQUIRED for orderId when not sent | 99999999980002 | Client Order Id |
| recvWindow | LONG | 5000 | recvWindow | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"time": "1768812678007",
"orderId": "2131349653745568000",
"clientOrderId": "99999989990119c",
"symbol": "BTCUSD-PERPETUAL",
"baseAsset": "BTC",
"quoteAsset": "USD",
"price": "93000",
"side": "BUY",
"orderType": "limit",
"reduceOnly": false,
"leverage": "5",
"originalBaseQty": "0.01",
"executedBaseQty": "0",
"originalQuoteQty": "930",
"executedQuoteQty": "0",
"avgPrice": "0",
"timeInForce": "GTC",
"status": "NEW",
"stpMode": "EXPIRE_TAKER",
"ordCxlReason": "",
"isLiquidationOrder": false,
"liquidationType": "",
"slTriggerPrice": "92500",
"slTriggerBy": "last",
"tpTriggerPrice": "100000",
"tpTriggerBy": "last"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| time | STRING | 1768794550630 | Timestamp when the order is created |
| orderId | STRING | 2131197590285846784 | Order ID |
| clientOrderId | STRING | 99999999980001 | A unique ID of the order. |
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract. |
| baseAsset | STRING | BTC | Name of the base asset, BTC, ETH, etc |
| quoteAsset | STRING | USD | Name of the quote asset, USDT, USD, etc |
| price | STRING | 92560 | Price of the order. |
| side | STRING | BUY | Direction of the order. Possible values include: BUYSELL |
| orderType | STRING | LIMIT | The order type |
| reduceOnly | BOOLEAN | false | |
| leverage | STRING | 5 | Leverage of the order. |
| originalBaseQty | STRING | 0.01 | Quantity ordered in Number of baseAsset |
| executedBaseQty | STRING | 0 | Quantity that has been executed in Number of baseAsset |
| originalQuoteQty | STRING | 925.6 | Quantity ordered in quoteAsset |
| executedQuoteQty | STRING | 0 | Quantity that has been executed in quoteAsset |
| avgPrice | STRING | 0 | Average price of filled orders. |
| timeInForce | STRING | GTC | Time in force for LIMIT orders. Possible values include: GTC,FOK,IOC. |
| status | STRING | CANCELED | The state of the order. Possible values include: Limit Orders: NEWPARTIALLY_FILLEDFILLEDCANCELEDPARTIALLY_CANCELEDREJECTEDStop Orders: ORDER_NEWORDER_FILLEDORDER_REJECTEDORDER_CANCELEDORDER_FAILEDORDER_NOT_EFFECTIVE |
| stpMode | STRING | EXPIRE_TAKER | Self Trade Prevention Mode. |
| ordCxlReason | STRING | USER_CANCEL | Order cancel reason |
| isLiquidationOrder | BOOLEAN | false | Whether the order is a liquidation order |
| liquidationType | STRING | Available when isLiquidationOrder is trueLIQUIDATION_MAKER_ADLLIQUIDATION_MAKERLIQUIDATION_TAKER |
|
| slTriggerPrice | STRING | 92500 | Stop loss trigger price |
| slTriggerBy | STRING | last | last / mark |
| tpTriggerPrice | STRING | 100000 | Take profit trigger price |
| tpTriggerBy | STRING | last | last / mark |
Cancel Futures Order
DELETE /api/v2/futures/order
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| orderId | STRING | REQUIRED for clientOrderId not send | 1674945624754144000 | Order Id |
| clientOrderId | STRING | REQUIRED for orderId not send | 99999999980002 | Client Order Id |
| orderType | STRING | Y | LIMIT | The order type, possible types: LIMITMARKETLIMIT_MAKERSTOP |
| recvWindow | LONG | 5000 | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"code": 200,
"orderId": 2131349653745568000,
"clientOrderId": "99999989990119c",
"orderType": "LIMIT"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| code | INTEGER | 200 | If success, returns 200 If fail, returns error code |
| orderId | LONG | 2131349653745568000 | Order ID |
| clientOrderId | STRING | 99999989990119c | A unique ID of the order. |
| orderType | STRING | BTCUSD-PERPETUAL | The order type |
Batch Create New Futures Orders
POST /api/v2/futures/batchOrders
The batchOrders in RequestBody should fill in the order parameters in list of JSON format.
Only support placing orders in same orderType.
Weight: 1
Upper Limit: Max 3 for stop order, Max 20 for all other orderTypes
Request Parameters
curl --request POST \
--url '/api/v2/futures/batchOrders?timestamp=1714404830102&signature=8c47cf48e****' \
--header 'X-APIKEY: XAzx6DLW2HNs*******' \
--header 'accept: application/json' \
--header 'content-type: application/json' \
--data '
{
"symbol":"BTCUSD-PERPETUAL",
"side":"BUY",
"orderType":"LIMIT",
"timeInForce":"GTC",
"order":[
{
"baseQty":0.01,
"price":92561,
"clientOrderId":"batchorder0119a"
},
{
"baseQty":0.05,
"price":92562,
"clientOrderId":"batchorder0119b"
}
]
}
'
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSD-PERPETUAL | Name of contract |
| side | STRING | Y | BUY | Direction of the order. Possible values include: BUYSELL |
| orderType | STRING | Y | LIMIT | The order type, possible types: LIMITMARKETLIMIT_MAKERSTOP (If price is inputted, then stop limit order, if price not inputted, then stop market order) |
| timeInForce | STRING | C | GTC | Time in force for LIMIT orders. Possible values include: GTC,FOK,IOC. |
| order | Object Array | |||
| order.baseQty | STRING | C | Amount in base asset BTC, 0.01 means the contracts of 0.01 BTC Either baseQty or quoteQty is required |
|
| order.quoteQty | STRING | C | Amount in quote asset USD, calculated in markPrice, 6000 means the contracts of value 6,000 USD Either baseQty or quoteQty is required |
|
| order.price | STRING | C | 3000 | Price of the order, required if orderType = LIMIT, LIMIT_MAKER |
| order.stopPrice | STRING | C | 2800 | The price at which the trigger order will be executed, required if orderType = STOP, triggered by mark price |
| order.clientOrderId | STRING | Y | A unique id among open orders. Automatically generated if not sent. Can only be string following the rule: ^[.A-Z:/a-z0-9_-]. Max length 100 |
|
| order.stpMode | STRING | C | EXPIRE_TAKER | Self Trade Prevention Mode. Enum: EXPIRE_TAKER, EXPIRE_MAKER Default EXPIRE_TAKER if not specified. |
| order.slTriggerPrice | DECIMAL | C | Stop loss trigger price | |
| order.slTriggerBy | ENUM | C | last / mark Required when slTriggerPrice is filled |
|
| order.tpTriggerPrice | DECIMAL | C | Take profit trigger price | |
| order.tpTriggerBy | ENUM | C | last / mark Required when tpTriggerPrice is filled |
Response Content
{
"code": "0000",
"result": [
{
"code": "0000",
"order": {
"orderId": "2131372568755046656",
"clientOrderId": "batchorder0119X",
"symbol": "BTCUSD-PERPETUAL",
"status": "PENDING_NEW",
"accountId": "2129188333171126016",
"transactTime": "1768816219103"
}
},
{
"code": "0000",
"order": {
"orderId": "2131372568763435264",
"clientOrderId": "batchorder0119Y",
"symbol": "BTCUSD-PERPETUAL",
"status": "PENDING_NEW",
"accountId": "2129188333171126016",
"transactTime": "1768816225000"
}
}
]
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| code | STRING | 0000 | Return code of request |
| result | Object Array | Batch order result | |
| result.code | STRING | 0000 | |
| result.order | Object Array | ||
| result.order.orderId | STRING | 2131372568763435264 | Order ID |
| result.order.clientOrderId | STRING | batchorder0119Y | A unique ID of the order. |
| result.order.symbol | STRING | BTCUSD-PERPETUAL | Name of the contract. |
| result.order.status | STRING | PENDING_NEW | The state of the order. Possible values include PENDING_NEW (for limit orders), ORDER_NEW (for stop orders) |
| result.order.accountId | STRING | 2129188333171126016 | Future Account Id |
| result.order.transactTime | STRING | 1768816225000 | Timestamp when the order is created |
Batch Cancel Futures Orders
DELETE /api/v2/futures/cancelOrders
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | C | BTCUSD-PERPETUAL | Name of the contract. Cancel all symbols if not specified. |
| side | STRING | Y | BUY | BUY or SELL |
| orderType | STRING | Y | The order type, possible types: LIMITMARKETLIMIT_MAKERSTOP |
|
| fromOrderId | LONG | 1470930457684189696 | From Order ID. For exmaple, OrderIds:1004,1003,1002,1001, if fromOrderId=1003, then 1002 and 1001 will be canceled |
|
| limit | INTEGER | 20 | Default 100, Maximum 200 | |
| recvWindow | LONG | 5000 | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"code": "0000",
"lastOrderId": 0
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| code | STRING | 0000 | If success, return 0000, Otherwise return corresponding error code |
| lastOrderId | LONG | 0 | Last Order ID to be canceled (return 0 if no order can be cacencelled) If the number of orders to be cancelled exceeds 200, this parameter can be used for paging operation to delete in batches |
Query Futures Trades
GET /api/v2/futures/userTrades
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSD-PERPETUAL | Name of the contract |
| limit | INTEGER | C | 20 | The number of trades returned default 20 (max to 1000) |
| fromId | LONG | C | TradeId to retrieve from | |
| toId | LONG | C | TradeId to retrieve to | |
| startTime | LONG | C | Start Timestamp, Only supports the last 30 days timeframe | |
| endTime | LONG | C | End Timestamp | |
| recvWindow | LONG | recv Window | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"time": "1768921741508",
"tradeId": "2132264544794839413",
"orderId": "2132264542060153088",
"symbol": "BTCUSD-PERPETUAL",
"price": "87900",
"quantity": "0.002",
"commissionAsset": "USD",
"commission": "0.10548",
"makerRebate": "0",
"type": "limit",
"side": "SELL",
"realizedPnl": "-9.462854",
"isMaker": false,
"ticketId": "4658973823776567335"
},
{
"time": "1768921741508",
"tradeId": "2132264544794839399",
"orderId": "2132264542060153088",
"symbol": "BTCUSD-PERPETUAL",
"price": "88540.5",
"quantity": "0.002",
"commissionAsset": "USD",
"commission": "0.1062486",
"makerRebate": "0",
"type": "limit",
"side": "SELL",
"realizedPnl": "-8.181854",
"isMaker": false,
"ticketId": "4658973823776567334"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| time | STRING | 1768921741508 | Timestamp when the order is created |
| tradeId | STRING | 2132264544794839399 | The ID for the trade |
| orderId | STRING | 2132264542060153088 | The ID of the order |
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract. |
| price | STRING | 88540.5 | Price of the trade. |
| quantity | STRING | 0.002 | Quantity of the trade. |
| commissionAsset | STRING | USD | Currency of commission fee |
| commission | STRING | 0.234 | Commission fee |
| makerRebate | STRING | 0 | Return |
| side | STRING | SELL | BUY or SELL |
| type | STRING | limit | The order type, possible types: LIMITMARKETLIMIT_MAKERSTOP |
| realizedPnl | STRING | -8.181854 | Profit and loss |
| isMarker | BOOLEAN | false | Whether the trade is a maker |
| ticketId | STRING | 4658973823776567334 | The Matching ID for the trade. Both maker and taker share the same ticketId for a single trade. |
Query Futures Open Orders
GET /api/v2/futures/openOrders
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | C | BTCUSD-PERPETUAL | Name of the contract. Return all symbols if not specified. |
| side | STRING | C | BUY | BUY or SELL |
| type | STRING | Y | The order type, possible types: LIMITMARKETLIMIT_MAKERSTOP |
|
| fromOrderId | LONG | C | 1470930457684189696 | From Order ID. For exmaple, OrderIds:1004,1003,1002,1001, if fromOrderId=1003, then 1002 and 1001 will be returned |
| limit | INTEGER | C | 20 | Default 20, Maximum 500 |
| startTime | LONG | C | Start Timestamp, Currently supports the last 7 days timeframe | |
| endTime | LONG | C | End Timestamp | |
| recvWindow | LONG | 5000 | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"time": "1768983342494",
"orderId": "2132781291226532106",
"clientOrderId": "batchorder0121h",
"symbol": "BTCUSD-PERPETUAL",
"baseAsset": "BTC",
"quoteAsset": "USD",
"price": "88003",
"side": "BUY",
"orderType": "limit",
"reduceOnly": false,
"leverage": "5",
"originalBaseQty": "0.01",
"executedBaseQty": "0",
"originalQuoteQty": "880.03",
"executedQuoteQty": "0",
"avgPrice": "0",
"timeInForce": "GTC",
"status": "NEW",
"stpMode": "EXPIRE_TAKER",
"ordCxlReason": "",
"isLiquidationOrder": false,
"liquidationType": "",
"slTriggerPrice": "",
"slTriggerBy": "",
"tpTriggerPrice": "",
"tpTriggerBy": ""
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| time | STRING | 1768794550630 | Timestamp when the order is created |
| orderId | STRING | 2131197590285846784 | Order ID |
| clientOrderId | STRING | 99999999980001 | A unique ID of the order. |
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract. |
| baseAsset | STRING | BTC | Name of the base asset, BTC, ETH, etc |
| quoteAsset | STRING | USD | Name of the quote asset, USDT, USD, etc |
| price | STRING | 92560 | Price of the order. |
| side | STRING | BUY | Direction of the order. Possible values include: BUYSELL |
| orderType | STRING | LIMIT | The order type |
| reduceOnly | BOOLEAN | false | |
| leverage | STRING | 5 | Leverage of the order. |
| originalBaseQty | STRING | 0.01 | Quantity ordered in Number of baseAsset |
| executedBaseQty | STRING | 0 | Quantity that has been executed in Number of baseAsset |
| originalQuoteQty | STRING | 925.6 | Quantity ordered in quoteAsset |
| executedQuoteQty | STRING | 0 | Quantity that has been executed in quoteAsset |
| avgPrice | STRING | 0 | Average price of filled orders. |
| timeInForce | STRING | GTC | Time in force for LIMIT orders. Possible values include: GTC,FOK,IOC. |
| status | STRING | CANCELED | The state of the order. Possible values include: Limit Orders: NEWPARTIALLY_FILLEDStop Orders: ORDER_NEW |
| stpMode | STRING | EXPIRE_TAKER | Self Trade Prevention Mode. |
| ordCxlReason | STRING | USER_CANCEL | Order cancel reason |
| isLiquidationOrder | BOOLEAN | false | Whether the order is a liquidation order |
| liquidationType | STRING | Available when isLiquidationOrder is trueLIQUIDATION_MAKER_ADLLIQUIDATION_MAKERLIQUIDATION_TAKER |
|
| slTriggerPrice | STRING | 92500 | Stop loss trigger price |
| slTriggerBy | STRING | last | last / mark |
| tpTriggerPrice | STRING | 100000 | Take profit trigger price |
| tpTriggerBy | STRING | last | last / mark |
Query Futures History Orders
GET /api/v2/futures/historyOrders
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | Name of the contract | |
| fromOrderId | INTEGER | C | From Order ID. For exmaple, OrderIds:1004,1003,1002,1001, if fromOrderId=1003, then 1002 and 1001 will be returned |
|
| type | STRING | Y | The order type, possible types: LIMITMARKETLIMIT_MAKERSTOP |
|
| startTime | LONG | C | Start Timestamp, Currently supports the last 90 days timeframe | |
| endTime | LONG | C | End Timestamp | |
| limit | INTEGER | C | 20 | Default 20, Maximum 500 |
| recvWindow | LONG | C | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"time": "1768983342494",
"orderId": "2132781291226532106",
"clientOrderId": "batchorder0121h",
"symbol": "BTCUSD-PERPETUAL",
"baseAsset": "BTC",
"quoteAsset": "USD",
"price": "88003",
"side": "BUY",
"orderType": "limit",
"reduceOnly": false,
"leverage": "5",
"originalBaseQty": "0.01",
"executedBaseQty": "0.01",
"originalQuoteQty": "880.03",
"executedQuoteQty": "880.03",
"avgPrice": "88003",
"timeInForce": "GTC",
"status": "FILLED",
"stpMode": "EXPIRE_TAKER",
"ordCxlReason": "",
"isLiquidationOrder": false,
"liquidationType": "",
"slTriggerPrice": "",
"slTriggerBy": "",
"tpTriggerPrice": "",
"tpTriggerBy": ""
},
{
"time": "1768983342494",
"orderId": "2132781291226532097",
"clientOrderId": "batchorder0121g",
"symbol": "BTCUSD-PERPETUAL",
"baseAsset": "BTC",
"quoteAsset": "USD",
"price": "88002",
"side": "BUY",
"orderType": "limit",
"reduceOnly": false,
"leverage": "5",
"originalBaseQty": "0.01",
"executedBaseQty": "0.01",
"originalQuoteQty": "880.02",
"executedQuoteQty": "880.02",
"avgPrice": "88002",
"timeInForce": "GTC",
"status": "FILLED",
"stpMode": "EXPIRE_TAKER",
"ordCxlReason": "",
"isLiquidationOrder": false,
"liquidationType": "",
"slTriggerPrice": "",
"slTriggerBy": "",
"tpTriggerPrice": "",
"tpTriggerBy": ""
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| time | STRING | 1768794550630 | Timestamp when the order is created |
| orderId | STRING | 2131197590285846784 | Order ID |
| clientOrderId | STRING | 99999999980001 | A unique ID of the order. |
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract. |
| baseAsset | STRING | BTC | Name of the base asset, BTC, ETH, etc |
| quoteAsset | STRING | USD | Name of the quote asset, USDT, USD, etc |
| price | STRING | 92560 | Price of the order. |
| side | STRING | BUY | Direction of the order. Possible values include: BUYSELL |
| orderType | STRING | LIMIT | The order type |
| reduceOnly | BOOLEAN | false | |
| leverage | STRING | 5 | Leverage of the order. |
| originalBaseQty | STRING | 0.01 | Quantity ordered in Number of baseAsset |
| executedBaseQty | STRING | 0 | Quantity that has been executed in Number of baseAsset |
| originalQuoteQty | STRING | 925.6 | Quantity ordered in quoteAsset |
| executedQuoteQty | STRING | 0 | Quantity that has been executed in quoteAsset |
| avgPrice | STRING | 0 | Average price of filled orders. |
| timeInForce | STRING | GTC | Time in force for LIMIT orders. Possible values include: GTC,FOK,IOC. |
| status | STRING | CANCELED | The state of the order. Possible values include: Limit Orders: FILLEDCANCELEDPARTIALLY_CANCELEDREJECTEDStop Orders: ORDER_FILLEDORDER_REJECTEDORDER_CANCELEDORDER_FAILEDORDER_NOT_EFFECTIVE |
| stpMode | STRING | EXPIRE_TAKER | Self Trade Prevention Mode. |
| ordCxlReason | STRING | USER_CANCEL | Order cancel reason |
| isLiquidationOrder | BOOLEAN | false | Whether the order is a liquidation order |
| liquidationType | STRING | Available when isLiquidationOrder is trueLIQUIDATION_MAKER_ADLLIQUIDATION_MAKERLIQUIDATION_TAKER |
|
| slTriggerPrice | STRING | 92500 | Stop loss trigger price |
| slTriggerBy | STRING | last | last / mark |
| tpTriggerPrice | STRING | 100000 | Take profit trigger price |
| tpTriggerBy | STRING | last | last / mark |
Query Futures Positions
GET /api/v2/futures/positions
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract. Return results for all symbols if not specified | |
| side | STRING | LONG | LONG or SHORT. Direction of the position. If not sent, positions for both sides will be returned. |
|
| recvWindow | LONG | 5000 | recv window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"symbol": "BTCUSD-PERPETUAL",
"baseAsset": "BTC",
"quoteAsset": "USD",
"avgPrice": "91453",
"leverage": "5",
"lastPrice": "89897.2",
"baseQty": "0.195",
"quoteQty": "17532.0795",
"markPrice": "89908.1",
"liquidationPrice": "0",
"margin": "3506.4163",
"marginRate": "",
"profitRate": "-0.0844",
"unrealizedPnL": "-301.2707",
"realizedPnL": "-236.7527",
"marginType": "CROSS",
"positionMode": "net",
"positionSide": "LONG"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | BTCUSDT-PERPETUAL | Name of the contract. |
| baseAsset | STRING | BTC | Name of the base asset |
| quoteAsset | STRING | USD | Name of the quote asset |
| avgPrice | STRING | 100 | Average price for opening the position. |
| leverage | STRING | 5 | Leverage of the position |
| lastPrice | STRING | 100 | Last trade price of the symbol |
| baseQty | STRING | Quantity in number of baseAsset | |
| quoteQty | STRING | Current position value in quoteAsset | |
| markPrice | STRING | Mark Price | |
| liquidationPrice | STRING | 80 | Forced liquidation price |
| margin | STRING | 20 | Occupied margin for this position. |
| marginRate | STRING | 0.2 | Margin rate for current position |
| profitRate | STRING | 0.0000333 | Rate of return for the position |
| unrealizedPnL | STRING | 0 | Unrealized profit and loss for current position held |
| realizedPnL | STRING | 6.8 | Cumulative realized profit and loss for this symbol |
| marginType | STRING | ISOLATED | Margin type. Possible values include CROSS, ISOLATED |
| positionMode | STRING | net | net or hedge |
| positionSide | STRING | LONG | Position side, LONG or SHORT |
Set Futures Trading Stop
POST /api/v2/futures/position/trading-stop
Weight: 3
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | Name of the contract | |
| positionSide | ENUM | C | Position side,LONG or SHORT. Default LONG |
|
| slTriggerPrice | STRING | C | Stop loss trigger price | |
| slTriggerBy | ENUM | C | last / mark Required when slTriggerPrice is filled |
|
| tpTriggerPrice | STRING | C | Take profit trigger price | |
| tpTriggerBy | ENUM | C | last / mark Required when tpTriggerPrice is filled |
|
| recvWindow | LONG | 5000 | recv window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"symbolId": "BTCUSD-PERPETUAL",
"positionSide": "LONG",
"stopProfitPrice": "95000",
"stopProfitTriggerConditionType": "MARK_PRICE",
"stopLossPrice": "85000",
"stopLossTriggerConditionType": "MARK_PRICE"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract |
| positionSide | STRING | LONG | Position side, LONG or SHORT |
| stopProfitPrice | STRING | 95000 | Stop profit price |
| stopProfitTriggerConditionType | STRING | MARK_PRICE | MARK_PRICE or CONTRACT_PRICE |
| stopLossPrice | STRING | 85000 | Stop loss price |
| stopLossTriggerConditionType | STRING | MARK_PRICE | MARK_PRICE or CONTRACT_PRICE |
Query Futures Risk Limit
GET /api/v2/futures/riskLimit
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSD-PERPETUAL | Name of the contract. |
| recvWindow | LONG | 5000 | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"riskLimitValue": "125000.00",
"quoteAsset": "USD",
"maintainMargin": "0.025",
"initialMargin": "0.05",
"quickDeduction": "0.00",
"positionSide": "BUY"
},
{
"riskLimitValue": "125000.00",
"quoteAsset": "USD",
"maintainMargin": "0.025",
"initialMargin": "0.05",
"quickDeduction": "0.00",
"positionSide": "SELL"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| riskLimitValue | STRING | 125000.00 | Risk limit (Maximum position) |
| quoteAsset | STRING | USD | quoteAsset |
| maintainMargin | STRING | 0.025 | Maintenance margin rate |
| initialMargin | STRING | 0.05 | Initial margin rate |
| quickDeduction | STRING | 0.00 | Quickly deduction |
| positionSide | STRING | SELL | Net mode, SELL or BUY Hedge mode, LONG or SHORT |
Query Futures Leverage
GET /api/v2/futures/leverage
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSD-PERPETUAL | Name of the contract |
| recvWindow | LONG | 5000 | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"symbolId": "BTCUSD-PERPETUAL",
"leverage": "5",
"marginType": "CROSS"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| symbolId | STRING | BTCUSD-PERPETUAL | Name of the contract |
| leverage | STRING | 5 | Leverage |
| marginType | STRING | CROSS | Margin type. Possible values include CROSS, ISOLATED. |
Change Futures Leverage
POST /api/v2/futures/leverage
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSD-PERPETUAL | Name of the contract |
| leverage | INTEGER | Y | 5 | Leverage |
| recvWindow | LONG | 5000 | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"code": "0000",
"symbolId": "BTCUSD-PERPETUAL",
"leverage": "5"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| code | STRING | 0000 | Return code of request |
| symbolId | STRING | BTCUSD-PERPETUAL | Name of the contract |
| leverage | STRING | 5 | Leverage |
Query Futures Account Balance
GET /api/v2/futures/balance
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"asset": "USD",
"balance": "4999769.17379751",
"availableBalance": "4995106.80365251"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| asset | STRING | USD | Token Id |
| balance | STRING | 12345.1234 | Token balance |
| availableBalance | STRING | 10000 | Total + unrealised PnL sum of dynamic calculated margin |
Query Futures Funding Rate
GET /api/v2/futures/fundingRate
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract. Return results for all symbols if not specified | |
| recvWindow | LONG | 5000 | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"symbol": "BTCUSD-PERPETUAL",
"rate": "-0.0005",
"nextFundingTime": "1769068800000"
},
{
"symbol": "TONUSD-PERPETUAL",
"rate": "0.000027470936",
"nextFundingTime": "1769068800000"
},
{
"symbol": "TRXUSD-PERPETUAL",
"rate": "0.000027470936",
"nextFundingTime": "1769068800000"
},
{
"symbol": "LINKUSD-PERPETUAL",
"rate": "0.000027470936",
"nextFundingTime": "1769068800000"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract |
| rate | STRING | -0.0005 | The funding rate for this interval |
| nextFundingTime | STRING | 1769068800000 | Next fund fee settlement time |
Query Futures History Funding Rate
GET /api/v2/futures/historyFundingRate
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSD-PERPETUAL | Name of the contract. |
| fromId | LONG | 0 | Start Id | |
| endId | LONG | 0 | End Id | |
| limit | INTEGER | 20 | Returns the number of entries. Default 20. (Min 1 to Max 100) |
|
| recvWindow | LONG | 5000 | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"id": "40",
"symbol": "BTCUSD-PERPETUAL",
"settleTime": "1769040000000",
"settleRate": "-0.0005"
},
{
"id": "36",
"symbol": "BTCUSD-PERPETUAL",
"settleTime": "1769011200000",
"settleRate": "0.000027379608"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| * | Object Arrays | ||
| id | STRING | 40 | Unique identifier |
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract |
| settleTime | STRING | 1769040000000 | Capital rate settlement time |
| settleRate | STRING | -0.0005 | Fund rate |
Query Futures Commission Rate
GET /api/v2/futures/commissionRate
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSD-PERPETUAL | Name of the contract. |
| recvWindow | LONG | 5000 | recv Window | |
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"symbol": "BTCUSD-PERPETUAL",
"makerFeeRate": "0.0006",
"takerFeeRate": "0.0006"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | BTCUSD-PERPETUAL | Name of the contract |
| makerFeeRate | STRING | 0.0006 | The commission rate for maker |
| takerFeeRate | STRING | 0.0006 | The commission rate for taker |
Account
Get VIP Information
GET /api/v1/account/vipInfo
Retrieve VIP Level and Trading fee rates
Weight: 5
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbols | STRING | USDTUSD,XRPUSD | Trading pairs | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"code": 0,
"vipLevel": "0",
"tradeVol30Day": "0",
"totalAssetBal": "0",
"data": [
{
"symbol": "USDTUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "BTCUSDC",
"productType": "Token-Token",
"buyMakerFeeCurrency": "BTC",
"buyTakerFeeCurrency": "BTC",
"sellMakerFeeCurrency": "USDC",
"sellTakerFeeCurrency": "USDC",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "COMPUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "AVAXUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "BTCUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "USDTHKD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "HKD",
"buyTakerFeeCurrency": "HKD",
"sellMakerFeeCurrency": "HKD",
"sellTakerFeeCurrency": "HKD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "AAVEUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "ETHUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "BTCHKD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "HKD",
"buyTakerFeeCurrency": "HKD",
"sellMakerFeeCurrency": "HKD",
"sellTakerFeeCurrency": "HKD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "ETHUSDC",
"productType": "Token-Token",
"buyMakerFeeCurrency": "ETH",
"buyTakerFeeCurrency": "ETH",
"sellMakerFeeCurrency": "USDC",
"sellTakerFeeCurrency": "USDC",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "BTCUSDT",
"productType": "Token-Token",
"buyMakerFeeCurrency": "BTC",
"buyTakerFeeCurrency": "BTC",
"sellMakerFeeCurrency": "USDT",
"sellTakerFeeCurrency": "USDT",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "DOTUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "MKRUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "RNDRUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "ETHUSDT",
"productType": "Token-Token",
"buyMakerFeeCurrency": "ETH",
"buyTakerFeeCurrency": "ETH",
"sellMakerFeeCurrency": "USDT",
"sellTakerFeeCurrency": "USDT",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "LTCUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "MATICUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "UNIUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "USDTUSDC",
"productType": "Token-Token",
"buyMakerFeeCurrency": "USDT",
"buyTakerFeeCurrency": "USDT",
"sellMakerFeeCurrency": "USDC",
"sellTakerFeeCurrency": "USDC",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "DYDXUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "LINKUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "SPICEUSDC",
"productType": "ST-Token",
"buyMakerFeeCurrency": "USDC",
"buyTakerFeeCurrency": "USDC",
"sellMakerFeeCurrency": "USDC",
"sellTakerFeeCurrency": "USDC",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "ETHHKD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "HKD",
"buyTakerFeeCurrency": "HKD",
"sellMakerFeeCurrency": "HKD",
"sellTakerFeeCurrency": "HKD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "ATOMUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "LDOUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
},
{
"symbol": "SNXUSD",
"productType": "Token-Fiat",
"buyMakerFeeCurrency": "USD",
"buyTakerFeeCurrency": "USD",
"sellMakerFeeCurrency": "USD",
"sellTakerFeeCurrency": "USD",
"actualMakerRate": "0.0015",
"actualTakerRate": "0.0015"
}
],
"updateTimestamp": "1709330424013"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| code | INTEGER | 0 | Status code |
| msg | STRING | Error message (if any) | |
| vipLevel | STRING | 0 | VIP Level |
| tradeVol30Day | STRING | 300000000 | Total trading volume in Last 30 days (USD) |
| totalAssetBal | STRING | 1000000000 | Total asset balance (USD) |
| data | Object Array | ||
| - symbol | STRING | Trading pair | |
| - productType | STRING | Token-Token | Token-Token, Token-Fiat, ST-Token |
| - buyMakerFeeCurrency | STRING | BTC | Buy maker fee currency |
| - buyTakerFeeCurrency | STRING | BTC | Buy taker fee currency |
| - sellMakerFeeCurrency | STRING | USD | Sell maker fee currency |
| - sellTakerFeeCurrency | STRING | USD | Sell taker fee currency |
| - actualMakerRate | STRING | 0.015 | Maker fee including any discount |
| - actualTakerRate | STRING | 0.015 | Taker fee including any discount |
| updateTimeStamp | STRING | 1709330424013 | Update timestamp of the request (Daily snapshot) |
Get Account Information
GET /api/v1/account
Retrieve account balance
Weight: 5
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| accountId | LONG | Y | 1471090223379184384 | Account ID, for Master Key only (Master Key users can check sub trading account information by inputing sub trading accountId) |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"balances": [
{
"asset": "BTC",
"assetId": "BTC",
"assetName": "BTC",
"total": "333.805297855",
"free": "333.775297855",
"locked": "0.03"
},
{
"asset": "ETH",
"assetId": "ETH",
"assetName": "ETH",
"total": "239.2252562",
"free": "239.2252562",
"locked": "0"
},
{
"asset": "HKD",
"assetId": "HKD",
"assetName": "HKD",
"total": "9775428.24",
"free": "9775428.24",
"locked": "0"
},
{
"asset": "USD",
"assetId": "USD",
"assetName": "USD",
"total": "8180584.8854663502",
"free": "8177843.2054663502",
"locked": "2741.68"
},
{
"asset": "USDC",
"assetId": "USDC",
"assetName": "USDC",
"total": "12684763.712318516",
"free": "12684763.712318516",
"locked": "0"
},
{
"asset": "USDT",
"assetId": "USDT",
"assetName": "USDT",
"total": "91579.017554413172",
"free": "91579.017554413172",
"locked": "0"
}
],
"userId": "4014986192463421361"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| balances | Object Array | Query an asset array | |
| balances.asset | STRING | BTC | Assets |
| balances.assetId | STRING | BTC | Asset ID |
| balances.assetName | STRING | BTC | Asset Name |
| balances.total | STRING | 100.63264 | Total available funds |
| balances.free | STRING | 100.63264 | Available funds |
| balances.locked | STRING | 0 | Frozen funds |
| userId | STRING | 4014986192463421361 | User ID |
Get End Of Day Balance
GET /api/v1/account/eodBalance
Retrieve account end of day balance
Weight: 5
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| accountId | LONG | 1471090223379184384 | ||
| reportDate | STRING | Y | 2025-10-01 | Reporting Date format yyyy-mm-dd (Max 7 days from the past) |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"balances": [
{
"asset": "BTC",
"assetId": "BTC",
"assetName": "BTC",
"total": "333.805297855",
"free": "333.775297855",
"locked": "0.03"
},
{
"asset": "ETH",
"assetId": "ETH",
"assetName": "ETH",
"total": "239.2252562",
"free": "239.2252562",
"locked": "0"
},
{
"asset": "HKD",
"assetId": "HKD",
"assetName": "HKD",
"total": "9775428.24",
"free": "9775428.24",
"locked": "0"
},
{
"asset": "USD",
"assetId": "USD",
"assetName": "USD",
"total": "8180584.8854663502",
"free": "8177843.2054663502",
"locked": "2741.68"
},
{
"asset": "USDC",
"assetId": "USDC",
"assetName": "USDC",
"total": "12684763.712318516",
"free": "12684763.712318516",
"locked": "0"
},
{
"asset": "USDT",
"assetId": "USDT",
"assetName": "USDT",
"total": "91579.017554413172",
"free": "91579.017554413172",
"locked": "0"
}
],
"userId": "4014986192463421361"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| balances | Object Array | Query an asset array | |
| balances.asset | STRING | BTC | Assets |
| balances.assetId | STRING | BTC | Asset ID |
| balances.assetName | STRING | BTC | Asset Name |
| balances.total | STRING | 100.63264 | Total available funds |
| balances.free | STRING | 100.63264 | Available funds |
| balances.locked | STRING | 0 | Frozen funds |
| userId | STRING | 4014986192463421361 | User ID |
Get Account Trade List
GET /api/v1/account/trades
Query account history and transaction records
Weight: 5
Request Parameters
- If there is only fromId, It will return trades with IDs bigger than fromId, sorted in descending order.
- If there is only toId. It will return trades with IDs less than toId, sorted in descending order
- If both fromId and toId are provided. It will return trades between fromId and toId, sorted in descending order
- If neither fromId or toId is provided, it will return the latest trade records, sorted in descending order.
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | Trading pair | |
| startTime | LONG | Start Timestamp | |
| endTime | LONG | End Timestamp. Only supports the last 30 days timeframe | |
| clientOrderId | STRING | Client Order ID | |
| fromId | LONG | Starting ID | |
| toId | LONG | End ID | |
| limit | INT | Limit of record. Default 500, max 1000 | |
| accountId | LONG | Account ID | |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"id": "2000868574042843648",
"clientOrderId": "1753258121083398",
"ticketId": "4625196823998763008",
"symbol": "BTCUSDT",
"symbolName": "BTCUSDT",
"orderId": "2000868573824739840",
"matchOrderId": "0",
"price": "120001.01",
"qty": "0.001",
"commission": "0.000002",
"commissionAsset": "BTC",
"time": "1753258121180",
"isBuyer": true,
"isMaker": false,
"fee": {
"feeCoinId": "BTC",
"feeCoinName": "BTC",
"fee": "0.000002",
"originFee": "0.000002",
"originCoinId": "BTC",
"originCoinName": "BTC"
},
"feeCoinId": "BTC",
"feeAmount": "0.000002",
"feeSupplementaryAmount": "0.00000634",
"makerRebate": "0",
"accountId": "1816094214250944000",
"hskDeduct": false,
"hskDeductPrice": ""
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| * | Object Array | Check transaction results | |
| id | STRING | 1470930841345474561 | Unique transaction ID |
| clientOrderId | STRING | 999999999800021 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
| ticketId | STRING | 1478144171272585249 | Execution ID, the execution ID is the same for the direction of a single trade. |
| symbol | STRING | BTCUSD | Trading pair |
| symbolName | STRING | BTCUSD | Trading pair name |
| orderId | STRING | 1470930841211329280 | Order ID |
| matchOrderId | STRING | //Ignore | |
| price | STRING (decimal) | 29851.03 | Price |
| qty | STRING (decimal) | 0.0005 | Quantity |
| commission | STRING (decimal) | 0.02985103 | Commission fee |
| commissionAsset | STRING | USD | Currency of commission fee |
| time | STRING (decimal) | 1690084620567 | Millisecond Timestamp — trade time (traded but not yet settled) 撮合成交时间 |
| isBuyer | BOOLEAN | false | Whether the trade is a buyer |
| isMaker | BOOLEAN | false | Whether the trade is a maker |
| fee | Object | Fee information | |
| fee.feeCoinId | STRING | USD | Fee currency |
| fee.feeCoinName | STRING | USD | Fee currency name |
| fee.fee | STRING (decimal) | 0.02985103 | Transaction fee amount after HSK deduction |
| fee.originFee | STRING (decimal) | 0.03085103 | The commission fee before HSK deduction. |
| fee.originCoinId | STRING | USD | The commission fee before HSK deduction |
| fee.originCoinName | STRING | USD | The commission fee coin |
| feeCoinId | STRING | USD | Fee currency |
| feeAmount | STRING (decimal) | 0.02985103 | Amount of transaction fee |
| feeSupplementaryAmount | STRING | 0.00000634 | Supplementary commission fee to meet minimum commission fee requirement |
| makerRebate | STRING | 0 | Return |
| accountId | STRING | 1545583349011201280 | Account ID |
| hskDeduct | BOOLEAN | true | true: successfully deducted HSK false |
| hskDeductPrice | STRING | 0.001 | commission Coin price / HSK price |
Get Account Trade List By ClientOrderId
GET /api/v1/account/tradesByClOrderId
Query account history and transaction records by clientOrderId. Support 30-day data.
Weight: 1
Request Parameters
- This Endpoint is of lower weight comparing with Get Account Trade List
- If there is only fromId, It will return trades with IDs bigger than fromId, sorted in descending order.
- If there is only toId. It will return trades with IDs less than toId, sorted in descending order
- If both fromId and toId are provided. It will return trades between fromId and toId, sorted in descending order
- If neither fromId or toId is provided, it will return the latest trade records, sorted in descending order of the Id
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| clientOrderId | STRING | Y | Client Order ID, do not support bulk query. |
| fromId | LONG | Starting ID | |
| toId | LONG | End ID | |
| limit | INT | Limit of record. Default 500, max 500 | |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"id": "2000868574042843648",
"clientOrderId": "1753258121083398",
"ticketId": "4625196823998763008",
"symbol": "BTCUSDT",
"symbolName": "BTCUSDT",
"orderId": "2000868573824739840",
"matchOrderId": "0",
"price": "120001.01",
"qty": "0.001",
"time": "1753258121180",
"isBuyer": true,
"isMaker": false,
"fee": {
"feeCoinId": "BTC",
"feeCoinName": "BTC",
"fee": "0.000002"
},
"feeSupplementaryAmount": "0.00000634",
"makerRebate": "0",
"accountId": "1816094214250944000"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| * | Object Array | Check transaction results | |
| id | STRING | 1470930841345474561 | Unique transaction ID |
| clientOrderId | STRING | 999999999800021 | An ID defined by the client for the order, it will be automatically generated if it is not sent in the request |
| ticketId | STRING | 1478144171272585249 | Execution ID, the execution ID is the same for the direction of a single trade. |
| symbol | STRING | BTCUSD | Trading pair |
| symbolName | STRING | BTCUSD | Trading pair name |
| orderId | STRING | 1470930841211329280 | Order ID |
| matchOrderId | STRING | //Ignore | |
| price | STRING (decimal) | 29851.03 | Price |
| qty | STRING (decimal) | 0.0005 | Quantity |
| time | STRING (decimal) | 1690084620567 | Millisecond Timestamp — trade time (traded but not yet settled) 撮合成交时间 |
| isBuyer | BOOLEAN | false | Whether the trade is a buyer |
| isMaker | BOOLEAN | false | Whether the trade is a maker |
| fee | Object | Fee information | |
| fee.feeCoinId | STRING | USD | Fee currency |
| fee.feeCoinName | STRING | USD | Fee currency name |
| fee.fee | STRING (decimal) | 0.02985103 | Transaction fee amount after HSK deduction |
| feeSupplementaryAmount | STRING | 0.00000634 | Supplementary commission fee to meet minimum commission fee requirement |
| makerRebate | STRING | 0 | Return |
| accountId | STRING | 1545583349011201280 | Account ID |
Query Account Type
GET /api/v1/account/type
Account Type
| accountType | Type |
|---|---|
| 1 | Main Trading Account |
| 3 | Futures Account |
| 5 | Custody Account |
| 6 | Fiat Account |
| 7 | OPT Account |
| 9 | Prefund Account |
| 1 | Sub Main Trading Account |
| 3 | Sub Futures Account |
| 5 | Sub Custody Account |
Weight: 5
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"accountId": "1954336770171707136",
"accountLabel": "Main Trading Account",
"accountType": 1,
"accountIndex": 0,
"userId": "1954336770188484352"
},
{
"accountId": "1954336770171707137",
"accountLabel": "Custody Account",
"accountType": 5,
"accountIndex": 0,
"userId": "1954336770188484352"
},
{
"accountId": "1954336770171707138",
"accountLabel": "Fiat Account",
"accountType": 6,
"accountIndex": 0,
"userId": "1954336770188484352"
},
{
"accountId": "2076829658620461312",
"accountLabel": "OPT Account",
"accountType": 7,
"accountIndex": 0,
"userId": "1954336770188484352"
},
{
"accountId": "1954336770171707139",
"accountLabel": "Prefund Account",
"accountType": 9,
"accountIndex": 0,
"userId": "1954336770188484352"
},
{
"accountId": "1954346689088298752",
"accountLabel": "Sub Main Trading Account",
"accountType": 1,
"accountIndex": 0,
"userId": "1954346688375497216"
},
{
"accountId": "1954346689088298753",
"accountLabel": "Sub Custody Account",
"accountType": 5,
"accountIndex": 0,
"userId": "1954346688375497216"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| * | Object Array | Query subaccount results | |
| accountId | STRING | 1954336770171707136 | Account Number |
| accountLabel | STRING | Custody Account | Account Label |
| accountType | INTEGER | 1 | Account Type |
| accountIndex | INTEGER | 0 | //Ignore |
| userId | STRING | 1954336770188484352 | UserId of the account |
Internal Account Transfer
This endpoint should be called no more than once per second.
POST /api/v1/account/assetTransfer
Internal asset account transfer. Need to grant the account with "Read/Write Permissioin - Allow internal transfer" authority.
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| fromAccountId | STRING | Y | 1467296062716909568 | Source Account ID |
| toAccountId | STRING | Y | 1473231491689395200 | Destinate Account ID |
| coin | STRING | Y | USDT | Coin |
| quantity | STRING(DECIMAL) | Y | 20 | Transfer amount |
| remark | STRING | TestingRemark | Remark | |
| clientOrderId | STRING | 12345678 | Client unique order identifier (up to 64 characters) | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1712317312973 | Timestamp |
Response Content
{
"success": true,
"timestamp": 1716048391349,
"clientOrderId": "",
"orderId": "1688730736494914304"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| success | BOOLEAN | TRUE | Whether successful |
| timestamp | LONG | 1699943911155 | Transfer completed time |
| clientOrderId | STRING | 12345678 | Client unique order identifier |
| orderId | STRING | 1555687946987836672 | Transfer Order ID (Same as Fund statement orderId for transfer) |
Get API Key Type
GET /api/v1/account/checkApiKey
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"accountType": "Master Account"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| accountType | STRING | Master AccountSub Account |
Account Type |
Get Fiat History
GET /api/v1/account/fiat/history
📘 For Deposit, how to fill
remarkfield ?
If the remark field is required to be included
in the API response for the deposit order, it
should be filled in according to the following
rules when initiating the transfer.
SCB intra-bank transfers are not supported for now.
1. Enterprise Bank Account Mode
(For example, Chong Hing Bank), add REF: `/REF:####`
2. Automatic transfer to trading account:
`/CMD:autoTF_{trading_accountId}_{customer_custom_field}`
3. Transaction remark:
`/MEMO:{customer_custom_field}`
*Chong Hing Bank sample*:
`/REF:H2A6U8/CMD:autoTF_1471090223379184384_customId1/MEMO:customId2`
*ZA/SCB sample*:
`/REF:/CMD:autoTF_1471090223379184384_customId1/MEMO:customId2`
*No Auto transfer, just remark*:
`/REF:/CMD:/MEMO:customId`
Weight: 5
Request Parameters
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| type | STRING | Y | "deposit", "withdraw" |
| status | STRING | deposit: • "under_review" • "processing" • "successful" • "failed" withdraw: • "under_review" • "processing" • "successful" • "failed" |
|
| startTime | LONG | Y | Start timestamp |
| endTime | LONG | Y | End timestamp |
| channel | STRING | "auto", "manual"; default "auto" For transaction records prior to 2023/9/1 please use manual channel |
|
| remark | STRING | Remark | |
| limit | INTEGER | Limit | |
| clientOrderId | STRING | Can be used for filtering | |
| recvWindow | LONG | Recv Window | |
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"orderId": "NFW773922940306722816",
"type": "withdraw",
"remark": "/D773922971355262976",
"asset": "USD",
"grossAmount": "100",
"netAmount": "105",
"fee": "5",
"status": "successful",
"createdTime": "1762325607762",
"updatedTime": "1762841797000",
"channel": "auto",
"clientOrderId": "1234567891104aab"
},
{
"orderId": "NFW773588989415469056",
"type": "withdraw",
"remark": "/D773589020879171584",
"asset": "USD",
"grossAmount": "100",
"netAmount": "105",
"fee": "5",
"status": "successful",
"createdTime": "1762245987665",
"updatedTime": "1762842585000",
"channel": "auto",
"clientOrderId": "1234567891104aa"
},
{
"orderId": "NFW773570664979443712",
"type": "withdraw",
"remark": "/D773570692198510592",
"asset": "USD",
"grossAmount": "1000",
"netAmount": "1005",
"fee": "5",
"status": "processing",
"createdTime": "1762241618778",
"updatedTime": "1762241625000",
"channel": "auto",
"clientOrderId": "1234567891104"
}
]
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| orderId | STRING | Fiat Order ID, e.g: NFW730739521377169408 |
| type | STRING | "deposit", "withdraw" |
| remark | STRING | Deposit: The remark message from bank deposit |
| asset | STRING | "USD" or "HKD". Fee Asset is the same as the Transaction Asset. |
| grossAmount | STRING | Deposit/Withdraw order amount |
| netAmount | STRING | Actual fund in amount Deposit: grossAmount - fee Withdraw: grossAmount + fee |
| fee | STRING | Deposit / Withdraw fee |
| status | STRING | deposit: • "under_review" • "processing" • "failed" • "successful" • "withdraw_return" withdraw: • "under_review" • "processing" • "failed" • "successful" • "return" |
| createdTime | STRING | Order Created Timestamp |
| updatedTime | STRING | Order Updated Timestamp |
| channel | STRING | |
| clientOrderId | STRING | Client order ID |
Get Fund Statement
GET /api/v1/account/balanceFlow
- Only master account Master API key can call this interface, sub-accounts will return insufficient privilege type error code
- All orders returned are final
- Deposit, Withdrawal failed will not be returned
- Query of trade history supports the past 14 days time range(though the endpoint support up to get 7 days data for each request). The other types support maximum 30 days. Exceeded amount will return error code "Exceed maximum time range of N days"
- Remark can only support up to 128 characters
Weight: 3
Request Parameters
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| accountId | LONG | Account ID | |
| type | STRING | Y | Transaction type: "trade" "deposit" "fiatDeposit" "withdraw" "fiatWithdraw" "transfer" "reversal" "refund" |
| clientOrderId | STRING | Corresponds to types: "trade", "withdraw", "fiatWithdraw", "transfer" | |
| remark | STRING | Remark | |
| startTime | LONG | Y | Start timestamp |
| endTime | LONG | Y | End timestamp |
| beginId | INT | Start record number. Default: 0 E.g. If input ID is 1, return starting ID as 2 |
|
| limit | INT | Limit | |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
Type = trade
Supported for the past 7 days time range
[
{
"id": "47049",
"accountId": "1617382306753847296",
"type": "trade",
"netBaseAmount": "0.00015",
"baseCcy": "BTC",
"baseAssetBalance": "96.53346265",
"netQuoteAmount": "-9.622275",
"quoteCcy": "USDC",
"quoteAssetBalance": "887623.4732212",
"direction": "BUY",
"fee": "0.000000225",
"feeCcy": "BTC",
"clientOrderId": "99999999980097",
"orderId": "1733373323360866560",
"tradeId": "1733373323528638720",
"transactTime": "1721370202000" //Trade Completed time
},
{
"id": "47050",
"accountId": "1617382306753847296",
"type": "trade",
"netBaseAmount": "0.29951",
"baseCcy": "BTC",
"baseAssetBalance": "96.83297265",
"netQuoteAmount": "-9984.7019729",
"quoteCcy": "USD",
"quoteAssetBalance": "679.337974140649999999",
"direction": "BUY",
"fee": "14.97705295935",
"feeCcy": "USD",
"clientOrderId": "99999999980098",
"orderId": "1733374982912741632",
"tradeId": "1733374983021793536",
"transactTime": "1721370400000" //Trade Completed time
}
]
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| id | STRING | Record ID |
| accountId | STRING | Account ID |
| type | STRING | "trade" |
| netBaseAmount | STRING | Order Quantity Default Value ="" Buy direction (+ve) Sell direction (-ve) |
| baseCcy | STRING | Base currency |
| baseAssetBalance | STRING | Base asset balance Default Value ="" |
| netQuoteAmount | STRING | Price * Quantity Default Value ="" Buy direction (-ve) Sell direction (+ve) |
| quoteAssetBalance | STRING | Quote asset balance Default Value ="" |
| quoteCcy | STRING | E.g. USDT, USDC, USD |
| direction | STRING | BUY or SELL |
| fee | STRING | Trading fee Default Value = 0 |
| feeSupplementaryAmount | STRING | Supplementary commission fee to meet minimum commission fee requirement |
| feeCcy | STRING | E.g. BTC, ETH, USDC |
| clientOrderId | STRING | Client order ID |
| orderId | STRING | Order ID |
| tradeId | STRING | Trade ID |
| transactTime | STRING | Trade completed and settled time 结算完成时间 |
Type = fiatDeposit/fiatWithdraw
Supported for the past 30 days time range
[
{
"id": "3",
"accountId": "1491920242963768578",
"type": "fiatDeposit",
"netFiatAmount": "100001",
"fiatCcy": "USD",
"fiatBalance": "897400",
"fee": "0",
"feeCcy": "USD",
"orderId": "FD486905037302665216",
"remark": "",
"transactTime": "1693895601000"
},
{
"id": "1",
"accountId": "1491920242963768578",
"type": "fiatWithdraw",
"netFiatAmount": "50001",
"fiatCcy": "USD",
"fiatBalance": "797399",
"fee": "0",
"feeCcy": "USD",
"orderId": "FW486905166923436032",
"remark": "",
"transactTime": "1693895424000"
}
]
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| id | STRING | Record ID |
| accountId | STRING | Account ID |
| type | STRING | "fiatDeposit", "fiatWithdraw" |
| netFiatAmount | STRING | Fiat Deposit/Withdraw: amount Default Value = 0 |
| fiatCcy | STRING | E.g. HKD, USD |
| fiatBalance | STRING | Fiat balance in the account Default Value = 0 |
| fee | STRING | Fee amount |
| feeCcy | STRING | Fee Currency |
| orderId | STRING | Fiat Order ID |
| remark | STRING | Remark |
| transactTime | STRING | Fiat Deposit/Withdraw Completed Time |
Type = deposit/withdraw/refund
Supported for the past 30 days time range
[
{
"id": "720",
"accountId": "1978966613676937217",
"type": "Deposit",
"netVaAmount": "8989",
"vaCcy": "USDT",
"vaChainType": "Tron",
"vaBalance": "1030784.1498",
"fee": "0.0001",
"feeCcy": "USDT",
"orderId": "D768973742990266368",
"txnId": "",
"remark": "",
"transactTime": "1761145789691",
"clientOrderId": ""
},
{
"id": "343",
"accountId": "1954346749805043457",
"type": "Withdraw",
"netVaAmount": "180",
"vaCcy": "USDT",
"vaChainType": "Tron",
"vaBalance": "0",
"fee": "0",
"feeCcy": "USDT",
"orderId": "W769152094447452160",
"txnId": "3dafba8abd7a7b2d02ac9161b41313931c9bafa18cf8cec2c98b1a4ec300be32",
"remark": "",
"transactTime": "1761188210875",
"clientOrderId": "usdttron102303"
},
{
"id": "335",
"accountId": "1954346689088298753",
"type": "Refund",
"netVaAmount": "100.1199",
"vaCcy": "USDT",
"vaChainType": "Tron",
"vaBalance": "200.2697",
"fee": "0.0001",
"feeCcy": "USDT",
"orderId": "refund_D768944634495336448",
"txnId": "",
"remark": "",
"transactTime": "1761139348000",
"clientOrderId": ""
}
]
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| id | STRING | Record ID |
| accountId | STRING | Account ID |
| type | STRING | "Deposit", "Withdraw", "Refund" |
| netVaAmount | STRING | Deposit/Withdraw: amount Default Value = 0 |
| vaCcy | STRING | ETH, BTC, USDC, etc |
| vaChainType | STRING | Tron |
| vaBalance | STRING | Fiat balance in the account Default Value = 0 |
| fee | STRING | Deposit/Withdraw Fee Default Value = 0 |
| feeCcy | STRING | Fee Currency |
| clientOrderId | STRING | The unique ID assigned by the client |
| orderId | STRING | Deposit/Withdraw Order ID |
| txnId | STRING | Chain Transaction ID |
| remark | STRING | Remark |
| transactTime | STRING | Deposit/Withdraw Completed Time |
Type = transfer
Supported for the past 30 days time range
[
{
"id": "2286",
"fromAccountId": "1471090223379184385",
"toAccountId": "1471090223379184384",
"type": "transfer",
"netTransferAmount": "1",
"transferCcy": "BTC",
"fromAccountBalance": "1304.36501272",
"toAccountBalance": "6080.570119335",
"orderId": "1944297063069140480", // Transfer order ID
"remark": "",
"transactTime": "1746514272000",
"clientOrderId": ""
},
{
"id": "2287",
"fromAccountId": "1471090223379184385",
"toAccountId": "1471090223379184384",
"type": "transfer",
"netTransferAmount": "1",
"transferCcy": "BTC",
"fromAccountBalance": "1303.36501272",
"toAccountBalance": "6081.570119335",
"orderId": "1944304593916806656", // Transfer order ID
"remark": "",
"transactTime": "1746515169000",
"clientOrderId": ""
}
]
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| id | STRING | Record ID |
| fromAccountId | STRING | From Account ID |
| toAccountId | STRING | To Account ID |
| type | STRING | "transfer" |
| netTransferAmount | STRING | Transfer Amount Default Value = 0 |
| transferCcy | STRING | ETH, BTC, USDC, etc |
| fromAccountBalance | STRING | From Account balance Default Value = 0 |
| toAccountBalance | STRING | To Account balance Default Value = 0 |
| orderId | STRING | Transfer OrderID |
| remark | STRING | Remark |
| transactTime | STRING | Transfer Completed Time |
| clientOrderId | STRING | An ID defined by the client for the withdrawal order |
Get OPT Order History
GET /api/v1/account/brokerage/trades
Weight: 5
Request Parameters
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| startTime | STRING | Y | Start timestamp |
| endTime | STRING | Y | End timestamp |
| orderId | STRING | OPT Order ID | |
| source | STRING | Automatic/Manual | |
| pages | INTEGER | Enter integers 1 or 2, default to 1 | |
| limit | INTEGER | Limit of record Default: 500, Max: 1000 |
|
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"orderId": "SWAP704632933320630272",
"status": "Processing",
"buyAmount": "-",
"buyAsset": "USD",
"sellAmount": "99.00000000",
"sellAsset": "USDT",
"price": "-",
"updateTime": "2025-04-28 09:59:42",
"source": "Automatic"
},
{
"orderId": "SWAP699644019747282944",
"status": "Succeeded",
"buyAmount": "18.00180019",
"buyAsset": "USDT",
"sellAmount": "18.00000000",
"sellAsset": "USD",
"price": "0.99990000",
"updateTime": "2025-04-14 15:35:33",
"source": "Automatic"
},
{
"orderId": "SWAP699565941616500736",
"status": "Failed",
"buyAmount": "21.00000000",
"buyAsset": "USDT",
"sellAmount": "21.00000000",
"sellAsset": "USD",
"price": "1.00000000",
"updateTime": "2025-04-14 10:25:17",
"source": "Automatic"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| orderId | STRING | SWAP509692083805077504 | OPT Order ID |
| buyAmount | STRING (decimal) | 99999 | Buy Amount |
| buyAsset | STRING | USD | Buy Asset |
| sellAmount | STRING (decimal) | 100000 | Sell Amount |
| sellAsset | STRING | USDT | Sell Asset |
| price | STRING (decimal) | 1.11111111 | Price |
| source | STRING | Automatic | Automatic order Manual order |
| status | STRING | Succeeded | "Processing" "Succeeded" "Failed" |
| updateTime | STRING | 2025-04-10 12:52:42 | Last Updated Time |
Wallet
🔗 Webhook
Subscription
POST /api/v1/webhook/subscriptions
Deposit & Withdrawal Messages Subscription
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| webhookBaseUrl | STRING | Y | https:hash.com/depositOrder | Webhook URL provided by user E.g. https://abc.com/depositOrder |
| eventType | STRING | Y | depositOrders | depositOrders or withdrawOrders |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"msg": "",
"code": "0000",
"subscriptionSuccess": true,
"createdTime": "1763620274694",
"subscriptionId": "6e91c6245b4eb3d9ab3a395f8414b85c"
}
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| subscriptionSuccess | BOOLEAN | Subscription creation successful or failed. True if succeeded, False if failed. |
| subscriptionId | STRING | Unique ID for the subscription (if succeeded) |
| createdTime | STRING | The timestamp when the subscription was created. |
| code | STRING | error code |
| msg | STRING | error message |
UnSubscription
DELETE /api/v1/webhook/subscriptions
Deposit & Withdrawal Messages UnSubscription
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| subscriptionId | STRING | Y | 6e91c6245b4eb3d9ab3a395f8414b85c | subscriptionId when subscribe endpoint returned |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"msg": "",
"code": "0000",
"success": true
}
| PARAMETER | TYPE | DESCRIPTION |
|---|---|---|
| code | STRING | error code |
| msg | STRING | error message |
| success | BOOLEAN | UnSubscription successful or failed. True if succeeded, False if failed. |
Deposit Event
eventType=depositOrders
Push message content
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| eventType | STRING | depositOrders | Event Type |
| walletId | STRING | 1644290379632090369 | Wallet ID |
| createdTime | STRING | 1691048298420 | Order Created Timestamp |
| lastUpdatedTime | STRING | 1691048299911 | Order Last Updated Timestamp |
| depositOrderId | STRING | D578755281141776384 | Deposit order ID |
| coin | STRING | ETH | Coin |
| coinName | STRING | ETH | Coin name |
| fromAddress | STRING | 0x5507D17587310aD5e71408BDD494003c7D3d0948 | Deposit from address |
| toAddress | STRING | 0x5507D17587310aD5e71408BDD494003c7D3d0947 | Deposit to address |
| quantity | STRING (decimal) | 0.050000000000000000 | Deposit amount |
| status | STRING | Deposit successful | Deposit status |
| statusCode | ENUM | 4 | |
| txId | STRING | 0xbd40b38543767a7d441c87c676ddfaf6cf750e4c7d8d66abd0f1665eb031932a | On-chain transaction ID |
| failureReason | STRING | We do not accept deposits from third party exchanges | Failure Reason |
| refundOrderId | STRING | T037963209036978789 | Refund Order ID |
| chainType | STRING | Tron |
Deposit Status
| statusCode | Description |
|---|---|
| 1 | Pending address authentication 待地址认证 |
| 3 | Deposit failed 充值失败 |
| 4 | Deposit successful 充值成功 |
| 5 | Refunding 退币中 |
| 6 | Refund completed 退币完成 |
| 7 | Refund failed 退币失败 |
| 8 | In the account 上账中 |
| 9 | The first address verification of personal recharge fails 首次验证签名失败 |
| 12 | Deposit processing 充值中 |
Withdraw Event
eventType=withdrawOrders
Push message content
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| walletId | STRING | 1644290379632090369 | Wallet ID |
| createdTime | STRING | 1691048298420 | Order Created Timestamp |
| lastUpdateTime | STRING | 1691048299911 | Order Last Updated Timestamp |
| withdrawOrderId | STRING | W579805129870495744 | Withdraw order ID |
| coin | STRING | ETH | Coin |
| coinName | STRING | ETH | Coin name |
| toAddress | STRING | 0x5507D17587310aD5E71408BDD494003c7D3d0947 | Withdrawal to address |
| quantity | STRING (decimal) | 0.050000000000000000 | Withdrawal amount entered by the user |
| netQuantity (arriveQuantity) | STRING (decimal) | 0.050000000000000000 | Net amount received |
| status | STRING | failed | Withdrawal status: - Successful - Failed - Withdrawing - Canceled - Canceling |
| statusCode | ENUM | 4 | |
| failedReason | STRING | KYT_FAILED | Withdrawal failed reason: - KYT_FAILED - ASSET_FROZEN_FAILED - ONCHAIN_FAILED |
| feeCoinName | STRING | ETH | Fee Currency Name |
| fee | STRING | 0.00600000 | Handling fee |
| remark | STRING | Test | Remark |
| txId | STRING | 0xbd40b38543767a7d441c87c676ddfaf6cf750e4c7d8d66abd0f1665eb031932a | On-chain transaction ID |
| chainType | STRING | Tron |
Withdraw Status
| statusCode | Description |
|---|---|
| 1 | Withdrawing |
| 2 | KYT Reviewing |
| 3 | Successful |
| 4 | Failed |
| 5 | Canceling |
| 6 | Canceled |
| 7 | On-Chain Processing |
Get Verify Whitelist Address
GET /api/v1/whitelist/verify
- For the same coin & chainType & walletId, if the request parameter "quantity" is specified as the same value, the deposit random amount (Micropayment) will always remain the same.
signAddressparameter is only needed when doing signature verification. (Not for micropayment verification)
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| coin | STRING | Y | USDT | Coin name |
| chainType | ENUM | Y | USDT_ETH | Coin_Chain |
| quantity | STRING | Y | 0.1 | Deposit Amount |
| walletId | STRING | 1667406048590383617 | Wallet Id (Compulsory for PD Omnibus client) | |
| signAddress | STRING | C | 0x7269BC4A66c755b951f068626201090F0C3098e9 | The wallet address provided for Signature verification |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"coin": "USDT",
"depositAddress": "mock0xa9df1c177b4e4f2bb1a180352e9ed663",
"depositAmount": "250.10000000000000000000",
"addressExt": "",
"chainType": "Tron"
}
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| coin | STRING | BTC | Coin name |
| depositAddress | STRING | 0x7c07adb0D2DE76241b262595860b16Cf90615aa0 | Deposit Address (To) |
| depositAmount | STRING | 0.0004 | HashKey specified random deposit amount |
| addressExt | STRING | Other exchanges or wallets may refer to Memo as Digital ID, Tag, Memo, Note, Remark, or Comment. | AddressExt is a unique code used to identify a specific account or user, ensuring that funds are sent to the correct recipient. |
| chainType | STRING | Tron | |
| signPhrase | STRING | It is hereby declared,on 2024/06/27,that I/we own the address 0x7269BC4A66c755b951f068626201090F0C3098e9.Serial Code:82155 | This is a phrase that's required to be signed by user to verify wallet address via signing challenge |
Wallet Signing Verification
POST /api/v1/whitelist/walletSigning
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| coin | STRING | Y | BTC | Coin name |
| chainType | ENUM | Y | BTC_BTC | Coin_ChainType |
| fromAddress | STRING | Y | 0x7269BC4A66c755b951f068626201090F0C3098e9 | The personal address from client's personal wallet |
| signPhrase | STRING | Y | It is hereby declared,on 2024/06/27,that I/we own the address 0x7269BC4A66c755b951f068626201090F0C3098e9.Serial Code:82155 | This is a phrases that's required to be signed by user to verify wallet address via signing challenge |
| signResult | STRING | Y | 1ef75291b26087f4a77e2710c69fe24356c1fdab4480ae341ff85a238172f060173d6cae7f2dbdad0677d0541eb7296b8e5223356e89566de5588640d42502251b | Signature result |
| walletId | STRING | Y | 1667406048590383617 | Wallet Id (Compulsory for PD Omnibus client) |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"msg": "",
"whitelistedAddress": "mj9cjz5VEW7tsFViM2C7xpmS5w1QXwuT85",
"code": "0000",
"sigVerification": true
}
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| msg | STRING | Invalid address. Please verify | Error message |
| whitelistedAddress | STRING | mj9cjz5VEW7tsFViM2C7xpmS5w1QXwuT85 | The personal address from client's personal wallet |
| code | STRING | 0.0004 | Error code number |
| sigVerification | BOOLEAN | TRUE | Indicates whether the signature request was successful. True for success |
Get Deposit Address
GET /api/v1/account/deposit/address
Retrieve deposit address generated by the system. Usually used when fromAddress is already in depositing white list.
If you need to get small amount for verification, please refer to Get Verify Whitelist Address
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| coin | STRING | Y | USDT | Coin name |
| chainType | ENUM | Y | ETH | Chain Type |
| walletId | STRING | 124353535 | Wallet ID (Compulsory for PD Omnibus client) | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"canDeposit": true,
"address": "mock0x7e9dc38bec1542228e02e46e6f8cddd0",
"addressExt": "",
"minQuantity": "0.001",
"needAddressTag": false,
"requiredConfirmTimes": 64,
"canWithdrawConfirmTimes": 64,
"coinType": "CHAIN_TOKEN"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| canDeposit | BOOLEAN | true | Can be deposited |
| address | STRING | 0x7c07adb0D2DE76241b262595860b16Cf90615aa0 | Deposit Address |
| addressExt | STRING | Tag (Not in use) | |
| minQuantity | STRING | 0.001 | Minimum Amount to be deposited |
| needAddressTag | BOOLEAN | false | Is address tag required (Not in use) |
| requiredConfirmTimes | INTEGER | 64 | Credit to account block confirmation (Reference only) |
| canWithdrawConfirmTimes | INTEGER | 64 | Withdrawal block confirmation (Reference only) |
| coinType | STRING | CHAIN_TOKEN | Coin Type |
Get Deposit History
GET /api/v1/account/depositOrders
Deposit Status
| Deposit Type | Description |
|---|---|
| 1 | Pending address authentication 待地址认证 |
| 3 | Deposit failed 充值失败 |
| 4 | Deposit successful 充值成功 |
| 5 | Refunding 退币中 |
| 6 | Refund completed 退币完成 |
| 7 | Refund failed 退币失败 |
| 8 | In the account 上账中 |
| 9 | The first address verification of personal recharge fails 首次验证签名失败,只出现在验签加白流程中 |
| 12 | Deposit processing 充值中 |
Weight: 5
Request Parameters
| PARAMETER | TYPE | Req 'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| coin | STRING | ETH_USDT | Chain_Coin | |
| startTime | LONG | 16500121212121 | Start timestamp | |
| endTime | LONG | 16600131311313 | End timestamp | |
| fromId | INTEGER | 123456 | Starting ID | |
| walletId | STRING | 1667406048590383617 | Wallet ID (Compulsory for PD Omnibus client) | |
| limit | INTEGER | 500 | Default 500; Max 1000 | |
| depositOrderId | STRING | Deposit order ID | Do not support Batch. | |
| clientOrderId | STRING | Client order ID | The unique ID assigned by the client | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"time": "1761145627173",
"depositOrderId": "D768973742990266368",
"coin": "USDT",
"coinName": "USDT",
"address": "usdttro1021",
"addressExt": "",
"quantity": "8988.99990000000000000000",
"status": 4,
"statusCode": "4",
"txId": "37edcfeac8533be4fd1eb83ec4d84cadee877ae4cd738bb59af226ddfc2b31ed",
"walletId": "1978966613676937217",
"clientOrderId": "",
"refundCode": "",
"refundReason": "",
"failureReason": "",
"chainType": "Tron"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| time | STRING | 1691048298420 | Deposit order created Timestamp |
| depositOrderId | STRING | D578755281141776384 | Deposit order ID |
| clientOrderId | STRING | REF-20250428-ETH-789012 | The unique ID assigned by the client |
| coin | STRING | ETH | Coin |
| coinName | STRING | ETH | Coin name |
| address | STRING | 0xa0D6AD420C440de473980117877DEC0a89DAFbeF | Deposit address |
| addressExt | STRING | addressExt is a unique code used to identify a specific account or user, ensuring that funds are sent to the correct recipient. Other exchanges or wallets may refer to Memo as Digital ID, Tag, Memo, Note, Remark, or Comment. |
|
| quantity | STRING (decimal) | 0.05000000000000000000 | Deposit amount |
| refundCode | STRING | RFD-20250428-001 | Refund code |
| refundReason | STRING | Incomplete KYC verification | Refund description |
| status | ENUM | 4 | Deposit status |
| statusCode | ENUM | 4 | Same as status |
| txId | STRING | 0xbd40b38543767a7d441c87c676ddfaf6cf750e4c7d8d66abd0f1665eb031932a | On-chain transaction ID |
| walletId | STRING | 1667406048590383617 | Wallet ID |
| failureReason | STRING | We do not accept deposits from third party exchanges | Failure Reason |
| chainType | STRING | Tron |
Withdraw VA
POST /api/v1/account/withdraw
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| coin | STRING | Y | USDT | Assets |
| clientOrderId | STRING | Y | w12912 | Custom Withdrawal ID (up to 255 characters) |
| address | STRING | Y | 0x13234... | Withdrawal address |
| addressExt | STRING | - | Tag (Not in use) | |
| platform | STRING | C | "HashKeyCustody" "HashKey" |
Trading Platform. Required when withdrawing to another trading platform. Supports HashKey Global only by setting to "HashKey". |
| quantity | DECIMAL | Y | 0.2 | Withdrawal amount |
| chainType | STRING | Y | ETH | Chain Type |
| remark | STRING | Test | Remark | |
| walletId | STRING | 1667406048590383617 | Wallet ID (Compulsory for PD Omnibus client) | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"success": true,
"id": "0",
"orderId": "W778315027390844928",
"accountId": "1954346809338994433",
"clientOrderId": "",
"platform": ""
}
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| success | BOOELEAN | true | Error code |
| platform | STRING | "HashKey" | Target Trading Platform of the withdrawal |
| id | STRING | 0 | ID |
| orderId | STRING | W579805129870495744 | Order ID |
| accountId | STRING | 1644290379632090369 | Wallet ID |
| clientOrderId | STRING | w12912 | Custom Withdrawal ID |
Get Withdraw History
GET /api/v1/account/withdrawOrders
Weight: 5
Request Parameters
| PARAMETER | TYPE | Req 'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| coin | STRING | ETH_USDT | Chain_Coin | |
| startTime | LONG | 16500121212121 | Start timestamp | |
| endTime | LONG | 16600131311313 | End timestamp | |
| remark | STRING | Test | Remark | |
| walletId | STRING | 1667406048590383617 | Wallet ID (Compulsory for PD Omnibus client) | |
| limit | INTEGER | 500 | Default 500; Max 1000 | |
| clientOrderId | STRING | Client order ID | Custom Withdrawal ID | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"time": "1748340070648",
"id": "W715263346031874048",
"coin": "USDT",
"coinId": "USDT",
"coinName": "USDT",
"address": "0xfbC6eFaE3Dd847EF52042b2fd888963938702C5F",
"addressExt": "",
"quantity": "100.00000000",
"arriveQuantity": "100.00000000",
"status": "successful",
"txId": "0x893fd7947a62ec7e525de4720ad10ce7d8da51c37b408f4fc75bde04ab5952a4",
"addressUrl": "0xfbC6eFaE3Dd847EF52042b2fd888963938702C5F",
"feeCoinId": "USDT",
"feeCoinName": "USDT",
"fee": "0.00010000",
"remark": "",
"failedReason": "",
"clientOrderId": "W715263346031874048",
"platform": "",
"chainType": "ETH"
}
]
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| * | Object Array | Query result list | |
| time | STRING | 1691053667700 | Timestamp |
| id | STRING | W474986756938121216 | Withdrawal order ID |
| coin | STRING | ETH | Coin |
| coinId | STRING | ETH | Coin ID |
| coinName | STRING | ETH | Coin Name |
| address | STRING | 0xa0d6ad420c440de473980117877dec0a89dafbef | Withdrawal Address |
| addressExt | STRING | 123456 | addressExt is a unique code used to identify a specific account or user, ensuring that funds are sent to the correct recipient. Other exchanges or wallets may refer to Memo as Digital ID, Tag, Memo, Note, Remark, or Comment. |
| quantity | STRING (decimal) | 0.05000000 | Withdrawal amount entered by the user |
| arriveQuantity | STRING (decimal) | 0.05000000 | Net amount received |
| status | STRING | successful | Status: - failed - withdrawing - successful - canceled - canceling |
| failedReason | STRING | KYT_FAILED | KYT_FAILED ASSET_FROZEN_FAILED ONCHAIN_FAILED |
| txId | STRING | 0x448345d7d95614e19ad2c499be451cdec8d9fa109889f4dab201e3e50f0a06b4 | Transaction ID |
| addressUrl | STRING | 0xa0d6ad420c440de473980117877dec0a89dafbef | Withdrawal address URL (Same as address) |
| feeCoinId | STRING | ETH | Fee Currency ID |
| feeCoinName | STRING | ETH | Fee Currency Name |
| fee | STRING | 0.00600000 | Handling fee |
| remark | STRING | Remark | |
| clientOrderId | STRING | w12912 | Custom Withdrawal ID |
| platform | STRING | ||
| chainType | STRING | ETH |
Get Whitelisted Address
GET /api/v1/account/whitelistAddress
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| coin | STRING | Y | USDT_ETH | Coin_ChainType |
| walletId | STRING | 1667406048590383617 | Wallet Id (Compulsory for PD Omnibus client) | |
| type | STRING | Y | Deposit | Deposit or Withdraw |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"fromAddress": "0xb85f1c7a091ab20f85655e9cde09c9d1d68903d1",
"coin": "USDT",
"chainType": "USDT_ETH"
}
]
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| * | Object Array | ||
| fromAddress | STRING | 0x5507D17587310aD5e71408BDD494003c7D3d0947 | Whitelisted Address |
| coin | STRING | USDT | Coin name |
| chainType | STRING | USDT_Tron | Coin_ChainType |
Deposit Refund
POST /api/v1/account/depositRefund
Weight: 1
Request Parameters
Content-Type:multipart/form-data
Example:
curl -X POST `/api/v1/account/depositRefund`
--header 'Content-Type: multipart/form-data'
--form 'thirdPartyKycProof=@"test1.png"'
--form 'thirdPartyWithdrawRecord=@"test2.png"'
--form 'thirdPartyAddress=@"test3.png"'
| PARAMETER | TYPE | Req 'd | DESCRIPTION |
|---|---|---|---|
| depositOrderId | STRING | Y | Deposit Order ID |
| walletId | STRING | Y | Wallet Id (Compulsory for PD Omnibus client) |
| thirdPartyKycProof | FILE | C | Required if the deposit comes from a third-party exchange wallet. Only image formats .jpg, .png, and .jpeg are accepted. The file size must be less than 1 MB. |
| thirdPartyWithdrawRecord | FILE | C | Required if the deposit comes from a third-party exchange wallet. Only image formats .jpg, .png, and .jpeg are accepted. The file size must be less than 1 MB. |
| thirdPartyAddress | FILE | C | Required if the deposit comes from a third-party exchange wallet. Only image formats .jpg, .png, and .jpeg are accepted. The file size must be less than 1 MB. |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
{
"success": true
}
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| success | BOOLEAN | true | Indicates whether the refund request was successful. True for success |
Post Deposit Refund (PD Omnibus Client Only)
POST /api/v1/account/refundDepositFunds
The Omnibus account is subject to its own KYT standards. HashKey will conduct its KYT checks prior to the Omnibus provider’s evaluation. In scenarios where a transaction passes HashKey’s KYT but is rejected by the Omnibus provider’s KYT process, a refund will be required for the funds that have already been credited to the user’s account.
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| depositOrderId | STRING | Y | Deposit Order ID | |
| walletId | STRING | Wallet Id (Compulsory for PD Omnibus client) | ||
| clientOrderId | STRING | The unique ID assigned by the client | ||
| refundCode | STRING | Y | KYT_FAILED | Refund code: KYT_FAILED, KYC_FAILED, RISK_FAILED, Other |
| refundReason | STRING | Refund description | ||
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"success": true
}
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| success | BOOLEAN | true | Indicates whether the refund request was successful. True for success |
Get Refund Orders
GET /api/v1/account/refundOrders
Weight: 5
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| coin | STRING | ETH | coin | |
| startTime | LONG | 16500121212121 | createdTime refundTime | |
| endTime | LONG | 16600131311313 | createdTime refundTime | |
| walletId | STRING | 1667406048590383617 | Wallet Id (Compulsory for PD Omnibus client) | |
| limit | INTEGER | Limit per page for records. Default: 500, Max: 1000. |
||
| depositOrderId | STRING | Do not support Batch. | ||
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"refundTime": "1761148682188",
"depositOrderId": "D768985655472136192",
"coin": "USDT",
"coinName": "USDT",
"address": "usdtTronreal",
"quantity": "250.1",
"feeQuantity": "0.00010",
"arriveQuantity": "250.0999",
"status": "SUCCESS",
"statusCode": 2,
"txId": "ccf07b87786d65ef3568922202b51a5df20323286eac3ab3253a613443aaedf6",
"walletId": "1954346749805043457",
"refundOrderId": "T768986556664487936",
"chainType": "Tron"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| * | Object Array | ||
| refundTime | STRING | 1691048298420 | Refund order created Timestamp |
| depositOrderId | STRING | D578755281141776384 | Deposit order ID |
| coin | STRING | ETH | Coin |
| coinName | STRING | ETH | Coin name |
| address | STRING | 0xa0D6AD420C440de473980117877DEC0a89DAFbeF | Deposit address |
| quantity | STRING (decimal) | 0.050000000000000000 | Deposit quantity |
| feeQuantity | STRING (decimal) | 0.000500000000000000 | Fee quantity |
| arriveQuantity | STRING (decimal) | 0.049500000000000000 | Actual refunded quantity |
| status | STRING | SUCCESS | Refund status |
| statusCode | ENUM | 1: PROCESSING 2: SUCCESS -1: FAILED |
Refund status code |
| txId | STRING | 0xbd40b38543767a7d441c87c676ddfaf6cf750e4c7d8d66abd0f1665eb031932a | On-chain transaction ID |
| walletId | STRING | 1667406048590383617 | Wallet ID |
| refundOrderId | STRING | T037963209036987876 | Refund Order ID |
| chainType | STRING | Tron |
Get ChainType
GET /api/v1/account/chainType
Get the supported list of ChainType for a specific CoinId(e.g. ETH) ChainType is typically used when deposit & withdrawal
Related Endpoints: Get-Coin-Information, same with network field.
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| coinId | STRING | Y | USDT | Coin Name. e.g: "BTC", "ETH" |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
[
{
"coinId": "USDT",
"coinName": "USDT",
"chainTypeList": [
"ETH",
"Tron"
]
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| * | Object Array | ||
| coinId | STRING | USDT | Coin Name |
| coinName | STRING | USDT | Coin Name |
| chainTypeList | LIST | ["ETH","Tron"] | List of supported chain types. |
Withdraw Fiat
POST /api/v1/account/fiat/withdraw
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| bankAccount | STRING | Y | 12345678 | The bank account number of the designated bank, must be from the added bank list in your account |
| asset | STRING | Y | HKD | "USD", "HKD" |
| amount | STRING | Y | 1000 | Withdrawal Amount |
| remark | STRING | Test | Remark field length limit: 128 characters. | |
| clientOrderId | STRING | 12345678 | An ID defined by the client for the withdrawal order (up to 64 characters) | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | Timestamp |
Response Content
{
"success": true,
"orderId": "NFW781105483524530176",
"clientOrderId": "1234564927431",
"remark": ""
}
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| success | BOOLEAN | true | Error code |
| orderId | STRING | FW480049635179401216 | Fiat Order ID |
| clientOrderId | STRING | 12345678 | An ID defined by the client for the withdrawal order |
| remark | STRING |
Public Market Data (Spot & Futures)
✅ All market-related APIs do not require signature verification and can directly access production data.
Get Exchange Information
GET /api/v1/exchangeInfo
Retrieve current exchange trading rules and symbol information
Types of trading restrictions
| Types | Description |
|---|---|
| PRICE_FILTER | Price limit |
| LOT_SIZE | Limit on the number of transactions |
| MIN_NOTIONAL | Minimum nominal limit |
| TRADE_AMOUNT | Transaction limit |
| LIMIT_TRADING | Limit trading rules |
| MARKET_TRADING | Market trading rules |
| OPEN_QUOTE | Opening Restrictions |
Trading pair status
| Status | Description |
|---|---|
| TRADING | Continuous trading |
| HALT | Trading suspended |
| BREAK | Interruption in trading |
Request Parameters
| PARAMETER | TYPE | Req 'd | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | C | Symbol Name. e.g: "BTCUSD", "BTCUSD-PERPETUAL" |
Response Content
{
"timezone": "UTC",
"serverTime": "1769065913712",
"brokerFilters": [],
"symbols": [
{
"symbol": "ETHUSDT",
"symbolName": "ETHUSDT",
"status": "TRADING",
"baseAsset": "ETH",
"baseAssetName": "ETH",
"baseAssetPrecision": "0.0001",
"baseUcid": "",
"quoteAsset": "USDT",
"quoteAssetName": "USDT",
"quotePrecision": "0.000001",
"quoteUcid": "",
"retailAllowed": true,
"piAllowed": true,
"corporateAllowed": true,
"omnibusAllowed": true,
"icebergAllowed": false,
"isAggregate": false,
"allowMargin": false,
"filters": [
{
"minPrice": "0.01",
"maxPrice": "100000.00000000",
"tickSize": "0.01",
"filterType": "PRICE_FILTER"
},
{
"minQty": "0.005",
"maxQty": "122",
"stepSize": "0.0001",
"marketOrderMinQty": "0.005",
"marketOrderMaxQty": "61",
"filterType": "LOT_SIZE"
},
{
"minNotional": "10",
"filterType": "MIN_NOTIONAL"
},
{
"minAmount": "10",
"maxAmount": "200000",
"minBuyPrice": "0",
"marketOrderMinAmount": "10",
"marketOrderMaxAmount": "100000",
"filterType": "TRADE_AMOUNT"
},
{
"maxSellPrice": "0",
"buyPriceUpRate": "0.2",
"sellPriceDownRate": "0.2",
"maxEntrustNum": 0,
"filterType": "LIMIT_TRADING"
},
{
"buyPriceUpRate": "0.2",
"sellPriceDownRate": "0.2",
"filterType": "MARKET_TRADING"
},
{
"noAllowMarketStartTime": "0",
"noAllowMarketEndTime": "0",
"limitOrderStartTime": "0",
"limitOrderEndTime": "0",
"limitMinPrice": "0",
"limitMaxPrice": "0",
"filterType": "OPEN_QUOTE"
}
]
},
...
],
"options": [],
"contracts": [
{
"filters": [
{
"minPrice": "0.1",
"maxPrice": "100000.00000000",
"tickSize": "0.1",
"filterType": "PRICE_FILTER"
},
{
"minQty": "0.001",
"maxQty": "10",
"stepSize": "0.001",
"marketOrderMinQty": "0.001",
"marketOrderMaxQty": "3",
"filterType": "LOT_SIZE"
},
{
"minNotional": "0",
"filterType": "MIN_NOTIONAL"
},
{
"maxSellPrice": "999999",
"buyPriceUpRate": "0.03",
"sellPriceDownRate": "0.03",
"maxEntrustNum": 200,
"maxConditionNum": 200,
"filterType": "LIMIT_TRADING"
},
{
"buyPriceUpRate": "0.03",
"sellPriceDownRate": "0.03",
"filterType": "MARKET_TRADING"
},
{
"noAllowMarketStartTime": "0",
"noAllowMarketEndTime": "0",
"limitOrderStartTime": "0",
"limitOrderEndTime": "0",
"limitMinPrice": "0",
"limitMaxPrice": "0",
"filterType": "OPEN_QUOTE"
}
],
"exchangeId": "301",
"symbol": "BTCUSD-PERPETUAL",
"symbolName": "BTCUSD-PERPETUAL",
"status": "TRADING",
"baseAsset": "BTC",
"baseAssetPrecision": "0.001",
"quoteAsset": "USD",
"quoteAssetPrecision": "0.1",
"icebergAllowed": false,
"inverse": false,
"index": "BTCUSD",
"marginToken": "USD",
"marginPrecision": "0.0001",
"contractMultiplier": "0.001",
"underlying": "BTC",
"riskLimits": [
{
"riskLimitId": "127",
"quoteQty": "125000.00",
"initialMargin": "0.05",
"maintMargin": "0.025"
},
{
"riskLimitId": "128",
"quoteQty": "250000.00",
"initialMargin": "0.0526",
"maintMargin": "0.0263"
},
{
"riskLimitId": "129",
"quoteQty": "350000.00",
"initialMargin": "0.0555",
"maintMargin": "0.0278"
},
{
"riskLimitId": "130",
"quoteQty": "500000.00",
"initialMargin": "0.0588",
"maintMargin": "0.0294"
},
{
"riskLimitId": "131",
"quoteQty": "600000.00",
"initialMargin": "0.0625",
"maintMargin": "0.0313"
},
{
"riskLimitId": "132",
"quoteQty": "750000.00",
"initialMargin": "0.0666",
"maintMargin": "0.0333"
},
{
"riskLimitId": "133",
"quoteQty": "850000.00",
"initialMargin": "0.0714",
"maintMargin": "0.0357"
},
{
"riskLimitId": "134",
"quoteQty": "1000000.00",
"initialMargin": "0.0769",
"maintMargin": "0.0385"
},
{
"riskLimitId": "135",
"quoteQty": "1150000.00",
"initialMargin": "0.0833",
"maintMargin": "0.0417"
},
{
"riskLimitId": "136",
"quoteQty": "1250000.00",
"initialMargin": "0.0909",
"maintMargin": "0.0455"
},
{
"riskLimitId": "137",
"quoteQty": "2000000.00",
"initialMargin": "0.10",
"maintMargin": "0.05"
},
{
"riskLimitId": "138",
"quoteQty": "2750000.00",
"initialMargin": "0.1111",
"maintMargin": "0.0556"
},
{
"riskLimitId": "139",
"quoteQty": "3500000.00",
"initialMargin": "0.125",
"maintMargin": "0.0625"
},
{
"riskLimitId": "140",
"quoteQty": "4000000.00",
"initialMargin": "0.1428",
"maintMargin": "0.0714"
},
{
"riskLimitId": "141",
"quoteQty": "5000000.00",
"initialMargin": "0.1666",
"maintMargin": "0.0833"
},
{
"riskLimitId": "142",
"quoteQty": "6500000.00",
"initialMargin": "0.20",
"maintMargin": "0.10"
},
{
"riskLimitId": "143",
"quoteQty": "8000000.00",
"initialMargin": "0.25",
"maintMargin": "0.125"
},
{
"riskLimitId": "144",
"quoteQty": "9500000.00",
"initialMargin": "0.3333",
"maintMargin": "0.1667"
},
{
"riskLimitId": "145",
"quoteQty": "12000000.00",
"initialMargin": "0.50",
"maintMargin": "0.25"
},
{
"riskLimitId": "146",
"quoteQty": "14000000.00",
"initialMargin": "1.00",
"maintMargin": "0.50"
}
]
},
...
],
"coins": [
{
"orgId": "9000",
"coinId": "BTC",
"coinName": "BTC",
"coinFullName": "Bitcoin",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/IbL4ltWq4PPtUpZWXQbD-dknhSIMMsW6hn0zFKeHC24.png",
"allowWithdraw": true,
"allowDeposit": true,
"tokenType": "CHAIN_TOKEN",
"cmcId": "",
"chainTypes": [
{
"chainType": "Bitcoin",
"withdrawFee": "0.00003",
"minWithdrawQuantity": "0.005",
"maxWithdrawQuantity": "0",
"minDepositQuantity": "0.0002",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "Bitcoin",
"network": "BTC",
"depositFee": "0",
"refundFee": "0.00006",
"minBlockConfirm": "1",
"canWithdrawConfirmCount": "64"
}
],
"minPrecision": 0,
"depositWithdrawAmtPrecision": 8,
"showPrecision": 8,
"status": 1
},
...
],
"site": "HK"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| timezone | STRING | UTC | Time zone |
| serverTime | INTEGER | 1690084771517 | Server Millisecond Timestamp |
| symbols | Object Array | Currency pair description | |
| symbols.symbol | STRING | BTCUSD | Currency pair |
| symbols.symbolName | STRING | BTCUSD | Currency pair |
| symbols.status | ENUM | TRADING | Trading pair status |
| symbols.baseAsset | STRING | BTC | Base Asset |
| symbols.baseAssetName | STRING | BTC | Name of base asset |
| symbols.baseAssetPrecision | STRING | 0.00001 | Precision of base asset |
| symbols.quoteAsset | STRING | USD | Quoted Asset |
| symbols.quoteAssetName | STRING | USD | Name of quoted asset |
| symbols.quotePrecision | STRING | 0.00000001 | Precision of quoted asset |
| symbols.retailAllowed | BOOLEAN | false | Whether retail client is allowed |
| symbols.piAllowed | BOOLEAN | false | Whether PI client is allowed |
| symbols.corporateAllowed | BOOLEAN | false | Whether Corporate client is allowed |
| symbols.omnibusAllowed | BOOLEAN | true | Whether Omnibus client is allowed |
| symbols.icebergAllowed | BOOLEAN | false | Currently not in use |
| symbols.isAggregate | BOOLEAN | false | Currently not in use |
| symbols.allowMargin | BOOLEAN | false | Currently not in use |
| symbols.filters | Object Array | List of trading pair restrictions | |
| symbols.filters.filterType=PRICE_FILTER | STRING | PRICE_FILTER | Trading restriction type refer to appendix "Trading restriction type" |
| symbols.filters.minPrice | STRING | 0.01 | Depreciated, no longer in-use |
| symbols.filters.maxPrice | STRING | 100000.00000000 | Depreciated, no longer in-use |
| symbols.filters.tickSize | STRING | 0.01 | Minimum price change, only for PRICE_FILTER types |
| symbols.filters.filterType=LOT_SIZE | STRING | LOT_SIZE | Trading restriction type |
| symbols.filters.minQty | STRING | 0.0003 | Minimum number of transactions, only for LOT_SIZE types / 最小交易量 |
| symbols.filters.maxQty | STRING | 4 | Maximum number of transactions, only for LOT_SIZE types / 最大交易量 |
| symbols.filters.stepSize | STRING | 0.00001 | Minimal change in quantity, only used for LOT_SIZE types |
| symbols.filters.marketOrderMinQty | STRING | 1 | Minimum no. of coin for base Asset allowed for Market Order |
| symbols.filters.marketOrderMaxQty | STRING | 10000 | Maximum no. of coin for base Asset allowed Market Orders |
| symbols.filters.filterType=MIN_NOTIONAL | STRING | MIN_NOTIONAL | |
| symbols.filters.minNotional | STRING | 10 | Minimum notional turnover, only for MIN_NOTIONAL types |
| symbols.filters.filterType=TRAD_AMOUNT | STRING | TRADE_AMOUNT | Trading restriction type |
| symbols.filters.minAmount | STRING | 10 | Minimum turnover, only for TRADE_AMOUNT types |
| symbols.filters.maxAmount | STRING | 100000 | Maximum turnover, only for TRADE_AMOUNT types |
| symbols.filters.minBuyPrice | STRING | 0 | Depreciated, no longer in-use |
| symbols.filters.marketOrderMinAmount | STRING | 10 | Minimum cash notional required for Market order / 市价单最小下单金额 |
| symbols.filters.marketOrderMaxAmount | STRING | 200000 | Maximum cash notional allowed for Market order / 市价单最大下单金额 |
| symbols.filters.filterType=LIMIT_TRADING | STRING | ||
| symbols.filters.maxSellPrice | STRING | 0 | Depreciated, no longer in-use |
| symbols.filters.buyPriceUpRate ("filterType": "LIMIT_TRADING") | STRING | 0.2 | Limit Buy cannot be higher than the mark price / 买入不能高于标记价格 |
| symbols.filters.sellPriceDownRate ("filterType": "LIMIT_TRADING") | STRING | 0.2 | Limit Sell cannot be lower than the mark price / 卖出不能低于标记价格 |
| symbols.filters.filterType=MARKET_TRADING | STRING | ||
| symbols.filters.buyPriceUpRate ("filterType": "MARKET_TRADING") | STRING | 0.2 | Market buy cannot be higher than the mark price / 买入不能高于标记价格 |
| symbols.filters.sellPriceDownRate ("filterType": "MARKET_TRADING") | STRING | 0.2 | Market sell cannot be lower than the mark price / 卖出不能低于标记价格 |
| symbols.filters.filterType=OPEN_QUOTE | STRING | ||
| symbols.filters.noAllowMarketStartTime | STRING | 1668483032058 | Market order start time is not allowed, only for OPEN_QUOTE types |
| symbols.filters.noAllowMarketEndTime | STRING | 1668483032058 | Market order end time is not allowed, only for OPEN_QUOTE types |
| symbols.filters.limitOrderStartTime | STRING | 1668483032058 | Time limit order start time, only for OPEN_QUOTE types |
| symbols.filters.limitOrderEndTime | STRING | 1668483032058 | Time limit order end time, only for OPEN_QUOTE types |
| symbols.filters.limitMinPrice | STRING | 0.1 | Lowest price for a limited time limit order, only for OPEN_QUOTE types |
| symbols.filters.limitMaxPrice | STRING | 1000 | Limit order maximum price, only for OPEN_QUOTE types |
| coins | Object Array | Coin description | |
| coins.orgId | STRING (INTEGER) | 9000 | Institution ID |
| coins.coinId | STRING | BTC | Coin ID |
| coins.coinName | STRING | BTC | Coin name |
| coins.coinFullName | STRING | Bitcoin | Coin full name |
| coins.iconUrl | STRING | Icon URL | |
| coins.allowWithdraw | BOOLEAN | true | Whether to allow withdrawal |
| coins.allowDeposit | BOOLEAN | true | Whether to allow deposit |
| coins.tokenType | STRING | ERC20_TOKEN | CHAIN_TOKEN |
| coins.minPrecision | INTEGER | 0 | |
| coins.depositWithdrawAmtPrecision | INTEGER | 8 | Deposit/Withdraw precision |
| coins.showPrecision | INTEGER | 8 | Precision for web page |
| coins.status | INTEGER | 1 | Coin status |
| coins.chainTypes | Object Array | Chain information list | |
| coins.chainTypes.chainType | STRING | BTC | Chain Type |
| coins.chainTypes.withdrawFee | STRING | 0 | Withdrawal fee |
| coins.chainTypes.minWithdrawQuantity | STRING | 0.0001 | Minimum withdrawal amount |
| coins.chainTypes.maxWIthdrawQuantity | STRING | 100 | Maximum withdrawal amount |
| coins.chainTypes.minDepositQuantity | STRING | 0.0002 | Minimum deposit quantity |
| coins.chainTypes.allowDeposit | BOOLEAN | true | Whether to allow deposit |
| coins.chainTypes.allowWithdraw | BOOLEAN | true | Whether to allow withdrawal |
| coins.chainTypes.tokenName | STRING | BTC-BTC_BTC | |
| coins.chainTypes.network | STRING | BTC | Network |
| coins.chainTypes.depositFee | STRING | 0 | Deposit fee |
| coins.chainTypes.refundFee | STRING | 0.0002 | Refund fee |
| coins.chainTypes.minBlockConfirm | STRING | 70 | Credit to account block confirmation |
| coins.chainTypes.canWithdrawConfirmCount | STRING | 70 | Withdrawal block confirmation |
| contracts | Object Array | Contracts related info | |
| contracts.exchangeId | STRING | 301 | Exchange ID |
| contracts.symbol | STRING | BTCUSD-PERPETUAL | Currency pair |
| contracts.symbolName | STRING | BTCUSD-PERPETUAL | Currency pair name |
| contracts.status | STRING | TRADING | Trading pair status. (IN_PREVIEW / TRADING / HALT / RESUMING) |
| contracts.baseAsset | STRING | BTC | Base Asset |
| contracts.baseAssetPrecision | STRING | 0.001 | Precision of base asset |
| contracts.quoteAsset | STRING | USD | Quote Asset |
| contracts.quoteAssetPrecision | STRING | 0.1 | Precision of quote asset |
| contracts.icebergAllowed | BOOLEAN | false | Currently not supported |
| contracts.inverse | BOOLEAN | false | Is reverse contract |
| contracts.index | STRING | BTCUSD | |
| contracts.marginToken | STRING | USD | Quote asset |
| contracts.marginPrecision | STRING | 0.0001 | Margin change precision |
| contracts.contractMultiplier | STRING | 0.001 | Contract multiplier, like 1 contract = 0 001 ETH |
| contracts.underlying | STRING | BTC | |
| contracts.riskLimits | Object Array | Risk limit tiers | |
| contracts.riskLimits.riskLimitId | STRING | 127 | Identifier for the risk limit tier |
| contracts.riskLimits.quoteQty | STRING | 125000.00 | Maximum notional position size allowed for this tier (in quote asset) |
| contracts.riskLimits.initialMargin | STRING | 0.05 | Initial margin ratio |
| contracts.riskLimits.maintMargin | STRING | 0.025 | Maintenance margin ratio |
| contracts.filters | Object Array | List of trading pair restrictions | |
| contracts.filters.filterType=PRICE_FILTER | STRING | PRICE_FILTER | Trading restriction type refer to appendix "Trading restriction type" |
| contracts.filters.minPrice | STRING | 0.01 | Depreciated, no longer in-use |
| contracts.filters.maxPrice | STRING | 100000.00000000 | Depreciated, no longer in-use |
| contracts.filters.tickSize | STRING | 0.01 | Minimum price change, only for PRICE_FILTER types |
| contracts.filters.filterType=LOT_SIZE | STRING | LOT_SIZE | Trading restriction type |
| contracts.filters.minQty | STRING | 0.0003 | Minimum number of transactions, only for LOT_SIZE types / 最小交易量 |
| contracts.filters.maxQty | STRING | 4 | Maximum number of transactions, only for LOT_SIZE types / 最大交易量 |
| contracts.filters.stepSize | STRING | 0.00001 | Minimal change in quantity, only used for LOT_SIZE types |
| contracts.filters.marketOrderMinQty | STRING | 1 | Minimum no. of coin for base Asset allowed for Market Order |
| contracts.filters.marketOrderMaxQty | STRING | 10000 | Maximum no. of coin for base Asset allowed Market Orders |
| contracts.filters.filterType=MIN_NOTIONAL | STRING | MIN_NOTIONAL | |
| contracts.filters.minNotional | STRING | 10 | Minimum notional turnover, only for MIN_NOTIONAL types |
| contracts.filters.filterType=LIMIT_TRADING | STRING | ||
| contracts.filters.maxSellPrice | STRING | 0 | Depreciated, no longer in-use |
| contracts.filters.buyPriceUpRate ("filterType": "LIMIT_TRADING") | STRING | 0.2 | Limit Buy cannot be higher than the mark price / 买入不能高于标记价格 |
| contracts.filters.sellPriceDownRate ("filterType": "LIMIT_TRADING") | STRING | 0.2 | Limit Sell cannot be lower than the mark price / 卖出不能低于标记价格 |
| contracts.filters.maxEntrustNum ("filterType": "LIMIT_TRADING") | INTEGER | 200 | Max regular limit orders allowed |
| contracts.filters.maxConditionNum ("filterType": "LIMIT_TRADING") | INTEGER | 200 | Max conditional orders allowed |
| contracts.filters.filterType=MARKET_TRADING | STRING | ||
| contracts.filters.buyPriceUpRate ("filterType": "MARKET_TRADING") | STRING | 0.2 | Market buy cannot be higher than the mark price / 买入不能高于标记价格 |
| contracts.filters.sellPriceDownRate ("filterType": "MARKET_TRADING") | STRING | 0.2 | Market sell cannot be lower than the mark price / 卖出不能低于标记价格 |
| contracts.filters.filterType=OPEN_QUOTE | STRING | ||
| contracts.filters.noAllowMarketStartTime | STRING | 1668483032058 | Market order start time is not allowed, only for OPEN_QUOTE types |
| contracts.filters.noAllowMarketEndTime | STRING | 1668483032058 | Market order end time is not allowed, only for OPEN_QUOTE types |
| contracts.filters.limitOrderStartTime | STRING | 1668483032058 | Time limit order start time, only for OPEN_QUOTE types |
| contracts.filters.limitOrderEndTime | STRING | 1668483032058 | Time limit order end time, only for OPEN_QUOTE types |
| contracts.filters.limitMinPrice | STRING | 0.1 | Lowest price for a limited time limit order, only for OPEN_QUOTE types |
| contracts.filters.limitMaxPrice | STRING | 1000 | Limit order maximum price, only for OPEN_QUOTE types |
| options | Object Array | Not currently in use | |
| brokerFilters | Object Array | Not currently in use | |
| site | STRING | HK | Currently Only HK |
Get Coin Information
GET /api/v1/coinInfo
Request Parameters
| PARAMETER | TYPE | Req'd | DESCRIPTION |
|---|---|---|---|
| coinId | STRING | C | Coin Name. e.g: "BTC", "ETH" |
Response Content
[
{
"coin": "AAVE",
"coinId": "AAVE",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/e6FzOxnColozdVc6X_IJA_l3ApgIA5BTtkAMq-Fcu28.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 8,
"showPrecision": 8,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": false,
"allowWithdraw": false,
"tokenName": "",
"network": "ETH",
"minWithdrawQuantity": "10",
"minDepositQuantity": "11",
"depositFee": "0",
"withdrawFee": "1",
"refundFee": "1",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "APT",
"coinId": "APT",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/KhUer6z5qM4dy9QbfWiFeXI_qK-e7qi2dC9qDMbFjq4.jpeg",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 8,
"status": 1,
"chainTypes": [
{
"chainType": "Aptos",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Aptos",
"minWithdrawQuantity": "0",
"minDepositQuantity": "0",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "2",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "ARB",
"coinId": "ARB",
"iconUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQpikkNUAt5DDLLL69TVOu-Uc5F99zZq4QvD-Qns-1HRw&s",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 8,
"showPrecision": 8,
"status": 1,
"chainTypes": [
{
"chainType": "Arbitrum",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Arbitrum",
"minWithdrawQuantity": "8",
"minDepositQuantity": "8",
"depositFee": "1",
"withdrawFee": "5",
"refundFee": "8",
"minBlockConfirm": "2",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "ATOM",
"coinId": "ATOM",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/Jj0HxidAYwo8_0AP4eHgBHk2HL3NZ1DK7GqPQRAX5TQ.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "Cosmos",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Cosmos",
"minWithdrawQuantity": "0",
"minDepositQuantity": "0",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "1",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "AVAX",
"coinId": "AVAX",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/TlxL0rQdZUidbbrmoDyzEaY9-l2wgkO1mODMz8XQ9y8.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 8,
"showPrecision": 8,
"status": 1,
"chainTypes": [
{
"chainType": "AvalancheC",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "AVAX",
"network": "AvalancheC",
"minWithdrawQuantity": "0.000001",
"minDepositQuantity": "0.000001",
"depositFee": "0.000001",
"withdrawFee": "0.000001",
"refundFee": "0.000001",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "BTC",
"coinId": "BTC",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/IbL4ltWq4PPtUpZWXQbD-dknhSIMMsW6hn0zFKeHC24.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 8,
"showPrecision": 8,
"status": 1,
"chainTypes": [
{
"chainType": "Bitcoin",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "Bitcoin",
"network": "BTC",
"minWithdrawQuantity": "0.00000547",
"minDepositQuantity": "0.00000547",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "1",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "CNH",
"coinId": "CNH",
"iconUrl": "https://static.hashkey.com/images/bank/CNH.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": []
},
{
"coin": "COMP",
"coinId": "COMP",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/Vg1HSOP_lazr-A0vGArMDPqWekQH_BHdNU31oKTzRiA.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": false,
"allowWithdraw": false,
"tokenName": "",
"network": "ETH",
"minWithdrawQuantity": "10",
"minDepositQuantity": "11",
"depositFee": "0",
"withdrawFee": "1",
"refundFee": "1",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "DOGE",
"coinId": "DOGE",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/R_aGkBulMZL4ZyPcReffPm6zxJwl2aIEnD_n4ZlqE-8.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "Dogecoin",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Dogecoin",
"minWithdrawQuantity": "0.1",
"minDepositQuantity": "0.2",
"depositFee": "0.0001",
"withdrawFee": "0.0555",
"refundFee": "0.0003",
"minBlockConfirm": "3",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "DOT",
"coinId": "DOT",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/niNCJh9Jd0RrE2Fk7q8724qYM61-dDNRYZID6RyOjME.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "Polkadot",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Polkadot",
"minWithdrawQuantity": "0",
"minDepositQuantity": "0",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "1",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "DYDX",
"coinId": "DYDX",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/T_JIL5_WBEgvHgU8zC-AHABPmZp7BaLFR83xFZyEK6M.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": false,
"allowWithdraw": false,
"tokenName": "",
"network": "ETH",
"minWithdrawQuantity": "20",
"minDepositQuantity": "11",
"depositFee": "0",
"withdrawFee": "1",
"refundFee": "1",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "ETH",
"coinId": "ETH",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/VfBWkOTCtOknVa8JeJKVfielh4ruLlyS432ch_s0DZA.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 8,
"showPrecision": 8,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "ERC20",
"network": "ETH",
"minWithdrawQuantity": "0.00001",
"minDepositQuantity": "0.00001",
"depositFee": "0",
"withdrawFee": "0.00000001",
"refundFee": "0.00000001",
"minBlockConfirm": "40",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "HKD",
"coinId": "HKD",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/bBz46VW02-vYZ-ZAduqniUb4r9obyPcZlFgehbCWJi8.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 2,
"showPrecision": 2,
"status": 1,
"chainTypes": []
},
{
"coin": "IMX",
"coinId": "IMX",
"iconUrl": "https://research.binance.com/static/images/projects/immutable-x/logo.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "ETH",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "ETH",
"minWithdrawQuantity": "1",
"minDepositQuantity": "2",
"depositFee": "0.1",
"withdrawFee": "0.2",
"refundFee": "0.3",
"minBlockConfirm": "2",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "IOTX",
"coinId": "IOTX",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/R_aGkBulMZL4ZyPcReffPm6zxJwl2aIEnD_n4ZlqE-8.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 18,
"showPrecision": 18,
"status": 1,
"chainTypes": [
{
"chainType": "Iotex",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Iotex",
"minWithdrawQuantity": "0.001",
"minDepositQuantity": "0.001",
"depositFee": "0.0001",
"withdrawFee": "0.0001",
"refundFee": "0",
"minBlockConfirm": "1",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "LDO",
"coinId": "LDO",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/Dnz_gLf02Z1oHERBaBIxHvZsDHgay_XrJndcMILQeyU.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": false,
"allowWithdraw": false,
"tokenName": "",
"network": "ETH",
"minWithdrawQuantity": "10",
"minDepositQuantity": "11",
"depositFee": "0",
"withdrawFee": "1",
"refundFee": "1",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "LINK",
"coinId": "LINK",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/dQ_6xEYCR5WRd8MeNXguG8MnkwlB6dolhHs-R996Sk0.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 18,
"showPrecision": 18,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "ETH",
"minWithdrawQuantity": "10",
"minDepositQuantity": "11",
"depositFee": "0",
"withdrawFee": "1",
"refundFee": "1",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "LTC",
"coinId": "LTC",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/5EVWmrj35DVudvh5H3NtYOsr8OHviBoo9zy9UYlL6Us.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "LTC",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "LTC",
"minWithdrawQuantity": "0",
"minDepositQuantity": "0",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "2",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "MATIC",
"coinId": "MATIC",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/C_2gaTnKzuFuXBgIg-2T6Wx4Bh1o6SF9MAZzFt1cQKc.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 8,
"showPrecision": 8,
"status": 1,
"chainTypes": []
},
{
"coin": "MKR",
"coinId": "MKR",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/EY5xPojD-LkWzL95GWiFcKlUSd4rK4n9pZMvtlY99Dw.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": false,
"allowWithdraw": false,
"tokenName": "",
"network": "ETH",
"minWithdrawQuantity": "10",
"minDepositQuantity": "11",
"depositFee": "0",
"withdrawFee": "1",
"refundFee": "1",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "OP",
"coinId": "OP",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/A8RXILNBgA52Lp4Gjb2z2x_RqKKm91NPxS3N-pFr21A.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "OP",
"allowDeposit": false,
"allowWithdraw": false,
"tokenName": "",
"network": "Optimism",
"minWithdrawQuantity": "0",
"minDepositQuantity": "0",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "20",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "POL",
"coinId": "POL",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/su1k7sOvv4608TvbDTqYgfuNJAD_9sAH0jy8bvt56Yk.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "Polygon",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "POL",
"network": "Polygon",
"minWithdrawQuantity": "0.000001",
"minDepositQuantity": "0.000001",
"depositFee": "0.000001",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "32",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "RNDR",
"coinId": "RNDR",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/omSmXzq1WUo0tbxVqT07AwXKVtQ8ePgp5a6uVtW6xic.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": false,
"allowWithdraw": false,
"tokenName": "",
"network": "ETH",
"minWithdrawQuantity": "10",
"minDepositQuantity": "11",
"depositFee": "0",
"withdrawFee": "1",
"refundFee": "1",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "SNX",
"coinId": "SNX",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/QtV-vhBYein8MQwofTvy0ECDuiShzrpi0OGj_al1uMg.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": false,
"allowWithdraw": false,
"tokenName": "",
"network": "ETH",
"minWithdrawQuantity": "10",
"minDepositQuantity": "11",
"depositFee": "0",
"withdrawFee": "0.1",
"refundFee": "0.1",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "SOL",
"coinId": "SOL",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/R_aGkBulMZL4ZyPcReffPm6zxJwl2aIEnD_n4ZlqE-8.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "SOL",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Solana",
"minWithdrawQuantity": "0.001",
"minDepositQuantity": "0.001",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "1",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "SPICE",
"coinId": "SPICE",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/0nmhIdA4kydSjaZwk3pcNrYGguyESCMcHqkMoVvl-4E.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 8,
"showPrecision": 8,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "ERC20",
"network": "ETH",
"minWithdrawQuantity": "20",
"minDepositQuantity": "1",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "70",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "TON",
"coinId": "TON",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/k8ZnH3faFbJT8yqlouhdZ4w9maMkps-zWy79p0tCn5Q.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 4,
"showPrecision": 8,
"status": 1,
"chainTypes": [
{
"chainType": "TON",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "TON",
"minWithdrawQuantity": "0",
"minDepositQuantity": "0",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "20",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "TRX",
"coinId": "TRX",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/PHLOUOovJ7qxEYS9mNOQmYTm9dbbLLMTR9OXQ2H3VPU.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "Tron",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Tron",
"minWithdrawQuantity": "0.01",
"minDepositQuantity": "0.01",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "UNI",
"coinId": "UNI",
"iconUrl": "https://hashkey-ex-prod.s3.ap-east-1.amazonaws.com/bhop/image/qsgo0fqVV93Q7ifRv2wr593m-wk_1OZNkgtjKT0Q8QA.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 0,
"showPrecision": 0,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": false,
"allowWithdraw": false,
"tokenName": "",
"network": "ETH",
"minWithdrawQuantity": "10",
"minDepositQuantity": "11",
"depositFee": "0",
"withdrawFee": "1",
"refundFee": "1",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "USD",
"coinId": "USD",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/tgmgHvSi5K99DgHDaRiawydrLsyqezhiuWZ1INh4QTQ.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 2,
"showPrecision": 2,
"status": 1,
"chainTypes": []
},
{
"coin": "USDC",
"coinId": "USDC",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/Bm-QKwuQTP9xX90ytKOvsDN_HamqEfXpF2NzLEtgV30.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 6,
"showPrecision": 6,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "ERC20",
"network": "ETH",
"minWithdrawQuantity": "0.001",
"minDepositQuantity": "10",
"depositFee": "0",
"withdrawFee": "0.0001",
"refundFee": "64",
"minBlockConfirm": "70",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "USDT",
"coinId": "USDT",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/jkN6HxLcXG5ttXavzdilB8QamRputgBMRiRqtLLgqBc.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 6,
"showPrecision": 6,
"status": 1,
"chainTypes": [
{
"chainType": "ERC20",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "ERC20",
"network": "ETH",
"minWithdrawQuantity": "0.001",
"minDepositQuantity": "0.001",
"depositFee": "0",
"withdrawFee": "0.0001",
"refundFee": "0.0001",
"minBlockConfirm": "64",
"canWithdrawConfirmCount": "64"
},
{
"chainType": "Tron",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Tron",
"minWithdrawQuantity": "0.01",
"minDepositQuantity": "0.01",
"depositFee": "0.0001",
"withdrawFee": "0.0001",
"refundFee": "0.0001",
"minBlockConfirm": "10",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "USDTARB",
"coinId": "USDTARB",
"iconUrl": "https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQpikkNUAt5DDLLL69TVOu-Uc5F99zZq4QvD-Qns-1HRw&s",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 6,
"showPrecision": 6,
"status": 1,
"chainTypes": [
{
"chainType": "Arbitrum",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Arbitrum",
"minWithdrawQuantity": "0",
"minDepositQuantity": "0",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "64",
"canWithdrawConfirmCount": "64"
}
]
},
{
"coin": "XRP",
"coinId": "XRP",
"iconUrl": "https://hashkey-ex-stg.s3.ap-east-1.amazonaws.com/bhop/image/R_aGkBulMZL4ZyPcReffPm6zxJwl2aIEnD_n4ZlqE-8.png",
"minPrecision": 0,
"depositWithdrawAmtPrecision": 18,
"showPrecision": 18,
"status": 1,
"chainTypes": [
{
"chainType": "Ripple",
"allowDeposit": true,
"allowWithdraw": true,
"tokenName": "",
"network": "Ripple",
"minWithdrawQuantity": "2",
"minDepositQuantity": "2",
"depositFee": "0",
"withdrawFee": "0",
"refundFee": "0",
"minBlockConfirm": "1",
"canWithdrawConfirmCount": "64"
}
]
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| coin | STRING | BTC | coin, BTC, USDT, etc. (tokenId filed on above link) |
| coinId | STRING | BTC | TokenId |
| iconUrl | STRING | Token icon URL | |
| minPrecision | INTEGER | 0 | Minimum precision |
| depositWithdrawAmtPrecision | INTEGER | 8 | Deposit/withdrawal amount precision |
| showPrecision | INTEGER | 8 | Web display precision |
| status | INTEGER | 1 | Token status (1 = enabled) |
| chainTypes | Object Array | Supported blockchain types and deposit/withdrawal rules | |
| chainTypes.chainType | STRING | Blockchain type (e.g., ERC20, TRC20) | |
| chainTypes.allowDeposit | BOOLEAN | true | Whether deposit to this chain is allowed |
| chainTypes.allowWithdraw | BOOLEAN | true | Whether withdrawal from this chain is allowed |
| chainTypes.tokenName | STRING | Token name | |
| chainTypes.network | STRING | Network name (e.g., ETH mainnet) | |
| chainTypes.minWithdrawQuantity | STRING | Minimum withdrawal amount for this chain (string representation of number) | |
| chainTypes.minDepositQuantity | STRING | Minimum deposit amount for this chain (string representation of number) | |
| chainTypes.depositFee | STRING | Deposit fee (string representation of number, 0 = free) | |
| chainTypes.withdrawFee | STRING | Withdrawal fee (string representation of number) | |
| chainTypes.refundFee | STRING | Refund fee (string representation of number) | |
| chainTypes.minBlockConfirm | STRING | Reference only | Minimum block confirmations required for deposit (string representation) |
| chainTypes.canWithdrawConfirmCount | STRING | Reference only | Confirmations required for withdrawal (string representation) |
Get Order book
GET /quote/v1/depth
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | ETHUSD | Currency pair |
| limit | INTEGER | C | 200 | The number of layers for each direction. Maximum value is 200. Default is 100. |
Response Content
{
"t": 1764059245287,
"b": [
[
"87473.15",
"0.05805"
],
[
"87473.14",
"0.01143"
]
],
"a": [
[
"87474.35",
"0.00114"
],
[
"87476.61",
"0.00045"
]
]
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| t | LONG | 1764059245287 | Timestamp |
| b | Array of Arrays | Buying direction | |
| 1st element | STRING | 29830.76 | Bid price |
| 2nd element | STRING | 0.0005 | Bid quantity |
| ... | |||
| a | Array of Arrays | Selling direction | |
| 1st element | STRING | 29938.49 | Ask price |
| 2nd element | STRING | 0.0005 | Ask quantity |
| ... |
Get Recent Trade List
GET /quote/v1/trades
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | ETHUSD | Currency pair |
| limit | INTEGER | C | 100 | The number of trades. Maximum value is 100. Default is 100. |
Response Content
[
{
"t": 1764059593000,
"p": "87371.47",
"q": "0.02",
"ibm": false
},
{
"t": 1764059593105,
"p": "87371.47",
"q": "0.16",
"ibm": false
},
{
"t": 1764059594244,
"p": "87380.06",
"q": "0.01",
"ibm": false
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| * | Object Array | Latest trades list | |
| t | LONG | 1764059594244 | Traded timestamp |
| p | STRING | 87380.06 | Traded price |
| q | STRING | 0.01 | Volume |
| ibm | BOOLEAN | true | true: buyer's maker order false: seller's maker order |
Get Kline
GET /quote/v1/klines
K-line/candlestick chart interval
m → minutes; h → hours; d → days; w → weeks; M → months
- 1m
- 3m
- 5m
- 15m
- 30m
- 1h
- 2h
- 4h
- 6h
- 8h
- 12h
- 1d
- 1w
- 1M
Request Parameters
| PARAMETER | TYPE | Req 'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | ETHUSDT | Currency pair |
| interval | ENUM | Y | 1m | Time interval |
| limit | INTEGER | 10 | Return the number of bars, the maximum value is 1000 | |
| startTime | INTEGER | 1478692862000 | Start Time | |
| endTime | INTEGER | 1478696782000 | End Time |
Response Content
[
[
1764060480000,
"87302.7",
"87302.7",
"87250.01",
"87253.5",
"0.75208",
0,
"65638.0063012",
24,
"0.47836",
"41743.2370115"
],
[
1764060540000,
"87253.5",
"87253.5",
"87174.8",
"87223.25",
"1.8703",
0,
"163160.9249324",
14,
"0.17625",
"15365.019864"
],
[
1764060600000,
"87223.25",
"87223.25",
"87223.25",
"87223.25",
"0",
0,
"0",
0,
"0",
"0"
]
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| - | Array of Arrays | Kline information list | |
| (kline_open_time) | LONG | 1764060600000 | Opening timestamp |
| (open_price) | STRING | 29871.34 | Open Price |
| (high_price) | STRING | 29871.34 | High Price |
| (low_price) | STRING | 29773.82 | Low Price |
| (close_price) | STRING | 29863.45 | Close Price |
| (volume) | STRING | 0.00602 | Trading volume |
| (kline_close_time) | INTEGER | 0 | Closing timestamp |
| (quote_asset_volume) | STRING | 179.5946714 | Quote Asset Volume |
| (number_of_trades) | INTEGER | 14 | Number of Trades |
| (taker_buy_base_asset_volume) | STRING | 0.004 | Taker buy base asset volume |
| (taker_buy_quote_asset_volume) | STRING | 119.41295 | Taker buy quote asset volume |
Get 24hr Ticker Price Change
GET /quote/v1/ticker/24hr
Retrieve the 24 hours rolling price change
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | ETHUSD | Currency pair |
Response Content
[
{
"t": 1764061080001,
"s": "BTCUSD",
"c": "87000.01",
"h": "89197.91",
"l": "85253.6",
"o": "86920.6",
"b": "87007.78",
"a": "87011.52",
"v": "250.89096",
"qv": "21885333.4906587",
"it": "SPOT"
}
]
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| - | Object Array | 24hrs price change list | |
| t | LONG | 1764061080001 | Millisecond timeStamp |
| s | STRING | BTCUSD | Symbol |
| c | STRING | 29832.76 | Latest traded price |
| h | STRING | 30050.21 | Highest price |
| l | STRING | 29568.84 | Lowest price |
| o | STRING | 29845.03 | Opening price |
| b | STRING | 29830.76 | Highest bid |
| a | STRING | 29938.49 | Highest selling price |
| v | STRING | 2.09774 | Total trade volume (in base asset) |
| qv | STRING | 62639.2417592 | Total trade volume (in quote asset) |
| it | STRING | SPOT | SPOT、FUTURES、ANY |
Get Symbol Price Ticker
GET /quote/v1/ticker/price
Retrieve the latest price by ticker
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | ETHUSD | Currency pair |
Response Content
[
{
"s": "BTCUSD",
"p": "87037.97"
}
]
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| - | Object Array | Latest transaction price | |
| s | STRING | BTCUSD | Symbol |
| p | STRING | 87037.97 | Latest traded price |
Get Symbol current Top of book
GET /quote/v1/ticker/bookTicker
Retrieve current top order book by symbol
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | ETHUSD | Currency pair |
Response Content
[
{
"s": "BTCUSD",
"b": "86953.92",
"bq": "1.01969",
"a": "86953.93",
"aq": "0.07897",
"t": 1764061843241
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| - | Object Array | Retrieve current top order book by symbol | |
| s | STRING | BTCUSD | Symbol |
| b | STRING | 86953.92 | Top of book Bid Price |
| bq | STRING | 1.01969 | Top of book Bid Quantity |
| a | STRING | 86953.93 | Top of book Ask Price |
| aq | STRING | 0.07897 | Top of book Ask Quantity |
| t | LONG | 1764061843241 | Timestamp |
Get Merge Depth
GET /quote/v1/depth/merged
Query aggregation market depth
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSD | Currency pair |
| limit | INTEGER | 10 | The number of layers for each direction. Maximum value is 200. Default is 100. | |
| scale | INTEGER | 1 | Level of layers 0,1,2,3,4,5. E.g. 0 represents 1 layer, 1 represents 2 layers |
Response Content
{
"t": 1764062282774,
"b": [
[
"86818.9",
"1.0214"
],
[
"86815.43",
"0.26493"
],
[
"86813.94",
"0.02483"
]
],
"a": [
[
"86818.91",
"0.00115"
],
[
"86820.12",
"0.00046"
],
[
"86822.38",
"0.26491"
]
]
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| t | LONG | 1764059245287 | Timestamp |
| b | Array of Arrays | Buying direction | |
| 1st element | STRING | 29830.76 | Bid price |
| 2nd element | STRING | 0.0005 | Bid quantity |
| ... | |||
| a | Array of Arrays | Selling direction | |
| 1st element | STRING | 29938.49 | Ask price |
| 2nd element | STRING | 0.0005 | Ask quantity |
| ... |
Get Mark Price
GET /quote/v2/markPrice
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSD-PERPETUAL | Currency pair |
Response Content
{
"symbolId": "BTCUSD-PERPETUAL",
"price": "89768.358",
"time": 1769068545000
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| symbolId | STRING | BTCUSD-PERPETUAL | Symbol |
| price | STRING | 89768.358 | Mark price |
| time | LONG | 1769068545000 | Timestamp |
Get Index Price
GET /quote/v2/index
Request Parameters
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | BTCUSD | Currency pair |
Response Content
{
"index": {
"BTCUSD": "89932.112"
},
"edp": {
"BTCUSD": "89950.99238048"
}
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| index | OBJECT | Index Price | |
| index.BTCUSD | STRING | 88872.674 | |
| ... | |||
| edp | OBJECT | The average of the index for the last 10 minutes | |
| edp.BTCUSD | STRING | 88871.27269 | |
| ... |
Miscellaneous
Test Connectivity
GET /api/v1/ping
Test connectivity to ensure valid Status 200 OK
Weight: 1
Request Parameters
Empty
Response Content
{}
{}
Check Server Time
GET /api/v1/time
Test the connection and returns the current server time (in UNIX timestamp in milliseconds)
Weight: 1
Request Parameters
Empty
Response Content
{
"serverTime": 1764229341307
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| serverTime | LONG | 1764229341307 | Server Millisecond Timestamp |
Create Listen Key
POST /api/v1/userDataStream
Create a single Listen Key. Valid for 60 minutes.
Reminder
- Start a new user data stream.
- The stream will close after 60 minutes unless a keepalive is sent.
- Recommended to send a reset request every 30 minutes. Reset-Listen-Key
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | DESCRIPTION |
|---|---|---|---|
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
{
"listenKey": "MKxPTRoLXBBhlRseAUaDyWyZVjiNxCVqcaUasZidmByckGjUcLBKKcopKbvUfORD"
}
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| listenKey | STRING | MKxPTRoLXBBhlRseAUaDyWyZVjiNxCVqcaUasZidmByckGjUcLBKKcopKbvUfORD | Key to subscribe websocket feeds |
Reset Listen Key
PUT /api/v1/userDataStream
Reset validity time of a listenKey to 60 minutes.
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | DESCRIPTION |
|---|---|---|---|
| listenKey | STRING | Y | Key to reset |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
{}
{}
Delete Listen Key
DELETE /api/v1/userDataStream
Delete a single Listen Key.
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req 'd | DESCRIPTION |
|---|---|---|---|
| listenKey | STRING | Y | Key to delete |
| recvWindow | LONG | Recv Window. Default 5000 | |
| timestamp | LONG | Y | Timestamp |
Response Content
{}
{}
Convert Currency (FX)
💰 FX Service is now available via API, for more details please refer to our website page: https://www.hashkey.com/en-US/currency-converter
Get FX Quote Pairs
GET /api/v1/convertCurrency/getQuotePair
Get the supported currency quote pair for converting currency
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"quotePair": [
"HKDUSD",
"USDHKD"
]
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| quotePair | Object Array | USDHKD, HKDUSD | A currency pair with format XXXYYY. XXX represents the base currency, and YYY represents the quote currency. There is no separator between the base and quote currency. The currency pair is capitalized |
Get FX Quote
GET /api/v1/convertCurrency/getQuote
Get the quote for currency conversion. Must get quote before requesting a currency conversion order
Weight: 1 time / second
Request Parameters
| PARAMETER | TYPE | Req'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| buyCurrency | STRING | Y | HKD | The currency which the client wants to buy from the bank |
| sellCurrency | STRING | Y | USD | The currency which the client wants to sell to the bank |
| sellAmount | STRING | Y | The amount in sellCurrency, only sellAmount allowed. | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"quoteId": "8718768dd9fe48cd81e1e1c9b7e90b84",
"buyCurrency": "HKD",
"sellCurrency": "USD",
"rate": "0.128126",
"quoteCreatedTime": 1766052234074,
"quoteExpiryTime": 1766052294074,
"sellAmount": "1000",
"channel": "SC_SCALE"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| quoteId | STRING | 9c36513793f54f37a4960a6fa88dd99e | A unique reference ID for this quote |
| channel | STRING | SC_SCALEFX_DBSC_SELF |
|
| buyCurrency | STRING | HKD | Currency to buy |
| sellCurrency | STRING | USD | Currency to sell |
| sellAmount | STRING | ||
| rate | STRING (DECIMAL) |
0.1288084 | Indicative rate |
| quoteCreatedTime | LONG | 1764234287384 | Rates are effective as of this timestamp |
| quoteExpiryTime | LONG | 1764234347384 | Rates are valid until this timestamp |
FX Transact
POST /api/v1/convertCurrency/transact
Place an order for currency conversion
Weight: 1 time / second
Request Parameters
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| quoteId | STRING | Y | 9c36513793f54f37a4960a6fa88dd99e | A unique reference ID for this quote. Generated from the response via getQuote endpoint. |
| clientOrderId | STRING | 122455 | An ID defined by the client for the order; it will be automatically generated if not sent in the request. | |
| buyCurrency | STRING | Y | HKD | The currency which the client wants to buy. |
| sellCurrency | STRING | Y | USD | The currency which the client wants to sell. |
| sellAmount | STRING (DECIMAL) |
Y | The amount which the client wants to sell to the bank in sellCurrency. | |
| channel | STRING | Y | SC_SCALEFX_DBSC_SELF |
|
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"accountId": 1960136146617964034,
"quoteId": "613b70e6f124459bacbf9c00fcf2b8d9",
"clientOrderId": "",
"orderId": "FX789555031527510016",
"status": "IN_PROGRESS",
"buyCurrency": "HKD",
"sellCurrency": "USD",
"buyAmount": "7804.82",
"sellAmount": "1000.00",
"rate": "0.128126",
"transactTime": 1766052589324
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| accountId | LONG | 1644290379632090370 | Account number |
| quoteId | STRING | 8f92785969df4683a4a688cd8b9f9533 | A unique reference ID for this quote |
| clientOrderId | STRING | 122455 | An ID defined by the client for the order; it will be automatically generated if not sent in the request |
| orderId | STRING | FX624613599962509312 | The orderId generated by HashKey |
| status | STRING | IN_PROGRESS | Status of transaction |
| buyCurrency | STRING | HKD | Currency to buy |
| sellCurrency | STRING | USD | Currency to sell |
| buyAmount | STRING (DECIMAL) |
1000 | The amount which the client wants to buy from the bank in buyCurrency. Only one amount out of buyAmount & sellAmount should be specified |
| sellAmount | STRING (DECIMAL) |
128.126000 | The amount which the client wants to sell to the bank in sellCurrency. Only one amount out of buyAmount & sellAmount should be specified |
| rate | STRING (DECIMAL) |
0.128126 | Indicative rate |
| transactTime | LONG | 1726727487548 | Timestamp in milliseconds |
Get FX Transaction History
GET /api/v1/convertCurrency/transactStatus
Get the status for currency conversion transaction
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| orderId | STRING | C | FX624613599962509312 | The orderId generated by HashKey. Can be used for filter |
| limit | INTEGER | Limit per page for records. Default: 500, Max: 1000. | ||
| status | ENUM | C | EXECUTED,FAILED | Status of transaction filter. Enum: IN PROGRESS / EXECUTED / FAILED, supports multiple status values separated by comma, e.g. "EXECUTED,FAILED" |
| startTime | LONG | Y | 1751870337876 | createTime filter |
| endTime | LONG | Y | 1751870337876 | createTime filter |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"code": "0",
"message": "Success",
"fxOrders": [
{
"orderId": "FX730082338934349824",
"accountId": 1816094214250944000,
"status": "IN_PROGRESS",
"buyCurrency": "USD",
"sellCurrency": "JPY",
"buyAmount": "100.5000",
"sellAmount": "14536.0000",
"rate": "144.637681",
"transactTime": 1751873193875,
"quoteId": "de3e332cc5a84ffba474078e1c0298f9"
},
{
"orderId": "FX730080200120328192",
"accountId": 1816094214250944000,
"status": "IN_PROGRESS",
"buyCurrency": "USD",
"sellCurrency": "HKD",
"buyAmount": "1000.0000",
"sellAmount": "7789.2000",
"rate": "7.789201",
"transactTime": 1751872683942,
"quoteId": "7efb8fb4d0384116a4c0f225e4ef9e6d"
}
]
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| code | STRING | 0 | |
| message | STRING | Success | |
| fxOrders | Object Array | Order List | |
| * accountId | LONG | 1644290379632090370 | Account number |
| * orderId | STRING | FX624613599962509312 | The orderId generated by HashKey |
| * status | STRING | IN_PROGRESS | Status of transaction. Enum: IN PROGRESS / EXECUTED / FAILED |
| * buyCurrency | STRING | HKD | Currency to buy |
| * sellCurrency | STRING | USD | Currency to sell |
| * buyAmount | STRING (DECIMAL) |
1000.0000 | The amount which the client wants to buy from the bank in buyCurrency. Only one amount out of buyAmount & sellAmount should be specified |
| * sellAmount | STRING (DECIMAL) |
128.1260 | The amount which the client wants to sell to the bank in sellCurrency. Only one amount out of buyAmount & sellAmount should be specified |
| * rate | STRING (DECIMAL) |
0.128126 | Indicative rate |
| * transactTime | LONG | 1726727486992 | Timestamp in milliseconds |
| * quoteId | STRING | de3e332cc5a84ffba474078e1c0298f9 |
Market Place
Get MP Quote Pairs
GET /api/v1/market-place/get-pairs
Get a list of tradable quote pairs
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"quotePair": [
{
"baseCcy": "USDC",
"quoteCcy": "USD",
"basePrecision": "0.0001",
"quotePrecision": "0.01",
"retailAllowed": false,
"minTradeBaseQuantity": "10.0019",
"maxTradeBaseQuantity": "100019.313",
"minTradeQuoteQuantity": "10",
"maxTradeQuoteQuantity": "100000",
"piAllowed": true,
"corporateAllowed": true,
"omnibusAllowed": true,
"institutionAllowed": true,
"tradingStatus": "OPENED",
"isSTO": 0
},
{
"baseCcy": "BTC",
"quoteCcy": "USDT",
"basePrecision": "0.00001",
"quotePrecision": "0.00001",
"retailAllowed": true,
"minTradeBaseQuantity": "0.0001",
"maxTradeBaseQuantity": "103.91093",
"minTradeQuoteQuantity": "10.00293",
"maxTradeQuoteQuantity": "10002931.5",
"piAllowed": true,
"corporateAllowed": true,
"omnibusAllowed": true,
"institutionAllowed": false,
"tradingStatus": "OPENED",
"isSTO": 0
},
{
"baseCcy": "ETH",
"quoteCcy": "USDT",
"basePrecision": "0.0001",
"quotePrecision": "0.0001",
"retailAllowed": false,
"minTradeBaseQuantity": "0.0003",
"maxTradeBaseQuantity": "30.1838",
"minTradeQuoteQuantity": "1.0002",
"maxTradeQuoteQuantity": "100029.315",
"piAllowed": true,
"corporateAllowed": true,
"omnibusAllowed": true,
"institutionAllowed": true,
"tradingStatus": "OPENED",
"isSTO": 0
},
{
"baseCcy": "ETH",
"quoteCcy": "USDC",
"basePrecision": "0.0001",
"quotePrecision": "0.0001",
"retailAllowed": false,
"minTradeBaseQuantity": "0.003",
"maxTradeBaseQuantity": "30.1838",
"minTradeQuoteQuantity": "10.0019",
"maxTradeQuoteQuantity": "100019.313",
"piAllowed": true,
"corporateAllowed": true,
"omnibusAllowed": true,
"institutionAllowed": true,
"tradingStatus": "OPENED",
"isSTO": 0
}
]
}
| Parameter | Type | Example Value | Description |
|---|---|---|---|
| quotePair | Object Array | ETHUSD | Returns a list of currency pairs for Request for Quote |
| baseCcy | STRING | ETH | Base currency |
| quoteCcy | STRING | USD | Quote currency |
| basePrecision | STRING | 0.0001 | Precision of base currency |
| quotePrecision | STRING | 0.000001 | Precision of quote currency |
| retailAllowed | BOOLEAN | TRUE | Whether retail clients are allowed |
| minTradeBaseQuantity | STRING | 10000 | minTradeQuantity of baseCcy defined in OPM |
| maxTradeBaseQuantity | STRING | 1000000 | maxTradeQuantity of baseCcy defined in OPM |
| minTradeQuoteQuantity | STRING | 10000 | minTradeQuantity of quoteCcy defined in OPM |
| maxTradeQuoteQuantity | STRING | 1000000 | maxTradeQuantity of quoteCcy defined in OPM |
| piAllowed | BOOLEAN | TRUE | Whether PI clients are allowed |
| corporateAllowed | BOOLEAN | TRUE | Whether Corporate clients are allowed |
| omnibusAllowed | BOOLEAN | TRUE | Whether Omnibus clients are allowed |
| institutionAllowed | BOOLEAN | TRUE | Whether Institution clients are allowed |
| tradingStatus | ENUM | OPENED, CLOSED | Quote pair status |
| isSTO | INTEGER | 0 | 0: False, 1: True |
Create MP RFQ
POST /api/v1/market-place/create-rfq
Customer creates the RFQ
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| rfqClOrderId | STRING | C | RFQ12345666 | (Optional) An ID defined by the client for the quote order. It will be automatically generated if not sent in the request. |
| buyCcy | STRING | Y | BTC | |
| sellCcy | STRING | Y | USDT | |
| sellAmount | DECIMAL | Y | 130000 | Selling amount |
| rfqMode | STRING | Y | real-time, delayed |
|
| expireSec | INT | 1800 | RFQ valid period in seconds, default 1800 = 30 minutes, allowed 10–60 mins | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"rfqId": "RFQ638459562162049024",
"rfqClOrderId": "RFQ12345666",
"status": "new"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| rfqClOrderId | STRING | RFQ12345666 | (Optional) An ID defined by the client for the quote order. It will be automatically generated if not sent in the request. |
| rfqId | STRING | RFQ638459562162049024 | A unique reference ID for this quote. |
| status | STRING | new |
Accept MP Quote
POST /api/v1/market-place/accept-quote
Customer accepts the quote
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| quoteId | STRING | Y | quote789456123 | The unique quote id auto generated for each quote when creation |
| rfqId | STRING | Y | rfq638459562162049024 | A unique reference ID for this quote. |
| action | STRING | Y | accept, decline | decline only works for manual order (after decline, rfq becomes failed) |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"rfqId": "rfq638459562162049024",
"quoteId": "quote789456123",
"status": "accepted",
"expiryTime": 1717392500
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| quoteId | STRING | quote789456123 | The unique quote id auto generated for each quote when creation |
| rfqId | STRING | rfq638459562162049024 | A unique reference ID for this quote. |
| status | STRING | accepted | |
| expiryTime | LONG | 1800 | Min of quote and rfq expiry time, if action = decline,expiryTime will be null |
Get MP RFQ history
GET /api/v1/market-place/rfqs
Customer check the RFQ history
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| rfqId | STRING | 122456 | The orderId generated by HashKey. If not specified, will return all records. | |
| quoteId | STRING | The unique quote id auto generated for each quote when creation | ||
| rfqClOrderId | STRING | 122455 | A client-defined ID for the order, autogenerated if not specified. | |
| limit | INT | Limit per page for records. - Default: 500, Max: 1000. | ||
| status | ENUM | new |
status filter | |
| startTime | LONG | Y | 1764645641000 | createTime filter, max last 90 days |
| endTime | LONG | Y | 1766373641000 | createTime filter, max last 90 days |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"rfqCreateTime": 1716002500,
"rfqId": "RFQ638459562162049024",
"quoteId": "QUOTE_789456123",
"rfqClOrderId": "QUOTE_789456123",
"rfqMode": "real-time",
"quoteMode": "real-time",
"buyCcy": "BTC",
"sellCcy": "USDT",
"buyAmount": "2",
"sellAmount": "",
"price": "65000",
"status": "successful",
"executedTime": 1717392500
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| rfqCreateTime | LONG | 1617315200 | Timestamp that the rfg was created |
| rfqId | STRING | 122456 | The unique orderId generated by HashKey. |
| quoteId | STRING | The unique quote id auto generated for each quote when creation | |
| rfqClOrderId | STRING | 122455 | A client-defined ID for the order, autogenerated if not specified. |
| rfqMode | STRING | ||
| quoteMode | STRING | ||
| buyCcy | STRING | ||
| sellCcy | STRING | ||
| buyAmount | STRING | ||
| sellAmount | STRING | ||
| price | STRING | ||
| status | ENUM | new |
• new : active• accepted : quote accepted• processing : On-chain/funds are locked (Real-time orders will be executed immediately, while delayed orders will remain in this status pending settlement, up to T+2)• successful : Settlement successful• expired : Quote expired• cancelled : Cancelled by HSK operations• declined : Manual quote rejected by the quoting party• manual-order : Awaiting manual quote• manual-order-confirmation : Manual quote received, awaiting confirmation from the quoting party |
| executedTime | LONG | Timestamp that the rfq was executed and status = successful |
Get all Active MP Quotes
GET /api/v1/market-place/rfq-active/{rfqId}
Customer check the RFQ history
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| rfqId (path parameter) | STRING | Y | 123456 | The orderId generated by HashKey. |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"quoteMode": "REAL_TIME",
"sellCcy": "USD",
"rfqId": "MP740508620175265792",
"quoteId": "MPQ740508741768138752",
"rfqClOrderId": "MP740508620175265792",
"buyCcy": "BTC",
"rfqMode": "REAL_TIME",
"buyAmount": "0.00009",
"expireTime": 1754359101795,
"sellAmount": "10",
"price": "101000",
"rank": 1,
"status": "new"
},
{
"quoteMode": "REAL_TIME",
"sellCcy": "USD",
"rfqId": "MP740508620175265792",
"quoteId": "MPQ740508741768138792",
"rfqClOrderId": "MP740508620175265792",
"buyCcy": "BTC",
"rfqMode": "REAL_TIME",
"buyAmount": "0.00009",
"expireTime": 1754359101795,
"sellAmount": "10",
"price": "102000",
"rank": 2,
"status": "new"
}
]
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| quoteMode | STRING | ||
| sellCcy | STRING | ||
| rfqId | STRING | ||
| quoteId | STRING | ||
| rfqClOrderId | STRING | ||
| buyCcy | STRING | ||
| rfqMode | STRING | ||
| buyAmount | STRING | ||
| expireTime | LONG | ||
| sellAmount | STRING | ||
| price | STRING | ||
| rank | INTEGER | ||
| status | STRING |
Earn Channel
Get Earn Offers
GET /api/v1/earn/offers
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| productId | STRING | |||
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"productId": "6",
"productName": "Guotai Junan USD Money Market Fund",
"productDesc": "Professional......",
"minApy": "4.34",
"maxApy": "4.45",
"currency": "USD",
"minAmount": "10",
"maxAmount": "798872.53",
"lastestUnitValue": "8",
"purchasePrecision": "4",
"redeemPrecision": "4",
"status": "purchasable"
},
{
"productId": "4",
"productName": "EnglishBHKD",
"productDesc": "https://www.bosera.com.hk/zh-HK/products/fund/detail/USDMMF---- English",
"minApy": "1",
"maxApy": "5",
"currency": "HKD",
"minAmount": "1",
"maxAmount": "99002188.88",
"lastestUnitValue": "8",
"purchasePrecision": "1",
"redeemPrecision": "4",
"status": "purchasable"
},
{
"productId": "3",
"productName": "Bosera USD Money Market ETF (Unlisted Tokenised Class)BUSD",
"productDesc": "(EN)計算基礎及涵...",
"minApy": "1",
"maxApy": "3",
"currency": "USD",
"minAmount": "1.00",
"maxAmount": "790962.9",
"lastestUnitValue": "0.8",
"purchasePrecision": "2",
"redeemPrecision": "2",
"status": "purchasable"
}
]
| Parameter | Type | Example Value | Description |
|---|---|---|---|
| - | Array of objects of productIds | Array of objects of productIds | |
| productId | STRING | ||
| productName | STRING | ||
| productDesc | STRING | ||
| minApy | STRING | Estimated annual percentage yield If the annualization is 7%, this field is 0.07 |
|
| maxApy | STRING | Estimated annual percentage yield If the annualization is 9%, this field is 0.09 |
|
| currency | STRING | Investment currency, e.g. BTC, USD | |
| minAmount | STRING | Minimum subscription amount | |
| maxAmount | STRING | Maximum available subscription amount | |
| latestUnitValue | STRING | Latest value per unit in ccy | |
| purchasePrecision | STRING | ||
| redeemPrecision | STRING | ||
| status | STRING | purchasable: Purchasable stop: Suspension of subscription |
Purchase Earn Product
POST /api/v1/earn/purchase
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| productId | STRING | Y | Product ID | |
| currency | STRING | Y | USD | Investment currency |
| amount | STRING | Y | Investment amount | |
| clOrderId | STRING | Client Order Id A combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters. Idempotent, non-repeatable |
||
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"orderId": "STO773487710412623872",
"clOrderId": "1104earn"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| orderId | STRING | STO773487710412623872 | orderId generated by Hashkey |
| clOrderId | STRING | orderId defined by customer |
Cancel Purchase Earn
DELETE /api/v1/earn/purchase
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| orderId | STRING | C | One of orderId or clOrderId must be sent | |
| clOrderId | STRING | C | One of orderId or clOrderId must be sent | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"orderId": "STO782248737920086016",
"clOrderId": "1128TESTEARN",
"status": "cancelled"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| orderId | STRING | STO773487710412623872 | orderId generated by Hashkey |
| clOrderId | STRING | orderId defined by customer | |
| status | STRING | cancelled |
Redeem Earn Product
POST /api/v1/earn/redeem
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| productId | STRING | Y | Product ID | |
| unit | STRING | C | Up to 2 decimal places | |
| percent | STRING | C | The proportion of the total position, 0.50 — ratio per unit (0.50 = 50%) — precision: 2 decimal places — must be validated to be > 0 and ≤ 1.00. |
|
| clOrderId | STRING | C | Client Order Id A combination of case-sensitive alphanumerics, all numbers, or all letters of up to 16 characters. Idempotent, non-repeatable |
|
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"orderId": "STO773500357380034560",
"clOrderId": "1104earnredeem"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| orderId | STRING | STO773487710412623872 | orderId generated by Hashkey |
| clOrderId | STRING | orderId defined by customer |
Cancel Redeem Earn
DELETE /api/v1/earn/redeem
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| orderId | STRING | C | One of orderId or clOrderId must be sent | |
| clOrderId | STRING | C | One of orderId or clOrderId must be sent | |
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"orderId": "STO773500357380034560",
"clOrderId": "1104earnredeem",
"status": "cancelled"
}
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| orderId | STRING | STO773487710412623872 | orderId generated by Hashkey |
| clOrderId | STRING | orderId defined by customer | |
| status | STRING | cancelled |
Get Earn Orders
GET /api/v1/earn/orders
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| productId | STRING | |||
| orderType | ENUM(STRING) | purchase |
purchaseredeemairdrop-interestredeem-interest |
|
| orderId | STRING | C | orderId generated by Hashkey | |
| clOrderId | STRING | C | orderId defined by customer | |
| limit | STRING | Default 500, Max 1000 | ||
| startTime | STRING | Last 180 days – order creation time | ||
| endTime | STRING | Last 180 days – order creation time | ||
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
[
{
"orderId": "STO773500357380034560",
"clOrderId": "1104earnredeem",
"productId": "3",
"orderType": "redeem",
"status": "-1",
"currency": "BUSD",
"amount": "0",
"price": "0",
"unit": "6666.6",
"fee": "0",
"extraFee": "0",
"transactionTime": "1762225108341"
},
{
"orderId": "STO773487710412623872",
"clOrderId": "1104earn",
"productId": "6",
"orderType": "purchase",
"status": "-1",
"currency": "USD",
"amount": "10000",
"price": "0",
"unit": "0",
"fee": "0",
"extraFee": "0",
"transactionTime": "1762222502274"
},
{
"orderId": "STO713455002586419200",
"clOrderId": "",
"productId": "3",
"orderType": "purchase",
"status": "3",
"currency": "USD",
"amount": "100000",
"price": "6",
"unit": "16666.6",
"fee": "1000",
"extraFee": "0",
"transactionTime": "1748333610559"
}
]
| PARAMETER | TYPE | Example Value | DESCRIPTION |
|---|---|---|---|
| * | Array | ||
| orderId | STRING | Order ID | |
| clOrderId | STRING | Client Order Id | |
| productId | STRING | Product ID | |
| orderType | ENUM(STRING) | purchase |
purchaseredeemairdrop-interestredeem-interest |
| status | ENUM(STRING) | - CANCELED (-1)- PROCESSING (1)- SETTLING (2)- DONE (3)- FAILED (4)- PENDING_SETTLING (5) |
|
| currency | STRING | Investment currency, e.g. BTC, USD | |
| amount | STRING | - order_type=purchase: purchase input amount- order_type=redeem & status=3: redemption input shares equivalent value = unit × lastUnitValue- order_type=airdrop-interest & status=3: value of airdropped shares = unit × lastUnitValue- order_type=redeem-interest & status=3: unsettled earnings = unrealizedEarnings |
|
| price | STRING | - order_type=purchase: lastUnitValue when purchase completed- order_type=redeem & status=3: lastUnitValue when redemption completed- order_type=airdrop-interest & status=3: lastUnitValue of airdropped shares obtained- order_type=redeem-interest: 0 |
|
| unit | STRING | Allocated units, returned only in: - order_type=purchase & status=3: units = amount / lastUnitValue- order_type=redeem: redeemed units input- order_type=airdrop-interest & status=3: airdropped units obtained- order_type=redeem-interest: 0 |
|
| fee | STRING | Platform commission fee in same currency. Appears only when order_type=redeem. Actual received = amount - fee. |
|
| extraFee | STRING | Fee if redeeming within 1 month of purchase. Appears only when order_type=redeem-interest. Actual received = amount - extraFee. |
|
| transactionTime | STRING | Order purchased time, Unix timestamp (ms), e.g. 1762222502274 |
Get Earn Balance
GET /api/v1/earn/balance
Weight: 1
Request Parameters
| PARAMETER | TYPE | Req'd | Example Values | DESCRIPTION |
|---|---|---|---|---|
| productId | STRING | C | ||
| recvWindow | LONG | Recv Window. Default 5000 | ||
| timestamp | LONG | Y | 1714311403031 | Timestamp |
Response Content
{
"timestamp": "1762237806989",
"balanceData": [
{
"productId": "3",
"currency": "BUSD",
"amount": "4999.98",
"unit": "16666.6",
"latestUnitValue": "0.3",
"snapshotTime": "2025-11-03",
"totalValue": "4999.98",
"unrealizedEarnings": "0"
}
]
}
| PARAMETER | TYPE | Example Value | DESCRIPTION |
|---|---|---|---|
| timestamp | STRING | ||
| balanceData | Array of objects | Investment data | |
| -productId | STRING | Product ID | |
| -currency | STRING | Investment currency | |
| -amount | STRING | Current amount = unit × latestUnitValue (allocatedUnit + earningUnit) × latestUnitValue |
|
| -unit | STRING | allocatedUnit (Allocated units after purchase) + earningUnit (Realized earnings converted to tokens for Cinda STO only) | |
| -latestUnitValue | STRING | Latest net asset value (manually updated daily by operations) | |
| -snapshotTime | STRING | ||
| -totalValue | STRING | - Cinda STO: totalValue = latestUnitValue × (allocatedUnit + earningUnit) + unrealizedEarnings (latestUnitValue fixed, unrealizedEarnings variable). - Bosera: totalValue = latestUnitValue × (allocatedUnit + earningUnit) + unrealizedEarnings, where earningUnit = 0, latestUnitValue is variable, and unrealizedEarnings = 0. totalValue = amount + unrealizedEarnings |
|
| -unrealizedEarnings | STRING | Unrealized earnings (Cinda STO only; calculated mid-month and periodically provided by Cinda for display). |
Error Codes
List of error codes
| ERROR CODE | HTTP Status Code | ERROR MESSAGE | DESCRIPTION |
|---|---|---|---|
| 200 | 200 | Success request | |
| 0000 | 200 | success | Success request |
| 0001 | 400 | Required field %s missing or invalid |
Required field %s missing or invalid. E.g. Required field quantity missing or invalid |
| 0001 | 400 | Incorrect signature | The server is not able to valid your signature request. Please check your signature whether it have the correct signing. |
| 0003 | 400 | Rate limit exceeded | Rate limit exceed per configuration. Please manage the number of your request |
| 0102 | 400 | Invalid APIKey | There was an issue validating your API Key permission. Please check your API Key permission |
| 0103 | 400 | APIKey expired | API-key has expired. Please login to Account management console to renew the API key |
| 0104 | 400 | accountId is not allowed | The accountId defined is not permissible |
| 0201 | 400 | Instrument not found | The instrument defined cannot be located |
| 0202 | 400 | Invalid IP | Our server detected the IP addresses submitted for the API request does not match API key whitelisted IP address |
| 0206 | 400 | Unsupported order type | Invalid order type being sent to the server |
| 0207 | 400 | Invalid price | Invalid price being sent to the server |
| 0209 | 400 | Invalid price precision | The precision price is over the maximum allowed for this asset |
| 0210 | 400 | Price outside of allowed range | Price of the order below minPrice or exceeds maxPrice range. Please check exchangeInfo |
| 0211 | 400 | Order not found | Our server not able to locate the orderId defined |
| 0212 | 400 | Order has already been completed (filled, canceled, etc) or does not exist. Please check the order status to verify | Order has already been completed (filled, canceled, etc) or does not exist. Please check the order status to verify |
| 0401 | 400 | Insufficient asset | There is insufficient balance to submit the order |
| -1000 | 400 | An unknown error occurred while processing the request | An issue generated by our server |
| -1001 | 400 | Internal error | Unable to process your request. Please try again |
| -1002 | 400 | Unauthorized operation | Server is not able to validate your API Key. Please ensure you have the valid API Key to the corresponding environment |
| -1004 | 400 | Bad request | There was an issue with to process your request. Please check your parameters or values are valid |
| -1005 | 400 | No permission | It appears there is insufficient trading permission. Please check your permission |
| -1006 | 400 | Execution status unknown | An unexpected response was received from the message bus |
| -1007 | 400 | Timeout waiting for response from server | Timeout waiting for response from backend server. Send status unknown; execution status unknown |
| -1014 | 400 | Unsupported order combination | The order combination specified is not supported |
| -1015 | 400 | Too many new orders, current limit is %s orders per %s |
Reach the rate limit .Please slow down your request speed. Too many new orders. |
| -1020 | 400 | Unsupported operation | User operation is not supported |
| -1021 | 400 | Timestamp for this request is outside of the recvWindow | Timestamp for this request was 1000ms ahead of the server's time. Please check the difference between your local time and server time |
| -1024 | 400 | Duplicate request | Duplicate request received |
| -1101 | 400 | Feature has been offline | Feature has been offline, please check with API team for further details |
| -1115 | 400 | Invalid timeInForce | Invalid time in force being sent |
| -1117 | 400 | Invalid order side | Invalid side being sent |
| -1123 | 400 | Invalid client order id | Invalid client order ID being sent |
| -1124 | 400 | Invalid price | Invalid price being sent |
| -1126 | 400 | Invalid quantity | Invalid quantity being sent |
| -1129 | 400 | Invalid parameters, quantity and amount are not allowed to be sent at the same time. | The combination of quantity and amount is not allowed to be submitted at the same time |
| -1130 | 400 | Illegal parameter %s |
Invalid data sent for a parameter. E.g. "Illegal parameter 'symbol'" |
| -1132 | 400 | Order price greater than the maximum | Order price exceeds maxPrice. Check ExchangeInfo |
| -1133 | 400 | Order price lower than the minimum | Order price below the threshold minPrice. Check ExchangeInfo |
| -1135 | 400 | Order quantity greater than the maximum | Order quantity exceeds the maxQty. Check ExchangeInfo |
| -1136 | 400 | Order quantity lower than the minimum | Order quantity below threshold minQty. Check ExchangeInfo |
| -1137 | 400 | Order quantity precision too large | Order quantity precision is too large |
| -1139 | 400 | Order has been filled | Unable to fulfill request as order has been filled |
| -1140 | 400 | Order amount lower than the minimum | The transaction amount is below the threshold minAmount. Check ExchangeInfo |
| -1141 | 400 | Duplicate order | The server have detected an existing clientOrderId sent before |
| -1142 | 400 | Order has been cancelled | Unable to fulfill rquest as order has been canceled |
| -1143 | 400 | Order not found on order book | Unable to locate orderbook |
| -1144 | 400 | Order has been locked | Order has been locked |
| -1145 | 400 | Cancellation on this order type not supported | This order type does not support cancellation |
| -1146 | 400 | Order creation timeout | Not able to create the order and timed out |
| -1147 | 400 | Order cancellation timeout | Not able to cancel the order and timed out |
| -1148 | 400 | Order amount precision too large | Market Cash Amount precision is too long |
| -1149 | 400 | Order creation failed | Order creation failed |
| -1150 | 400 | Order cancellation failed | Order cancellation failed |
| -1151 | 400 | The trading pair is not open yet | The trading is not yet listed for trading |
| -1152 | 400 | User does not exist | Unable to find user |
| -1153 | 400 | Invalid price type | Invalid price type being sent |
| -1154 | 400 | Invalid position side | Invalid side being sent |
| -1155 | 400 | The trading pair is not available for api trading | API trading is suspended for API trading |
| -1156 | 400 | Limit maker order rejected: Improper price may cause immediate fill. | Creation of limit maker order failed as the order execute immediately.For HashKey Global only. |
| -1160 | 400 | Account does not exist | Account does not exist |
| -1161 | 400 | Balance transfer failed | Transfer internal funds failed |
| -1162 | 400 | Unsupport contract address | Contract address submitted is not valid |
| -1163 | 400 | Illegal withdrawal address | Withdraw address is not valid |
| -1164 | 400 | Withdraw failed | Withdraw failed, check if the withdrawal amount meets the minimum withdrawal amount |
| -1165 | 400 | Withdrawal amount cannot be null | Withdrawal amount needs to be more than 0 |
| -1166 | 400 | Withdrawal amount exceeds the daily limit | Withdrawal amount exceeded the daily limit allowed |
| -1167 | 400 | Withdrawal amount less than the minimum | Withdrawal amount less than the min withdraw amount limit |
| -1168 | 400 | Illegal withdrawal amount | Withdrawal amount characters are not valid |
| -1169 | 400 | Withdraw not allowed | Withdrawal is currently suspended |
| -1170 | 400 | Deposit not allowed | Deposit is currently suspended |
| -1171 | 400 | Withdrawal address not in whitelist | Withdrawal address has not yet been whitelisted |
| -1172 | 400 | Invalid from account id | The fromAccountId is invalid |
| -1173 | 400 | Invalid to account id | The toAccountId is invalid |
| -1174 | 400 | Transfer not allowed between the same account | The fromAccount should not be equal toAccount |
| -1175 | 400 | Invalid fiat deposit status | The fiat deposit status submitted is invalid |
| -1176 | 400 | Invalid fiat withdrawal status | The fiat withdrawal status submitted is invalid |
| -1177 | 400 | Invalid fiat order type | The fiat order type submitted is invalid |
| -1182 | 400 | The newly whitelisted withdrawal address will take effect in 30 min. Please try it later. | The newly whitelisted withdrawal address will take effect after a certain time period for the sake of safety. During the mean time, the address is not available |
| -1186 | 400 | Placing orders via api is not allowed, please check the API permission | Placing orders via api is not allowed, please check the API permission |
| -1193 | 400 | Order creation count exceeds the limit | Order count have exceeded the amount allowed |
| -1194 | 400 | Market order creation forbidden | Creation of market order is forbidden |
| -1200 | 400 | Order buy quantity too small | Buy limit quantity below the threshold minQty. Check ExchangeInfo |
| -1201 | 400 | Order buy quantity too large | Buy limit quantity exceeds maxQty. Check ExchangeInfo |
| -1202 | 400 | Order sell quantity too small | Sell limit quantity below the threshold minQty. Check ExchangeInfo |
| -1203 | 400 | Order sell quantity too large | Sell limit quantity exceeds the maxQty. Check ExchangeInfo |
| -1204 | 400 | From account must be a main account | Transfer fromAccountId needs to be a main account |
| -1205 | 400 | Account not authorized | Account is not authorised |
| -1206 | 400 | Order amount greater than the maximum | The transaction amount is below the threshold maxAmount. Check ExchangeInfo |
| -1207 | 400 | The status of deposit is invalid | The status of deposit submitted is invalid |
| -1208 | 400 | The orderType of fiat is invalid | The status of orderType is not valid |
| -1209 | 400 | The status of withdraw is invalid | The status of withdraw is not valid |
| -1210 | 400 | The deposit amount %s must not be less than the minimum deposit amount %s %s. |
The deposit amount %s must not be less than the minimum deposit amount %s %s. |
| -1211 | 400 | Withdrawal in progress | Withdrawal in progress |
| -1212 | 400 | The order of deposit does not exist | The order of deposit does not exist |
| -1213 | 400 | The status of deposit cannot apply refund | The status of deposit cannot apply refund |
| -1214 | 400 | The account of deposit does not exist | The account of deposit does not exist |
| -1215 | 400 | User account status is abnormal | User account status is abnormal |
| -1300 | 400 | Sorry we can not locate this depositOrderId, please check and try again. | Sorry we can not locate this depositOrderId, please check and try again. |
| -1301 | 400 | Please contact the support team for historical orders | Please contact the support team for historical orders |
| -1302 | 400 | The refund via api can not be processed due to order status, please contact support team | The refund via api can not be processed due to order status, please contact support team |
| -1303 | 400 | The refund request via api can not be processed due to failure reason, please contact support team | The refund request via api can not be processed due to failure reason, please contact support team |
| -1304 | 400 | Please upload supporting docs as required, only image files .jpg, .png, .jpeg allowed. | Please upload supporting docs as required, only image files .jpg, .png, .jpeg allowed. |
| -1305 | 400 | Image size exceeds 1M, please revise and try again | Image size exceeds 1M, please revise and try again |
| -2010 | 400 | Limit maker order rejected: Improper price may cause immediate fill. | New order request was rejected. Usually this is due to new LIMIT_MAKER order not able to be maker, our system will auto reject the order For HashKey Hong Kong only |
| -2011 | 400 | Order cancellation rejected | Cancel request was rejected |
| -2016 | 400 | API key creation exceeds the limit | The number of API key created have exceeded the limit |
| -2017 | 400 | Open orders exceeds the limit of the trading pair | The number of open orders have exceeded the limit for the trading pair |
| -2018 | 400 | Trade user creation exceeds the limit | The number of trade user created have exceeded the limit |
| -2019 | 400 | Trader and omnibus user not allowed to login app | The trader and omnibus user is not allowed to login to the app |
| -2020 | 400 | Not allowed to trade this trading pair | Not allowed to trade this trading pair |
| -2021 | 400 | Not allowed to trade this trading pair | Not allowed to trade this trading pair |
| -2022 | 400 | Order batch size exceeds the limit | The number of orders in batchOrders request exceeds its limit |
| -2023 | 400 | Need to pass KYC verification | Need to pass KYC verification in order to use API trading |
| -2024 | 400 | Fiat account does not exist | Fiat account ID defined does not exist |
| -2025 | 400 | Custody account not exist | Custody account ID defined does not exist |
| -2026 | 400 | Invalid type | The type defined is invalid |
| -2027 | 400 | Exceed maximum time range of 30 days | The startTime and endTime defined for Fund statement request exceeds the 30 days limit |
| -2028 | 400 | The search is limited to data within the last one month | The search is limited to data within the last one month |
| -2029 | 400 | The search is limited to data within the last three months | The search is limited to data within the last three months |
| -2030 | 400 | Order batch size exceeds the limit | Order batch size exceeds the limit |
| -3002 | 400 | Invalid channel value | Invalid channel value |
| -3003 | 400 | quote expired or sellAmount invalid, please check again | quote expired or sellAmount invalid, please check again |
| -3117 | 400 | Invalid permission | Invalid permission is detected. E.g. APIKey does not have the accountID permission to query the balance of the account |
| -3143 | 400 | Currently, your trading account has exceeded its limit and is temporarily unable to perform trades | The trading account have exceeds its limit capacity. We have temporarily suspended your trading |
| -3144 | 400 | Currently, your trading account has exceeded its limit and is temporarily unable to perform transfers | The trading account have exceeds its limit capacity. We have temporarily suspended your transfer |
| -3145 | 400 | Please DO NOT submit request too frequently | We have detected the rate of your API request have been submitted too frequently. Please manage your API request. |
| -4000 | 400 | Invalid bank account number | Invalid bank account number |
| -4001 | 400 | Invalid asset | The asset specified is invalid |
| -4002 | 400 | Withdrawal amount less than the minimum withdrawal amount | The withdrawal amount submitted is less than the minimum amount |
| -4003 | 400 | Insufficient Balance | There was insufficient balance for the asset you are trying to withdraw |
| -4004 | 400 | Invalid bank account number | The bank account has not been whitelisted yet |
| -4005 | 400 | Assets are not listed | Assets are not listed |
| -4006 | 400 | Kyc is not certified | The user has not passed KYC |
| -4007 | 400 | Withdrawal channels are not supported | The withdrawal channel is not yet supported via API |
| -4008 | 400 | This currency does not support this customer type | The currency is not supported for the client type |
| -4009 | 400 | No withdrawal permission | The API Key do not have withdrawal permission |
| -4010 | 400 | Withdrawals on the same day exceed the maximum limit for a single day | The withdrawal request exceeds the daily maximum limit |
| -4011 | 400 | System error | The system has an internal error. Please contact our API Team |
| -4012 | 400 | Parameter error | The parameter entered was invalid |
| -4013 | 400 | Withdraw repeatedly | The withdrawal has been submitted multiple times. Please wait and try again |
| -4014 | 400 | The type of whitelist is invalid | The type of whitelist is invalid |
| -4016 | 400 | twoFaToken missing. Please send valid twoFaToken as 2FA is enabled for this action | twoFaToken missing. Please send valid twoFaToken as 2FA is enabled for this action |
| -4017 | 400 | twoFaToken wrong, please send valid twoFaToken | twoFaToken wrong, please send valid twoFaToken |
| -4018 | 400 | twoFaToken used before. Please wait and try again later | twoFaToken used before. Please wait and try again later |
| -4019 | 400 | The withdraw exceeded the predefined maximum limit, and has been rejected | The withdraw exceeded the predefined maximum limit, and has been rejected |
| -4020 | 400 | The withdrawal happened during abnormal operation hours, and had been rejected | The withdrawal happened during abnormal operation hours, and had been rejected |
| -5000 | 400 | Duplicate IN-KIND subscription order | Duplicate IN-KIND subscription order |
| -5001 | 400 | Fund code is invalid | Fund code is invalid |
| -5002 | 400 | Deposit address does not exist | Deposit address does not exist |
| -5003 | 400 | Invalid address. Please verify | Invalid address. Please verify |
| -5004 | 400 | Signature verification failed because the address had been whitelisted by another account. | Signature verification failed because the address had been whitelisted by another account. |
| -5005 | 400 | Signature verification fails because client submits incorrect signature result. | Signature verification fails because client submits incorrect signature result. |
| -5006 | 400 | Signature verification failed because the address had been whitelisted before. | Signature verification failed because the address had been whitelisted before. |
| -5011 | 400 | No Subscription found. | No Subscription found. |
| -5012 | 400 | Unknown subscriptionId | Unknown subscriptionId |
| -5013 | 400 | Subscription failed. | Subscription failed. |
| -5021 | 400 | Only one of 'buyAmount' or 'sellAmount' must be specified. | Only one of 'buyAmount' or 'sellAmount' must be specified. |
| -5022 | 400 | quoteId expired. Please get a quote again. | quoteId expired. Please get a quote again. |
| -5023 | 400 | Insufficient Fund Position. | Insufficient Fund Position. |
| -5024 | 400 | The amount is below the minimum required: 100 USD or equivalent USD. | The amount is below the minimum required: 100 USD or equivalent USD. |
| -5025 | 400 | Exceed the maximum buy amount. | Exceed the maximum buy amount. |
| -5026 | 400 | Unsupported Quote Pair. | Unsupported Quote Pair. |
| -5027 | 400 | Invalid orderId: %s provided. |
Invalid orderId: %s provided. |
| -5030 | 400 | The Length of %s cannot exceed %s |
The Length of %s cannot exceed %s |
| -5031 | 400 | Unsupported quote pair | Unsupported quote pair |
| -5032 | 400 | Precision illegal | Precision illegal |
| -5033 | 400 | Precision illegal | Precision illegal |
| -5034 | 400 | Fail to generate the clientOrderId | Fail to generate the clientOrderId |
| -5035 | 400 | %s |
%s |
| -5036 | 400 | %s |
%s |
WEBSOCKET API
Access URL
Python Public Stream Sample
import hashlib
import hmac
import json
import time
import websocket
import logging
import threading
########################################################################################################################
# Test Websocket API
# Copyright: Hashkey Trading 2023
########################################################################################################################
class WebSocketClient:
def __init__(self):
self._logger = logging.getLogger(__name__)
self._ws = None
self._ping_thread = None
def _on_message(self, ws, message):
self._logger.info(f"Received message: {message}")
data = json.loads(message)
if "pong" in data:
# Received a pong message from the server
self._logger.info("Received pong message")
# Handle the received market data here
def _on_error(self, ws, error):
self._logger.error(f"WebSocket error: {error}")
def _on_close(self, ws):
self._logger.info("Connection closed")
def _on_open(self, ws):
self._logger.info("Subscribe topic")
sub = {
"symbol": "BTCUSD",
"topic": "trade",
"event": "sub",
"params": {
"binary": False
},
"id": 1
}
ws.send(json.dumps(sub))
# Start the ping thread after connecting
self._start_ping_thread()
def _start_ping_thread(self):
def send_ping():
while self._ws:
ping_message = {
"ping": int(time.time() * 1000) # Send a timestamp as the ping message
}
self._ws.send(json.dumps(ping_message))
self._logger.info(f"Send ping message: {ping_message}")
time.sleep(5)
self._ping_thread = threading.Thread(target=send_ping)
self._ping_thread.daemon = True
self._ping_thread.start()
def unsubscribe(self):
if self._ws:
self._logger.info("Unsubscribe topic")
unsub = {
"symbol": "BTCUSD",
"topic": "trade",
"event": "cancel",
"params": {
"binary": False
},
"id": 1
}
self._ws.send(json.dumps(unsub))
def connect(self):
base_url = 'wss://stream-pro.sim.hashkeydev.com'
endpoint = 'quote/ws/v1'
stream_url = f"{base_url}/{endpoint}"
self._logger.info(stream_url)
self._logger.info(f"Connecting to {stream_url}")
self._ws = websocket.WebSocketApp(stream_url,
on_message=self._on_message,
on_error=self._on_error,
on_close=self._on_close)
self._ws.on_open = self._on_open
self._ws.run_forever()
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
client = WebSocketClient()
client.connect()
Python Private Stream Sample
import hashlib
import hmac
import json
import time
import websocket
import logging
import threading
import requests
import datetime
########################################################################################################################
# Test Websocket API
# Copyright: Hashkey Trading 2023
########################################################################################################################
class WebSocketClient:
def __init__(self, user_key, user_secret, subed_topic=None):
if subed_topic is None:
subed_topic = []
self.user_key = user_key
self.user_secret = user_secret
self.subed_topic = subed_topic
self.listen_key = None
self._logger = logging.getLogger(__name__)
self._ws = None
self._ping_thread = None
self.last_listen_key_extend = time.time()
def generate_listen_key(self):
params = {
'timestamp': int(time.time() * 1000),
}
api_headers = {
'X-HK-APIKEY': self.user_key,
'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
}
signature = self.create_hmac256_signature(secret_key=self.user_secret, params=params)
params.update({
'signature': signature,
})
response = requests.post(url=f"/api/v1/userDataStream", headers=api_headers, data=params)
data = response.json()
if 'listenKey' in data:
self.listen_key = data['listenKey']
self._logger.info(f"Generated listen key: {self.listen_key}")
else:
raise Exception("Failed to generate listen key")
def extend_listenKey_timeLimit(self):
params = {
'timestamp': int(time.time() * 1000),
'listenKey': self.listen_key,
}
api_headers = {
'X-HK-APIKEY': self.user_key,
'content-type': 'application/x-www-form-urlencoded;charset=UTF-8',
}
signature = self.create_hmac256_signature(secret_key=self.user_secret, params=params)
params.update({
'signature': signature,
})
response = requests.put(url=f"/api/v1/userDataStream", headers=api_headers, data=params)
if response.status_code == 200:
self._logger.info("Successfully extended listen key validity.")
else:
self._logger.error("Failed to extend listen key validity.")
def create_hmac256_signature(self, secret_key, params, data=""):
for k, v in params.items():
data = data + str(k) + "=" + str(v) + "&"
signature = hmac.new(secret_key.encode(), data[:-1].encode(), digestmod=hashlib.sha256).hexdigest()
return signature
def _on_message(self, ws, message):
current_time = datetime.datetime.now().strftime("%Y-%m-%d %H:%M:%S.%f")
self._logger.info(f"{current_time} - Received message: {message}")
data = json.loads(message)
if "pong" in data:
self._logger.info("Received pong message")
# Handle other messages here
def _on_error(self, ws, error):
self._logger.error(f"WebSocket error: {error}")
def _on_close(self, ws):
self._logger.info("Connection closed")
def _on_open(self, ws):
self._logger.info("Subscribing to topics")
for topic in self.subed_topic:
sub = {
"symbol": "BTCUSD",
"topic": topic,
"event": "sub",
"params": {
"limit": "100",
"binary": False
},
"id": 1
}
ws.send(json.dumps(sub))
self._start_ping_thread()
def _start_ping_thread(self):
def send_ping():
while self._ws:
current_time = time.time()
if current_time - self.last_listen_key_extend > 1800: # Extend listen key every 30 minutes
self.extend_listenKey_timeLimit()
self.last_listen_key_extend = current_time
ping_message = {"ping": int(time.time() * 1000)}
self._ws.send(json.dumps(ping_message))
self._logger.info(f"Sent ping message: {ping_message}")
time.sleep(5)
self._ping_thread = threading.Thread(target=send_ping)
self._ping_thread.daemon = True
self._ping_thread.start()
def unsubscribe(self):
if self._ws:
self._logger.info("Unsubscribing from topics")
for topic in self.subed_topic:
unsub = {
"symbol": "BTCUSD",
"topic": topic,
"event": "cancel_all",
"params": {
"limit": "100",
"binary": False
},
"id": 1
}
self._ws.send(json.dumps(unsub))
def connect(self):
if not self.listen_key:
self.generate_listen_key()
base_url = 'wss://stream-pro.sim.hashkeydev.com'
endpoint = f'api/v1/ws/{self.listen_key}'
stream_url = f"{base_url}/{endpoint}"
self._logger.info(f"Connecting to {stream_url}")
self._ws = websocket.WebSocketApp(stream_url,
on_message=self._on_message,
on_error=self._on_error,
on_close=self._on_close)
self._ws.on_open = self._on_open
self._ws.run_forever()
if __name__ == '__main__':
logging.basicConfig(level=logging.INFO)
user_key = "YOUR_USER_KEY"
user_secret = "YOUR_USER_SECRET"
subed_topics = ["trade"]
client = WebSocketClient(user_key, user_secret, subed_topics)
client.connect()
Sandbox Environment
- MarketData public stream V1:
wss://stream-pro.sim.hashkeydev.com/quote/ws/v1 - MarketData public stream V2:
wss://stream-pro.sim.hashkeydev.com/quote/ws/v2 - MarketPlace public stream:
wss://stream-pro.sim.hashkeydev.com/mp/ws/v1 - Private stream:
wss://stream-pro.sim.hashkeydev.com/api/v1/ws/{listenKey}
Production Environment
- MarketData public stream V1:
wss://stream-pro.hashkey.com/quote/ws/v1 - MarketData public stream V2:
wss://stream-pro.hashkey.com/quote/ws/v2 - MarketPlace public stream:
wss://stream-pro.hashkey.com/mp/ws/v1 - Private stream:
wss://stream-pro.hashkey.com/api/v1/ws/{listenKey}
Note: Replace {listenKey} with your actual listen key obtained from the Obtain ListenKey.
For example in Postman, you can test our websocket in steps:
- Create a new request and select Websocket

- Input
wss://stream-pro.sim.hashkeydev.com/quote/ws/v1orwss://stream-pro.sim.hashkeydev.com/api/v1/ws/{listenKey}and click "Connect"
Heartbeat check
PublicStream Heartbeat
Ping message format is as follows:
// From Sent by the user
{
"ping": 1748503859938
}
Pong message format is as follows:
// Public Stream, return server's timestamp
{
"pong": 1748503865406
}
When a user's websocket client application successfully connects to HashKey websocket server, the client is recommended to initiate a periodic heartbeat message (ping message) every 10 seconds, which is used to keep alive the connection.
PrivateStream Heartbeat
// From Websocket Server
{
"ping": 1748504490208,
"channelId": "02ac86fffe5fdf52-00000001-00266eb0-74a37ad40fb20d81-0cda790b"
}
// Respond from client
{
"pong": 1748504490208
}
Automatic disconnection mechanism (Only for Private Stream)
The websocket server will send a ping message every 30 seconds. We recommend clients respond with a pong message containing the same timestamp. It's not necessary to include the channelId. A mismatched pong timestamp will not affect the connection — we mainly care about receiving the pong itself, which indicates the connection is alive. (This mechanism is primarily used for internal latency calculation and statistics.) If the client has no heartbeat activity for 60 minutes, the session will be closed by the server.
Public Market Data Stream
V1
Use Public stream V1
- Sandbox:
wss://stream-pro.sim.hashkeydev.com/quote/ws/v1 - Production:
wss://stream-pro.hashkey.com/quote/ws/v1
Kline
Request Example:
{
"symbol": "BTCUSDT",
"topic": "kline_1m",
"event": "sub",
"params": {
"binary": false
}
}
Response content:
{
"symbol": "BTCUSDT",
"symbolName": "BTCUSDT",
"topic": "kline",
"params": {
"realtimeInterval": "24h",
"klineType": "1m",
"timezone": "8",
"binary": "false"
},
"data": [
{
"t": 1766720700000,
"s": "BTCUSDT",
"sn": "BTCUSDT",
"c": "88755.75",
"h": "88757.03",
"l": "88723.42",
"o": "88723.42",
"v": "0.00148",
"et": 0,
"qv": "131.3366119",
"td": 6,
"tb": "0",
"tq": "0"
}
],
"f": false,
"sendTime": 1766720723065,
"shared": false
}
Update frequency: 300ms
Subscription parameters:
topic is a pattern like kline_$interval, interval could be:
1m- 1 minute3m- 3 minutes5m- 5 minutes15m- 15 minutes30m- 30 minutes1h- 1 hour2h- 2 hours4h- 4 hours6h- 6 hours8h- 8 hours12h- 12 hours1d- 1 day1w- 1 week1M- 1 month
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSDT | Name of currency pair |
| topic | STRING | Y | kline_1m | Topic name |
| event | STRING | Y | sub | Event type |
| params | JSON Object | Y | Request expanded parameters | |
| params.binary | BOOLEAN | Y | false | True will return zip binary file |
WS Push Demo
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | BTCUSDT | Currency pair ID |
| symbolName | STRING | BTCUSDT | Currency pair name |
| topic | STRING | kline | Topic name |
| params | JSON Object | Request expanded parameters | |
| params.realtimeInterval | STRING | 24h | Time period, only support 24h |
| params.klineType | STRING | 1m | Kline Type |
| params.timezone | STRING | 8 | Time Zone |
| params.binary | STRING | false | Whether it is a binary type |
| data | JSON Array | Return data | |
| data.t | LONG | 1688199660000 | Timestamp in Milliseconds |
| data.s | STRING | BTCUSDT | Currency pair ID |
| data.sn | STRING | BTCUSDT | Currency pair name |
| data.c | STRING | 10002 | Close price |
| data.h | STRING | 10002 | High price |
| data.l | STRING | 10002 | Low price |
| data.o | STRING | 10002 | Open price |
| data.v | STRING | 0 | Base Asset Volume |
| data.et | INTEGER | 0 | Closing timestamp |
| data.qv | STRING (decimal) | 927.9672557 | Quote Asset Volume |
| data.td | INTEGER | 4 | Number of Trades |
| data.tb | STRING (decimal) | 0.00045 | Taker buy base asset volume |
| data.tq | STRING (decimal) | 39.2087177 | Taker buy quote asset volume |
| f | BOOLEAN | true | Whether it is the first return value |
| sendTime | LONG | 1688199337756 | Timestamp in milliseconds |
| shared | BOOLEAN | false | Whether to share (No longer in use) |
Realtimes
Request Example:
{
"symbol": "BTCUSDT",
"topic": "realtimes",
"event": "sub",
"params": {
"binary": false
}
}
Response content:
{
"symbol": "BTCUSDT",
"symbolName": "BTCUSDT",
"topic": "realtimes",
"params": {
"realtimeInterval": "24h",
"binary": "false"
},
"data": [
{
"t": 1764598623773,
"s": "BTCUSDT",
"sn": "BTCUSDT",
"c": "86127.13",
"h": "91854.4",
"l": "84834.68",
"o": "91592.99",
"v": "23.90583",
"qv": "2071254.823793",
"m": "-0.0597",
"e": 301
}
],
"f": false,
"sendTime": 1764598623952,
"shared": false
}
Update frequency: 500ms
Subscription parameters:
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSDT | Currency pair |
| topic | STRING | Y | realtimes | Topic name, default: "realtimes" |
| event | STRING | Y | sub | Event Type |
| params | JSON Object | Y | Request expanded parameters | |
| params.binary | BOOLEAN | Y | false | True will return zip binary file |
WS Push Demo
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | BTCUSDT | Currency pair ID |
| symbolName | STRING | BTCUSDT | Currency pair name |
| topic | STRING | realtimes | Topic name |
| params | JSON Object | Request expanded parameter | |
| params.realtimeInterval | STRING | 24h | Time period |
| params.binary | STRING | false | Whether it is a binary type |
| data | JSON Array | Return data | |
| data.t | LONG | 1688199300011 | Timestamp in Milliseconds |
| data.s | STRING | BTCUSDT | Currency pair ID |
| data.sn | STRING | BTCUSDT | Currency pair name |
| data.c | STRING | 10002 | Close price |
| data.h | STRING | 10002 | High price |
| data.l | STRING | 10002 | Low price |
| data.o | STRING | 10002 | Open price |
| data.v | STRING | 0 | Volume (in base currency) |
| data.qv | STRING | 0 | Volume(in quote currency) |
| data.m | STRING | 0 | 24H range |
| data.e | INT64 | 301 | Exchange ID |
| f | BOOLEAN | true | Whether it is the first return value |
| sendTime | LONG | 1688199337756 | Timestamp in milliseconds |
| shared | BOOLEAN | false | Whether to share (No longer in use) |
Trade
Request Example:
{
"symbol": "BTCUSD",
"topic": "trade",
"event": "sub",
"params": {
"binary": false
}
}
Response content:
{
"symbol": "BTCUSD",
"symbolName": "BTCUSD",
"topic": "trade",
"params": {
"realtimeInterval": "24h",
"binary": "false"
},
"data": [
{
"v": "4620696243481038848",
"t": 1764598927887,
"p": "86101.4",
"q": "0.00314",
"m": false
}
],
"f": false,
"sendTime": 1764598928016,
"shared": false
}
Upon successful subscription to our WebSocket API, you will receive an update of the most recent 60 trades for the symbol pair subscribed.
Update frequency: 300ms
Subscription parameters:
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSDT | Currency pair |
| topic | STRING | Y | trade | Topic name, default: "trade" |
| event | STRING | Y | sub | Event type |
| params | JSON Object | Y | Request expanded parameters | |
| params.binary | BOOLEAN | Y | false | True will return zip binary file |
WS Push Demo
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | BTCUSDT | Currency pair ID |
| symbol | STRING | BTCUSDT | Currency pair name |
| topic | STRING | trade | Topic name |
| params | JSON Object | Request expanded parameters | |
| params.realtimeInterval | STRING | 24h | Time period |
| params.binary | BOOLEAN | false | Whether it is a binary type |
| data | JSON Array | Return data | |
| data.v | STRING | 1447335405363150849 | Transaction record ID |
| data.t | STRING | 1687271825415 | Timestamp corresponding to transaction time in milliseconds |
| data.p | STRING | 10001 | Traded price |
| data.q | STRING | 0.001 | Traded quantity |
| data.m | STRING | false | isMaker (true: maker, false: taker) |
| f | BOOLEAN | true | Whether it is the first return value |
| sendTime | LONG | 1688199337756 | Timestamp in milliseconds |
| shared | BOOLEAN | false | Whether to share (No longer in use) |
Depth
Request Example:
{
"symbol": "BTCUSDT",
"topic": "depth",
"event": "sub",
"params": {
"binary": false
}
}
Response content:
{
"symbol": "BTCUSDT",
"symbolName": "BTCUSDT",
"topic": "depth",
"params": {
"realtimeInterval": "24h",
"binary": "false"
},
"data": [
{
"e": 301,
"s": "BTCUSDT",
"t": 1764599292355,
"v": "538222447_18",
"b": [
[
"86296.37",
"0.00046"
],
[
"86296.29",
"0.0006"
]
],
"a": [
[
"86296.38",
"0.00115"
],
[
"86300.51",
"0.00986"
]
],
"o": 0
}
],
"f": false,
"sendTime": 1764599292481,
"channelId": "0edeeafffed451ae-00000001-002a4da4-b065b0d60d88615a-688ef045",
"shared": false
}
Request the depth of the order book, can request up to limit of 200
Update frequency: 300ms
Subscription parameters:
| PARAMETER | TYPE | Req'd | Example values | DESCRIPTION |
|---|---|---|---|---|
| symbol | STRING | Y | BTCUSDT | Currency pair |
| topic | STRING | Y | depth | Topic name, default: "depth" |
| event | STRING | Y | sub | Event type |
| params | JSON Object | Y | Request expanded parameters | |
| params.binary | BOOLEAN | Y | false | True will return zip binary file |
WS Push Demo
| PARAMETER | TYPE | Example values | DESCRIPTION |
|---|---|---|---|
| symbol | STRING | BTCUSDT | Currency pair ID |
| symbol | STRING | BTCUSDT | Currency pair name |
| topic | STRING | depth | Topic name |
| params | JSON Object | Request expanded parameters | |
| params.realtimeInterval | STRING | 24h | Time period |
| params.binary | BOOLEAN | false | Whether it is a binary type |
| data | JSON Array | Return data | |
| data.e | INT64 | 301 | Exchange ID |
| data.s | STRING | BTUSDT | Currency pair |
| data.t | LONG | 1688199202314 | Timestamp in milliseconds (data time) |
| data.v | STRING | 6881_18 | Ignore this |
| data.o | INT64 | 0 | Ignore this |
| data.a | JSON Array | ["10004", "0.001"] | Ask price and quantity |
| data.b | JSON Array | ["10004", "0.001"] | Bid price and quantity |
| f | BOOLEAN | true | Whether it is the first return value |
| sendTime | LONG | 1688199337756 | Timestamp in milliseconds |
| shared | BOOLEAN | false | Whether to share (No longer in use) |
V2
Use Public stream V2
- Sandbox:
wss://stream-pro.sim.hashkeydev.com/quote/ws/v2 - Production:
wss://stream-pro.hashkey.com/quote/ws/v2
Kline
Request Example:
{
"topic":"kline",
"event":"sub",
"params":{
"symbol": "BTCUSD",
"klineType":"1m"
}
}
Response content:
{
"topic": "kline",
"params": {
"symbol": "BTCUSD",
"timezone": "8",
"klineType": "1m"
},
"data": {
"t": 1764657600000,
"s": "BTCUSD",
"sn": "BTCUSD",
"c": "87149.05",
"h": "87149.05",
"l": "87097.58",
"o": "87097.58",
"v": "0.01065",
"et": 0,
"qv": "927.9672557",
"td": 4,
"tb": "0.00045",
"tq": "39.2087177"
}
}
Update frequency: Real-time push
Subscription parameters:
klineType could be:
1m- 1 minute3m- 3 minutes5m- 5 minutes15m- 15 minutes30m- 30 minutes1h- 1 hour2h- 2 hours4h- 4 hours6h- 6 hours8h- 8 hours12h- 12 hours1d- 1 day1w- 1 week1M- 1 month
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| topic | STRING | Y | kline | Topic for "kline" data push |
| event | STRING | Y | sub | Subscribe ("sub") or Unsubscribe ("cancel") |
| params | DICTIONARY | Y | Request Parameters | |
| params.symbol | STRING | Y | ETHUSDT | Trading Pairs see Get-Exchange-Information |
| params.klineType | STRING | Y | 1m | Type of Kline. |
WS Push Demo
| PARAMETER | TYPE | Example | DESCRIPTION |
|---|---|---|---|
| topic | STRING | kline | Topic for "kline" data push |
| params | DICTIONARY | Request Parameters | |
>symbol |
STRING | ETHUSDT | Trading Pairs see Get-Exchange-Information |
>timezone |
STRING | 8 | Time Zone |
>klineType |
STRING | 1m | Type of Kline |
| data | DICTIONARY | WS Push Contenet Data | |
>t |
LONG | 1730100300000 | Data Time (milisecond) |
>s |
STRING | ETHUSDT | Trading Pair |
>sn |
STRING | ETHUSDT | Trading Pair Name |
>c |
STRING (decimal) | 1803.02 | close |
>h |
STRING (decimal) | 1806.97 | high |
>l |
STRING (decimal) | 1803.02 | low |
>o |
STRING (decimal) | 1806.07 | open |
>v |
STRING (decimal) | 0.075 | Total traded base asset volume |
>et |
INTEGER | 0 | Closing timestamp |
>qv |
STRING (decimal) | 927.9672557 | Quote Asset Volume |
>td |
INTEGER | 4 | Number of Trades |
>tb |
STRING (decimal) | 0.00045 | Taker buy base asset volume |
>tq |
STRING (decimal) | 39.2087177 | Taker buy quote asset volume |
Realtimes
Request Example:
{
"topic":"realtimes",
"event":"sub",
"params":{
"symbol": "BTCUSD"
}
}
Response content:
{
"topic": "realtimes",
"params": {
"symbol": "BTCUSD"
},
"data": {
"t": 1764658860002,
"s": "BTCUSD",
"o": "86199.34",
"h": "87337.09",
"l": "83999.62",
"c": "87108.07",
"v": "793.29909",
"qv": "67982802.2074518",
"m": "0.0105"
}
}
Update frequency: Real-time push
Subscription parameters:
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| topic | STRING | Y | realtimes | Topic for "realtimes" data push |
| event | STRING | Y | sub | Subscribe ("sub") or Unsubscribe ("cancel") |
| params | DICTIONARY | Y | Request Parameters | |
| params.symbol | STRING | Y | ETHUSDT | Trading Pairs see Get-Exchange-Information |
WS Push Demo
| PARAMETER | TYPE | Example | DESCRIPTION |
|---|---|---|---|
| topic | STRING | realtimes | Topic for "realtimes" data push |
| params | DICTIONARY | - | Request Parameters |
>symbol |
STRING | ETHUSDT | Trading Pairs see Get-Exchange-Information |
| data | DICTIONARY | - | WS Push Content Data |
>t |
LONG | 1730100239050 | Data Time (milisecond) |
>s |
STRING | ETHUSDT | Trading Pair |
>o |
STRING (decimal) | 1808.48 | Open price |
>h |
STRING (decimal) | 1808.48 | High price |
>l |
STRING (decimal) | 1803.02 | Low price |
>c |
STRING (decimal) | 1806.62 | Close price |
>v |
STRING (decimal) | 0.247 | Volume (in base currency) |
>qv |
STRING (decimal) | 445.91714 | Volume(in quote currency) |
>m |
STRING (decimal) | 0.0105 | 24H range |
Trade
Request Example:
{
"topic":"trade",
"event":"sub",
"params":{
"symbol": "BTCUSD"
}
}
Response content:
{
"topic": "trade",
"params": {
"symbol": "BTCUSD"
},
"data": {
"v": "4620696263626366976",
"t": 1764659101721,
"p": "87027.14",
"q": "0.00026",
"m": true
}
}
Update frequency: Real-time push
Subscription parameters:
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| topic | STRING | Y | trade | Topic for "trade" data push |
| event | STRING | Y | sub | Subscribe ("sub") or Unsubscribe ("cancel") |
| params | DICTIONARY | Y | Request Parameters | |
| params.symbol | STRING | Y | ETHUSDT | Trading Pairs see Get-Exchange-Information |
WS Push Demo
| PARAMETER | TYPE | Example | DESCRIPTION |
|---|---|---|---|
| topic | STRING | trade | Topic for "trade" data push |
| params | DICTIONARY | - | Request Parameters |
>symbol |
STRING | ETHUSDT | Trading Pairs see Get-Exchange-Information |
| data | DICTIONARY | - | WS Push Content Data |
>v |
STRING | 4620696263626366976 | Transaction record ID |
>t |
LONG | 1730100239050 | Data Time (milisecond) |
>p |
STRING (decimal) | ETHUSDT | Traded price |
>q |
STRING (decimal) | 1808.48 | Traded quantity |
>m |
BOOLEAN | true | true: buyer is the maker false: buyer is the taker |
Depth
Request Example:
{
"topic":"depth",
"event":"sub",
"params":{
"symbol": "BTCUSD"
}
}
Response content:
{
"topic": "depth",
"params": {
"symbol": "BTCUSD"
},
"data": {
"s": "BTCUSD",
"t": 1764659869550,
"v": "735962141_2",
"b": [
[
"86962.98",
"0.04215"
],
[
"86961.35",
"0.00057"
]
],
"a": [
[
"86962.99",
"0.34497"
],
[
"86963.94",
"0.00114"
]
]
}
}
Update frequency: 100ms
Subscription parameters:
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| topic | STRING | Y | depth | Topic for "depth" data push |
| event | STRING | Y | sub | Subscribe ("sub") or Unsubscribe ("cancel") |
| params | DICTIONARY | Y | Request Parameters | |
| params.symbol | STRING | Y | ETHUSDT | Trading Pairs see Get-Exchange-Information |
WS Push Demo
| PARAMETER | TYPE | Example | DESCRIPTION |
|---|---|---|---|
| topic | STRING | depth | Topic for "depth" data push |
| params | DICTIONARY | - | Request Parameters |
>symbol |
STRING | - | Trading Pairs see Get-Exchange-Information |
| data | DICTIONARY | - | WS Push Contenet Data |
>s |
STRING | ETHUSDT | Trading Pair |
>t |
LONG | 1730100300000 | Data Time (milisecond) |
>v |
STRING | 55834575325_3 | Message Version |
>b |
JSON Array | ["0.704", "28.477"] | Bid price and quantity |
>a |
JSON Array | ["0.703", "46.671" ] | Ask price and quantity |
BBO
Request Example:
{
"topic":"bbo",
"event":"sub",
"params":{
"symbol": "BTCUSD"
}
}
Response content:
{
"topic": "bbo",
"params": {
"symbol": "BTCUSD"
},
"data": {
"s": "BTCUSD",
"b": "86900",
"bz": "0.01113",
"a": "86900.01",
"az": "0.01323",
"t": 1764660363112
}
}
Update frequency: Real-time push
Subscription parameters:
| PARAMETER | TYPE | Req'd | Example | DESCRIPTION |
|---|---|---|---|---|
| topic | STRING | Y | bbo | Topic for "bbo" data push |
| event | STRING | Y | sub | Subscribe ("sub") or Unsubscribe ("cancel") |
| params | DICTIONARY | Y | Request Parameters | |
| params.symbol | STRING | Y | ETHUSDT | Trading Pairs see Get-Exchange-Information |
WS Push Demo
| PARAMETER | TYPE | Example | DESCRIPTION |
|---|---|---|---|
| topic | STRING | bbo | Topic for "bbo" data push |
| params | DICTIONARY | - | Request Parameters |
>symbol |
STRING | ETHUSDT | Trading Pairs see Get-Exchange-Information |
| data | DICTIONARY | - | WS Push Contenet Data |
>s |
STRING | ETHUSDT | Trading Pair |
>t |
LONG | 1730100239050 | Data Time (milisecond) |
>b |
STRING (decimal) | 1802.04 | Bid Price |
>bz |
STRING (decimal) | 0.008 | Bid Quantity |
>a |
STRING (decimal) | 1803.5 | Ask Price |
>az |
STRING (decimal) | 0.001 | Ask Quantity |
User Data Stream
Use Private stream
- Sandbox:
wss://stream-pro.sim.hashkeydev.com/api/v1/ws/{listenKey} - Production:
wss://stream-pro.hashkey.com/api/v1/ws/{listenKey}
Note: Replace {listenKey} with your actual listen key obtained from the Obtain ListenKey.
Account Update
[
{
"e": "outboundAccountInfo",
"E": "1764932840383",
"T": true,
"W": true,
"D": true,
"B": [
{
"a": "BTC",
"f": "6086.715847759989968887",
"l": "0",
"r": ""
}
]
}
]
Trading/Custody/Fiat/OPT Account update
WS Push Parameter
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| - | Object Array | ||
| e | STRING | outboundAccountInfo | Event type:outboundAccountInfooutboundCustodyAccountInfooutboundFiatAccountInfooutboundOptAccountInfo |
| E | STRING | 1764932840383 | Event timeStamp |
| T | BOOLEAN | true | can trade |
| W | BOOLEAN | true | can withdraw |
| D | BOOLEAN | true | can deposit |
| B | Object Array | ||
>a |
STRING | BTC | asset |
>f |
STRING | 6086.7 | free amount |
>l |
STRING | 0 | locked amount |
>r |
STRING | remark |
[
{
"e": "outboundContractAccountInfo",
"E": "1769069566346",
"T": true,
"W": true,
"D": true,
"B": [
{
"a": "USD",
"t": "4999777.908366280931145965",
"f": "4995055.805095280931145965",
"r": ""
}
]
}
]
Futures Account update
WS Push Parameter
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| - | Object Array | ||
| e | STRING | outboundContractAccountInfo | Event type |
| E | STRING | 1769069566346 | Event timeStamp |
| T | BOOLEAN | true | can trade |
| W | BOOLEAN | true | can withdraw |
| D | BOOLEAN | true | can deposit |
| B | Object Array | ||
>a |
STRING | USD | asset |
>t |
STRING | 4999777.908366280931145965 | total amount |
>f |
STRING | 4995055.805095280931145965 | free amount |
>r |
STRING | remark |
Order Update
[
{
"e": "executionReport",
"E": "1764935787849",
"s": "ETHUSD",
"c": "1764935787802434",
"S": "SELL",
"o": "MARKET_OF_BASE",
"f": "IOC",
"q": "0.01",
"p": "0",
"X": "NEW",
"i": "2098827941690738688",
"M": "0",
"l": "0",
"z": "0",
"L": "0",
"n": "0",
"F": "0",
"N": "",
"u": true,
"w": true,
"m": false,
"O": "1764935787818",
"U": "1764935787818",
"Z": "0",
"A": "0",
"C": false,
"v": "0",
"reqAmt": "0",
"d": "",
"r": "0.01",
"V": "0",
"x": ""
},
{
"e": "executionReport",
"E": "1764935787849",
"s": "ETHUSD",
"c": "1764935787802434",
"S": "SELL",
"o": "MARKET_OF_BASE",
"f": "IOC",
"q": "0.01",
"p": "0",
"X": "FILLED",
"i": "2098827941690738688",
"M": "0",
"l": "0.01",
"z": "0.01",
"L": "3150.11",
"n": "1.99",
"F": "0",
"N": "USD",
"u": true,
"w": true,
"m": false,
"O": "1764935787818",
"U": "1764935787823",
"Z": "31.5011",
"A": "0",
"C": false,
"v": "0",
"reqAmt": "0",
"d": "2098827941783013377",
"r": "0",
"V": "3150.11",
"x": ""
}
]
Spot Trading Execution Report
WS Push Parameter
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| - | Object Array | ||
| e | STRING | executionReport | Execution Report |
| E | STRING | 1764936108760 | Event timeStamp |
| s | STRING | ETHUSD | symbol |
| c | STRING | 1764936108734433 | client order ID |
| S | STRING | SELL | side |
| o | STRING | LIMIT | order type |
| f | STRING | GTC | time in force |
| q | STRING | 0.01 | order quantity |
| p | STRING | 3150 | order price |
| X | STRING | FILLED | current order status |
| i | STRING | 2098830633787983872 | order ID |
| M | STRING | 0 | match order ID, ignore for now |
| l | STRING | 0.01 | last executed quantity |
| z | STRING | 0.01 | cumulative filled quantity |
| L | STRING | 3150.11 | last executed price |
| n | STRING | 1.99 | commission amount |
| F | STRING | 0 | Fee rebill |
| N | STRING | USD | commission asset |
| u | BOOLEAN | true | is the trade normal? ignore for now |
| w | BOOLEAN | true | is the order working? Stops will have |
| m | BOOLEAN | false | if the order is a limit maker order |
| O | STRING | 1764936108741 | order creation time |
| U | STRING | 1764936108745 | order update time |
| Z | STRING | 31.5011 | cumulative quote asset transacted quantity |
| A | STRING | 0 | match Account ID, ignore for now |
| C | BOOLEAN | false | is close, Is the buy close or sell close |
| v | STRING | 0 | leverage |
| reqAmt | STRING | 0 | requested cash amount |
| d | STRING | 2098830633863481345 | execution ID |
| r | STRING | 0 | unfilled quantity |
| V | STRING | 3150.11 | average executed price |
| x | STRING | order cancel reject reason |
[
{
"e": "contractExecutionReport",
"E": "1769069566346",
"s": "BTCUSD-PERPETUAL",
"c": "0122test01",
"S": "BUY",
"o": "LIMIT",
"f": "GTC",
"obq": "0.001",
"p": "89800",
"X": "NEW",
"i": "2133504589195380992",
"l": "0",
"ebq": "0",
"L": "",
"n": "0",
"N": "",
"u": true,
"w": true,
"m": false,
"O": "1769069566331",
"eqq": "0",
"v": "4",
"oqq": "89.8",
"d": "",
"r": "0.001",
"V": "0",
"lo": false,
"lt": "",
"x": ""
},
{
"e": "contractExecutionReport",
"E": "1769069566346",
"s": "BTCUSD-PERPETUAL",
"c": "0122test01",
"S": "BUY",
"o": "LIMIT",
"f": "GTC",
"obq": "0.001",
"p": "89800",
"X": "FILLED",
"i": "2133504589195380992",
"l": "0.001",
"ebq": "0.001",
"L": "89797.8",
"n": "0.05387868",
"N": "USD",
"u": true,
"w": true,
"m": false,
"O": "1769069566331",
"eqq": "89.7978",
"v": "4",
"oqq": "89.8",
"d": "2133504589262489856",
"r": "0",
"V": "89797.8",
"lo": false,
"lt": "",
"x": ""
}
]
Futures Trading Execution Report
WS Push Parameter
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| - | Object Array | ||
| e | STRING | contractExecutionReport | Contract Execution Report |
| E | STRING | 1769069566346 | Event timeStamp |
| s | STRING | BTCUSD-PERPETUAL | symbol |
| c | STRING | 1764936108734433 | client order ID |
| S | STRING | SELL | side |
| o | STRING | LIMIT | order type |
| f | STRING | GTC | time in force |
| obq | STRING | original base asset quantity | |
| p | STRING | 3150 | order price |
| X | STRING | FILLED | current order status |
| i | STRING | 2098830633787983872 | order ID |
| l | STRING | 0.01 | last executed quantity |
| ebq | STRING | executed base asset quantity | |
| L | STRING | 3150.11 | last executed price |
| n | STRING | 1.99 | commission amount |
| N | STRING | USD | commission asset |
| u | BOOLEAN | true | is the trade normal? ignore for now |
| w | BOOLEAN | true | is the order working? Stops will have |
| m | BOOLEAN | false | if the order is a limit maker order |
| O | STRING | 1764936108741 | order creation time |
| eqq | STRING | executed quote asset quantity | |
| v | STRING | 0 | leverage |
| oqq | STRING | original quote asset quantity | |
| d | STRING | 2098830633863481345 | execution ID |
| r | STRING | 0 | unfilled quantity |
| V | STRING | 3150.11 | average executed price |
| lo | BOOLEAN | true | Is liquidation Order |
| lt | STRING | LIQUIDATION_MAKER | Liquidation type LIQUIDATION_MAKER_ADL, LIQUIDATION_MAKER, LIQUIDATION_TAKER |
| x | STRING | order cancel reject reason |
Ticket Push
[
{
"e": "ticketInfo",
"E": "1764938485090",
"s": "ETHUSD",
"q": "0.10",
"t": "1764938485085",
"p": "3153.80",
"T": "4629700489901088768",
"o": "2098850567964329984",
"c": "1764938485067417",
"O": "0",
"a": "1471090223379184384",
"A": "0",
"m": false,
"S": "BUY"
}
]
WS Push Parameter
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| - | Object Array | ||
| e | STRING | ticketInfo | |
| E | STRING | 1764936108760 | Event timeStamp |
| s | STRING | ETHUSD | symbol |
| q | STRING | 0.01 | order quantity |
| t | STRING | 1764938485085 | order matching time |
| p | STRING | 3150 | order price |
| T | STRING | 4629700489901088768 | ticketId |
| o | STRING | 2098850567964329984 | order ID |
| c | STRING | 1764938485067417 | clientOrderId |
| O | STRING | 0 | match Order ID, ignore for now |
| a | STRING | 1471090223379184384 | account ID |
| A | STRING | 0 | match Account ID, ignore for now |
| m | BOOLEAN | false | isMaker |
| S | STRING | BUY | side SELL or BUY |
Position Push
[
{
"e": "outboundContractPositionInfo",
"E": "1769069566346",
"A": "2129188333171126016",
"s": "BTCUSD-PERPETUAL",
"S": "LONG",
"p": "91444.6",
"P": "0.196",
"f": "0",
"m": "4400.349",
"r": "-236.80662126",
"up": "-321.7542",
"pr": "-0.0731",
"pv": "17601.3962",
"v": "4",
"mt": "CROSS"
}
]
WS Push Parameter
| PARAMETER | TYPE | Example Values | DESCRIPTION |
|---|---|---|---|
| - | Object Array | ||
| e | STRING | outboundContractPositionInfo | Event Type |
| E | STRING | 1764936108760 | Event timeStamp |
| A | STRING | 2129188333171126016 | Account ID |
| s | STRING | BTCUSD-PERPETUAL | symbol |
| S | STRING | LONG | side, LONG or SHORT |
| p | STRING | 91444.6 | avg Price |
| P | STRING | 0.196 | total position |
| f | STRING | 0 | liquidation price |
| m | STRING | 4400.349 | portfolio margin |
| r | STRING | -236.80662126 | realised profit and loss (Pnl) |
| up | STRING | -321.7542 | unrealized profit and loss (unrealizedPnL) |
| pr | STRING | -0.0731 | profit rate of current position |
| pv | STRING | 17601.3962 | position value (USD) |
| v | STRING | 4 | leverage |
| mt | STRING | CROSS | position type |
Market Place Stream
Public Stream
Use Public stream V1
- Sandbox:
wss://stream-pro.sim.hashkeydev.com/mp/ws/v1 - Production:
wss://stream-pro.hashkey.com/mp/ws/v1
Request Example:
{
"event": "SUBSCRIBE",
"topic": "rfqs"
}
Subscription parameters:
| Parameter | Type | Required | Example value | Description |
|---|---|---|---|---|
| event | STRING | Y | SUBSCRIBE , UNSUBSCRIBE sub , cancel |
|
| topic | STRING | Y | rfqs, quotes |
topic=
rfqs
Public channel, push all "new" RFQs
newly created rfqs or rfqs becomes "new" again (like accepted quote expired before confirmation, the rfq will become "new")
{
"event": "rfqCreated",
"topic": "rfqs",
"data": {
"rfqId": "RFQ_123",
"buyCcy": "BTC",
"sellCcy": "USDT",
"buyAmount": "2",
"sellAmount": "",
"rfqMode": "real-time",
"expire_time": 1717410000
}
}
topic=
quotes
- Public channel, push all quotes once created
{
"event": "quotesCreated",
"topic": "quotes",
"data": {
"quoteId": "QUOTE_789456123",
"rfqId": "RFQ638459562162049024",
"buyCcy": "BTC",
"sellCcy": "USDT",
"buyAmount": "2",
"sellAmount": "",
"price": "68900",
"expireTime": 1717394200
}
}
WS Push Demo 👉
Private Stream
topic=
bestQuote
Push the best quote portfolio to the channel (if at least 3 valid quotations are met within 3s, or all valid quotes after 3s)
Only list the latest quote from each LP
Ranking principle: rfqMode > Price > quote time
{
"topic": "bestQuote",
"data": [
{
"id": 9,
"inquiryOrderId": "MP738048140639408128", //rfqId
"lpName": "WX",
"quoteOrderId": "MPQ738048203885318144", //quoteId
"direction": 1,
"status": 0,
"buyAssetId": "BTC",
"buyAmount": "0.0942",
"sellAssetId": "USDT",
"sellAmount": "10000",
"price": "106050",
"submitTime": 1753772404507,
"dateExpiry": 1753772464507,
"expirySeconds": 60,
"remainingTime": 1122,
"inquirySettleType": 2,
"quoteSettleType": 1, // 1: delayed 2: real-time
"rank": 1,
"isBestPrice": true,
"isRecommendPrice": true
},
{
"id": 10,
"inquiryOrderId": "MP738048140639408128", //rfqId
"lpName": "GSR",
"quoteOrderId": "MPQ738048203885318145", //quoteId
"direction": 1,
"status": 0,
"buyAssetId": "BTC",
"buyAmount": "0.0942",
"sellAssetId": "USDT",
"sellAmount": "10000",
"price": "106059",
"submitTime": 1753772404507,
"dateExpiry": 1753772464507,
"expirySeconds": 60,
"remainingTime": 1122,
"inquirySettleType": 2,
"quoteSettleType": 1, // 1: delayed 2: real-time
"rank": 2,
"isBestPrice": false,
"isRecommendPrice": false
},
]
}
topic=
rfqUpdates
{
"event": "update",
"topic": "rfqUpdates",
"data": {
"rfqId": "RFQ_123",
"rfqClOrderId": "RFQClOrder_123",
"buyCcy": "BTC",
"sellCcy": "USDT",
"buyAmount": "",
"sellAmount": "2",
"rfqMode": "real-time",
"quoteId": "quote_123",
"price": 120001,
"quoteMode": "real-time",
"status": "accepted",
"statusInt": "2",
"isLPReject": false,
"expiryTime": 1717410000
}
}
Use Private stream
- Sandbox:
wss://stream-pro.sim.hashkeydev.com/api/v1/ws/{listenKey} - Production:
wss://stream-pro.hashkey.com/api/v1/ws/{listenKey}
Note: Replace {listenKey} with your actual listen key obtained from the Obtain ListenKey.
WS Push Demo 👉
FIX API
HashKey Exchange supports FIX Protocol version 4.4 and 5.0 SP2.
There will be 3 types of Gateways our clients can connect depends on their needs.
FIX Trading Gateway: Provides generic order entry capabilities, enabling client to submit orders and receive real-time information on executed trades.
Drop-Copy Gateway: Is a real-time and read-only data service designed to facilitate monitoring of trade, position, order activities (e.g. operations and regulatory feeds) and is a separate channel from main order entry.
Market Data Gateway: Enable clients to subscribe and receive real-time order book market data. Available fields include bid, ask
Session Management
Header and Trailer
All FIX messages must begin with header fields and end with a trailer field.
Standard Header
| Tag# | Field Name | Required | Comments |
|---|---|---|---|
| 8 | BeginString | Yes | Identifies the beginning of message and protocol version. Always the first tag in the message. Valid value: FIX.4.4, FIXT.1.1 (FIX 5.0 SP2) |
| 9 | BodyLength | Yes | Message length, in bytes, forward to the CheckSum <10> field. Always second field in the message |
| 35 | MsgType | Yes | Defines message type. Always third field in message |
| 49 | SenderCompID | Yes | Identifies the sender of the message agreed between HashKey and the client |
| 56 | TargetCompID | Yes | Identifies the target of the message as agreed between HashKey and the client |
| 34 | MsgSeqNum | Yes | Message Sequence number. Handled by FIX engine. Indicates possible retransmission of message with this sequence number |
| 43 | PossDupFlag | No* | Indicates possible retransmission of message with this sequence number • Required for re-transmitted message |
| 97 | PossResend | Yes | Indicates when message may be a duplicate of another message sent under a different sequence number |
| 52 | SendingTime | Yes | Time of the message transmission in UTC |
| 122 | OrigSendingTime | No* | • Required for message sent as a result of ResendRequest (Expressed in UTC) |
Standard Trailer
| Tag | Field Name | Comments |
|---|---|---|
| 10 | CheckSum | Simple checksum. Always defined three characters in the last field in the message |
Logon <A>
The Logon <A> message authenticates a user and starts a session. It must be the first message sent by any application requesting to initiate a FIX session. A message of the same type will be sent to acknowledge the logon.
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = A | |
| 98 | EncryptMethod | Yes | Method of encryption Valid values: 0 – None / other |
| 108 | HeartBtInt | Yes | Heartbeat interval in seconds. Valid values: 30 (30 seconds) |
| 141 | ResetSeqNumFlag | No | Indicates that both sides of the FIX session should reset sequence numbers Valid values: Y – Yes, reset sequence numbers N – No (Default) |
| 553 | Username | Yes | User Id (provided during onboarding) |
| 554 | Password | Yes | Password (provided during onboarding) |
| 1137 | DefaultApplVerID | Yes* | The default version of FIX message used in this session: • 9 = FIX50SP2 • Required for FIX 5.0 SP2 only |
| Standard trailer | Yes |
Heartbeat <0>
The Heartbeat <0> monitors the status of the communication link. The exchange will anytime send a Heartbeat if there are no message transmitted during heartbeat interval
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = 0 | |
| 112 | TestReqID | No* | • Identifier to be returned in resulting Heartbeat if request from a Testrequest <1> |
| Standard trailer | Yes |
Test Request <1>
The Test Request <1> message forces a heartbeat from the opposing application. The Test Request <1> checks sequence numbers and verifies line status. The opposite application responds to the Test <1> with a Heartbeat <0> containing the TestReqID <112>.
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = 1 | |
| 112 | TestReqID | Yes | Identifier included in Test Request <1> message to be returned in resulting Heartbeat <0> |
| Standard trailer | Yes |
Resend Request <2>
The Resend Request <2> message is sent by either side to initiate the retransmission of messages. This function can be used if a sequence number gap is detected or if either side lost a message or as a function of the initialisation process.
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = 2 | |
| 7 | BeginSeqNo | Yes | Sequence number of the first message in range to be resent |
| 16 | EndSeqNo | Yes | Sequence number of last message in range to be resent. Set EndSeqNo to 0 if all messages subsequent to BeginSeqNo are required |
| Standard trailer | Yes |
Reject <3>
The Reject <3> message is issued by the server when a message is received but cannot be properly processed due to session-level rule. The reason for the rejection may be given in the Text <58> field.
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = 3 | |
| 45 | RefSeqNum | Yes | MsgSeqNum <34> of the rejected message |
| 371 | RefTagID | No | The tag number of the FIX field being referenced |
| 372 | RefMsgType | No | The MsgType <35> of the FIX message being referenced |
| 373 | SessionRejectReason | No | Code to identify the reason for the session level Reject message |
| 58 | Text | No | Message to explain reason for rejection |
| Standard trailer | Yes |
Sequence Reset <4>
The Sequence Reset <4> message by sending the application to reset the incoming sequence number on the opposing side.
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = 4 | |
| 123 | GapFillFlag | No | Indicates replacing administrative or application messages which will not be resent. Valid values: • Y = Gap Fill mode • N = Sequence Reset mode |
| 36 | NewSeqNo | Yes | New Sequence Number. The receiver should expect this to be the sequence number of the following message |
| Standard trailer | Yes |
Logout <5>
The Logout <5> message is sent by either side to initiate a session termination. A response message of the same type will be sent to acknowledge the logout.
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = 5 | |
| 58 | Text | No | Message that explains logout reason |
| Standard trailer | Yes |
Business Message Reject <j>
The business message reject <j> message is issued by the server prior to entering the trading core function, when a message is received but cannot be properly processed due to business level rule violation. The reason of the rejection may be given in the Text <58> field.
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = j | |
| 45 | RefSeqNum | Yes | MsgSeqNum <34> of the rejected message |
| 372 | RefMsgType | Yes | The MsgType <35> of the message being referenced |
| 379 | BusinessRejectRefID | No | The value of the business level ID field on the message being referenced |
| 380 | BusinessRejectReason | Yes | Code to identify the reason for the BusinessMessage Reject <j> message |
| 58 | Text | No | Message that explains the reject reason |
| Standard trailer | Yes |
Error Codes
| Tag=380 | Tag=58 |
|---|---|
| 3000 | Cone client order id exist |
| 3001 | Cone order not found |
| 3008 | Cone deposit order not found |
| 3011 | Cone withdraw order not found |
| 3018 | Cone buy order not allowed |
| 3019 | Cone sell order not allowed |
| 3021 | Cone order out of memory |
| 3022 | Cone history order out of memory |
| 3026 | Cone batch order num invalid |
| 3027 | Cone max open order exceeded |
| 3033 | Cone invalid price too high |
| 3034 | Cone invalid price too low |
| 3035 | Cone exceed the maximum limit |
| 3036 | Cone invalid quantity too high |
| 3037 | Cone invalid quantity too low |
| 3038 | Cone invalid amount too high |
| 3039 | Cone invalid amount too low |
| 3040 | Cone invalid order type |
| 3041 | Cone unable push market order |
| 3042 | Cone order time too slow |
| 3043 | Cone order time too fast |
| 3044 | Cone order complex order invalid price |
| 3045 | Cone max special order exceeded |
| 3046 | Cone futures open order not allowed |
| 3047 | Cone futures close order not allowed |
| 3048 | Cone futures invalid operation order |
| 3052 | Cone open order exist |
| 30200 | Maximum open orders exceeded |
| 31084 | Order has been canceled |
| 31085 | Order has been filled |
| 31086 | Cannot be found on order book |
| 31087 | Order has been locked |
| 31088 | This order type does not support cancellation |
| 31089 | Cannot be found on order book |
| 31090 | Order creation timeout |
| 31091 | Order cancellation timeout |
| 31102 | In order to protect your assets, please set account password first |
| 32000 | Order processing error |
| 32001 | Wrong order side |
| 32002 | Wrong order type |
| 32003 | Duplicate order request |
| 32004 | Order does not exist |
| 32005 | Create order failed |
| 32006 | Cancel order failed |
| 32007 | Please enter the price |
| 32008 | Please enter the correct price |
| 32009 | Please enter the quantity |
| 32010 | Please enter the correct quantity |
| 32011 | Order filled |
| 32012 | Transaction amount too large |
| 32013 | Create Marker Order Failed. |
| 32014 | Exceed the maximum number of conditional orders of {0} |
| 32015 | Exceed the maximum number of commissioned orders of {0} |
| 32016 | Market orders are restricted at present |
| 32017 | The order price cannot be below {0}{1} |
| 32018 | The order price cannot exceed {0} {1} |
| 32019 | The buy price cannot exceed {0} of the marked price |
| 32020 | The sell price cannot be below {0} of the marked price |
| 32021 | The buy quantity cannot be below {0} {1} |
| 32022 | The buy quantity cannot exceed {0} {1} |
| 32023 | Cannot exceed the maximum sell price of {0} {1} |
| 32024 | The sell quantity cannot be below {0} {1} |
| 32025 | The sell quantity cannot exceed {0} {1} |
| 32026 | The turnover cannot be below {0} {1} |
| 32027 | The turnover cannot exceed {0} {1} |
| 32028 | Cannot be less than the minimum buy price of {0} {1} |
| 32029 | The buy price cannot exceed {0} of the latest price |
| 32030 | The sell price cannot be below {0} of the latest price |
| 32031 | The order price cannot be higher than the trigger price {0} |
| 32032 | The order price cannot be lower than the trigger price {0} |
| 32033 | Trading for closing position only supports market price |
| 32034 | Trading does not support reverse opening position |
| 32035 | Trading for limit order only supports IOC/FOK modes |
| 32036 | Trading for trigger order only supports market price |
| 32046 | Copy trading follow order failed status |
| 32100 | Order sign error |
| 32102 | Order price too high |
| 32103 | Order price lower than the minimum |
| 32104 | Order price decimal exceed precision limit |
| 32105 | Order quantity too large |
| 32106 | Order quantity lower than the minimum |
| 32107 | Order amount decimal exceed precision limit |
| 32108 | Order price exceeds permissible range |
| 32113 | Order quantity lower than the minimum {0} |
| 32123 | Price too high, please order again! |
| 32124 | Price too low, please order again! |
| 32125 | This order price is unreasonable to exceed (or be lower than) the liquidation price, this order is not accepted. |
| 32126 | Contract order quantity is invalid |
| 32139 | Create order rejected |
| 32141 | Open order exists |
| 32142 | Open order not allow |
| 32143 | Close order not allow |
| 32144 | Position and order data error |
| 32148 | The margin mode cannot be changed while you have an open order/position |
| 32149 | Request order size too long |
| 32153 | The number of open orders exceeds the limit. |
| 32170 | Order price is less than min ask price |
| 32171 | Order price is greater than max bid price |
| 32172 | Order margin rate less than min margin rate |
| 32173 | Order reduce position but open |
| 32174 | Order system balance error |
| 32175 | Order margin insufficient |
| 32176 | Order open value insufficient |
| 32177 | Order rejected open margin rate |
| 32178 | Order match rejected |
| 32179 | Order time expired |
| 32301 | Invalid plan order type |
| 32302 | Create stop profit-loss plan order reject, make sure is close. |
| 32401 | Fail to create order: untriggered stop-limit order of this pair reached upper limit. |
| 32402 | Fail to create order: exceed the total balance of the asset. |
| 32403 | Fail to create order: this trading pair does not support stop-limit orders. |
| 33001 | Insufficient account balance |
| 36014 | This order cannot be canceled |
| 41103 | The same type of ad order has not finished, the new ad can't be post yet |
| 41200 | Order no longer exist |
| 41302 | User placed an order, but payment type does not match OTC merchant payment type |
| 42001 | Order Failed |
| 42006 | Due to excessive cancellation of your order, your trading is suspended today |
| 42020 | Only one order is allowed at the same time! |
| 42037 | The order already exists. Please wait for the payment result. |
| 43001 | Order payment failed, please try again later |
| 43002 | client_order_id parameter value exceeds length limit |
| -32183 | Unsupported ClOrdID (11) |
| -32184 | CIOrdID no more than 20 characters |
| -32185 | Invalid accountID |
| -32186 | Invalid accountID (1) |
| -32187 | Unsupported OrderType (40) |
| -32188 | Invalid symbol (55) |
| -32189 | Unsupported Side (54) |
| -32190 | Maker flag value error:market order can only be taker |
| -32191 | Unsupported OrderQty (38) |
| -32192 | Unsupported CashOrderQty or OrderQty (152) |
Trading Management
Create Order <D>
FIX message ‘New Order – Single (D)’ is used to submit orders to the HashKey PRO Trading system and available only in Trading Gateway
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = D | |
| 1 | Account | No* | • Required for sessions that route to multiple sub-accounts |
| 11 | CIOrderID | Yes | ID originated by the client. Uniqueness must be guaranteed by session |
| 55 | Symbol | Yes | Currency-pair. e.g. BTC-USDC, ETH-BTC, ETH-USDC |
| 18 | ExecInst | No | • Required to specify the order as Post only. Valid values: '6' = Participate don’t initiate |
| 38 | OrderQty | No* | Quantity to trade. • Required for Limit order |
| 152 | CashOrdQty | No* | Cash Amount to trade in quote currency. • Required for Market order |
| 44 | Price | Yes* | Price of limit order. • Required for OrdType <40> is '2' = Limit |
| 40 | OrdType | Yes* | Valid values: '1' = Market Order '2' = Limit Order |
| 54 | Side | Yes | Valid values: '1' – Buy '2' – Sell |
| 59 | TimeInForce | No | Specific how long the order remains in effect. '1' GTC - LIMIT only '3' IOC - MARKET only |
| 60 | TransactTime | Yes | Time of order creation/execution (UTC) YYYYMMDD-HH:MM:SS.sss |
| 453 | NoPartyIDs | No | Repeating group containing PartyIDs <448>, PartyIDSource <447>, PartyRole <452> (Not in use) |
| 448 | PartyID | No | Party Identifier/Code (Not in use) |
| 447 | PartyIDSource | No | Identifies class or source of PartyID <448> (Not in use) |
| 452 | PartyRole | No | Identifies type or role of Party ID <448> (Not in use) |
| Standard trailer | Yes |
Cancel Order <F/G>
The Order Cancel Request message is used to cancel an existing order with remaining quantity.
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = F | |
| 1 | Account | No* | • Required for sessions that route to multiple sub-accounts |
| 11 | CIOrderID | Yes | Unique ID of cancel request as assigned by the client |
| 41 | OrigCIOrdID | No* | CIOrdID <11> of the order to cancel. Needs to correspond to a current order submitted during the trading session. (Currently it is not validated) |
| 37 | OrderID | Yes | Unique identifier of the order in HashKey Exchange Trading System. This ID will be used to find the order to be cancelled |
| 54 | Side | No* | Side of the order to cancel. Valid values: '1' – Buy '2' – Sell |
| 55 | Symbol | No* | Currency-pair. e.g. BTC-USDC, ETH-BTC, ETH-USDC |
| 60 | TransactTime | Yes | Time that the order cancel request was initiated by the institution (expressed in UTC) i.e. YYYYMMDD-HH:MM:SS.sss |
| Standard trailer | Yes |
Order Mass Cancel Request <q>
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = q | |
| 1 | Account | No* | If not specified, open orders for all accounts are listed for cancellation • Required for sessions that route to multiple sub-accounts |
| 11 | CIOrderID | Yes | Client specified identifier of the mass cancel request |
| 530 | MassCancelRequestType | Yes | Valid values: '3' – Cancel all firm orders for instrument '7' – Cancel all firm open orders |
| 55 | Symbol | No* | • Required if the scope of mass cancel is for an instrument |
| 60 | TransactTime | Yes | Time the mass cancel request was created (express in UTC) |
| Standard trailer | Yes |
Execution Report <8>
The Execution Report <8> is used to:
- Acknowledge the receipt of an order
- Confirm changes to an existing order (i.e. cancelled)
- Relay order status information
- Reject order
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = 8 | |
| 37 | OrderID | Yes | Unique identifier of the order in HashKey PRO Trading System |
| 11 | CIOrdID | Yes | Unique ID of the order as assigned by client |
| 18 | ExecInst | No* | • Required to specify the order as Post only '6' – Participate don't initiate |
| 41 | OrigCIOrdID | No* | CIOrdID <11> of the cancelled order. • Required for response to Cancel Request (ExecType <150> = Cancelled) |
| 17 | ExecID | Yes | Unique identifier of execution message assigned by PRO Exchange |
| 1 | Account | Yes | • Required for sessions that route to multiple sub-accounts |
| 453 | NoPartyIDs | No | A repeating group which should contain unique combinations of below tags: PartyIDs <448>, PartyIDSource <447>, PartyRole <452> |
| 448 | PartyID | No | Party Identifier/Code (Currently not in use) |
| 447 | PartyIDSource | No | Identifies class or source of the PartyID <448> value (Currently not in use) |
| 452 | PartyRole | No | Identifies the type or role of the Party ID <448> (Currently not in use) |
| 150 | ExecType | Yes | Indicates the type of execution report Valid values: '0' – New '4' – Cancelled '8' – Rejected 'F' – Trade (partial fill or fill) |
| 39 | OrdStatus | Yes | State of the order Valid values: '0' – New '1' – Partially filled '2' – Filled '4' – Cancelled '8' – Rejected |
| 103 | OrdRejReason | No | Code to identify the reason or order rejection |
| 55 | Symbol | Yes | Currency-pair. e.g. BTC-USDC, ETH-BTC, ETH-USDC |
| 44 | Price | No* | Limit price of the order • Required if Limit order or ExecType <150> is not '8' = Rejected |
| 54 | Side | Yes | Valid values: '1' – Buy '2' – Sell |
| 40 | OrdType | Yes | Valid values: '1' – Market Order '2' – Limit Order |
| 31 | LastPx | No* | Price of the fill * Required if ExecType <150> = 'F' |
| 32 | LastQty | No* | Quantity of the fill * Required if ExecType <150> = 'F' |
| 38 | OrderQty | Yes | Quantity to trade |
| 152 | CashOrdQty | No* | Cash Amount to trade in quote currency |
| 59 | TimeInForce | Yes | Specifies how long the order remains in effect '1' – Good Till Cancel (GTC) '3' – Immediate or Cancel (IOC) |
| 151 | LeavesQty | Yes | Outstanding quantity for further execution (LeavesQty = OrderQty – CumQty) |
| 14 | CumQty | Yes | Total quantity filled |
| 6 | AvgPx | Yes | Calculated average price of all fills on this order |
| 12 | Commission | No* | • Required if ExecType <150> = 'F' |
| 13 | CommType | No* | Valid values: '2' – Percentage '3' – Absolute (total monetary amount) • Required if ExecType <150> = 'F' |
| 479 | CommCurrency | No* | Specifies the currency to be used for Commission • Required if ExecType <150> = 'F' |
| 851 | LastLiquidityInd | No* | Valid values: '1' – Added Liquidity (Maker) '2' – Removed Liquidity (Taker) • Required if ExecType <150> = 'F' |
| 75 | TradeDate | No | Indicates date of trade (UTC) referenced in YYYYMMDD format |
| 60 | TransactTime | Yes | Time of execution/order creation in UTC i.e. YYYYMMDD-HH:MM:SS.sss |
| 58 | Text | Yes | Providing supplemental information of the order |
| Standard trailer | Yes |
Order Cancel Reject <9>
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = 9 | |
| 37 | OrderID | Yes | Unique identifier of the order in HashKey PRO Trading System |
| 11 | CIOrdID | Yes | Unique ID of the order as assigned by client |
| 41 | OrigCIOrdID | No* | CIOrdID <11> of the existing order that cancel request want to execute |
| 39 | OrdStatus | Yes | State of the order Valid values: ▪ '0' – New ▪ '1' – Partially filled ▪ '2' – Filled ▪ '4' – Cancelled ▪ '8' – Rejected |
| 102 | CxlRejReason | No | Code to identify reason for cancelling rejection. Valid values ▪ '1' – Unknown order ▪ '3' – Order already in pending cancel status ▪ '4' Unable to process Order Mass Cancel request
|
| 434 | CxlRejResponseTo | Yes | Valid values: ▪ '1' Order Cancel Request (F) ▪ '2' Order Cancel/Replace Request (G) |
| 58 | Text | Yes | Providing supplemental information of the order |
| Standard trailer | Yes |
Request for Positions <AN>
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = AN | |
| 710 | PosReqID | Yes | Unique identifier for the request |
| 724 | PosReqType | Yes | Valid Values ▪ 0 – Positions |
| 263 | SubscriptionRequestType | Yes | Indicates to the other party what type of response is expected Valid values: ▪ 1 – Snapshot + Updates (Subscribe) ▪ 2- Disable previous Snapshot + Update Request (Unsubscribe) |
| 1 | Account | No* | ▪ Required for sessions that route to multiple sub-accounts |
| Standard trailer | Yes |
Position Report <AP>
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = AP | |
| 710 | PosReqID | Yes | Unique identifier provided by the client in position request message |
| 721 | PosMaintRptID | Yes | Unique identifier for this position Report |
| 724 | PosReqType | No* | Used to specify the type of position request being made. Must be always be '0' to indicate for 'Positions' |
| 728 | PosReqResult | No* | Result of a Request for Position. Valid values ▪ 0 – success ▪ 1 – unsupported request for positions ▪ 99 – other |
| 702 | NoPositions | No* | Number of position entries following |
| 702.15 | Currency | Yes | Currency |
| 702.704 | LongQty | Yes | Quantity of the given currency the client is long (Available) |
| Standard trailer | Yes |
Security Definition Request <c>
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = c | |
| 320 | SecurityReqID | Yes | Unique ID for this request |
| 321 | SecurityRequestType | Yes | Type of Security Definition Request Valid values: ▪ 0 = Single currency pair |
| 55 | Symbol | Yes | Currency pair. e.g. BTCUSDC, BTC-USDC, ETHUSD, ETH-USDC |
| Standard trailer | Yes |
Security Definition <d>
| Tag# | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = d | |
| 320 | SecurityReqID | Yes | ID from the corresponding Security Definition Request |
| 55 | Symbol | Yes | Trading symbol of the security E.g. BTCUSD |
| 5001 | BaseAsset | Yes | Base asset of security (e.g., BTC) |
| 5002 | QuoteAsset | Yes | Quote asset of security (e.g., USD) |
| 5003 | BaseAssetPrecision | Yes | Integer value that represents a number of decimal points in prices E.g. 0.00001 |
| 5004 | QuoteAssetPrecision | Yes | Integer value that represents a number of decimal points in size E.g. 0.00000001 |
| 6001 | RetailAllowed | Yes | Retail trading allowed Valid values: Y or N |
| 6002 | PiAllowed | Yes | PI trading allowed Valid values: Y or N |
| 6003 | CorporateAllowed | Yes | Corporate trading allowed Valid values: Y or N |
| 6004 | OmnibusAllowed | Yes | Omnibus trading allowed Valid values: Y or N |
| 7001 | LimitOrderMinQty | Yes | Minimum quantity required for Limit order E.g. 0.0003 |
| 7002 | LimitOrderMaxQty | Yes | Maximum quantity required for Limit order E.g. 16 |
| 7003 | LimitOrderMinAmount | Yes | Minimum cash notional required for Limit order E.g. 10 |
| 7004 | LimitOrderMaxAmount | Yes | Maximum cash notional required for Limit order E.g. 400000 |
| 8001 | MarketOrderMinQty | Yes | Minimum quantity required for Market order E.g. 0.0003 |
| 8002 | MarketOrderMaxQty | Yes | Maximum quantity required for Market order E.g. 8 |
| 8003 | MarketOrderMinAmount | Yes | Minimum cash notional required for Market order E.g. 10 |
| 8004 | MarketOrderMaxAmount | Yes | Minimum cash notional required for Market order E.g. 200000 |
| 9001 | TickSize | Yes | Smallest increment of price of a trading pair E.g. 0.01 |
| 9002 | StepSize | Yes | Smallest increment by which the quantity of an order can change E.g. 0.00001 |
| 9003 | buyPriceUpRate | Yes | Upper bound of the current last traded price E.g. 0.20 |
| 9004 | sellPriceDownRate | Yes | Lower bound of the current last traded price E.g. 0.20 |
| Standard trailer | Yes |
Security List Request <x>
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = x | |
| 320 | SecurityReqID | Yes | Unique ID for this request |
| 559 | SecurityListRequestType | Yes | Type of Security Definition Request Valid values: ▪ 4 = All trading pairs |
| 15 | Currency | Yes | List all the trading pairs by currency E.g. USD, HKD, USDT, USDC |
| Standard trailer | Yes |
Security List <y>
| Tag# | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = y | |
| 320 | SecurityReqID | Yes | ID from the corresponding Security Definition Request |
| 322 | SecurityResponseID | Yes | Unique response ID |
| 560 | SecurityRequestResult | Yes | 0 indicates a successful response. This is the only possible value in HashKey API |
| 393 | TotNoRelatedSym | No | Total number of securities to be returned for this request or number of instruments that matched initial search criteria |
| 146 | NoRelatedSym | No | Specifies the number of repeating symbols specified |
| 55 | Symbol | Yes | Trading symbol of the security E.g. BTCUSD |
| 5001 | BaseAsset | Yes | Base asset of security (e.g., BTC) |
| 5002 | QuoteAsset | Yes | Quote asset of security (e.g., USD) |
| 5003 | BaseAssetPrecision | Yes | Integer value that represents a number of decimal points in prices E.g. 0.00001 |
| 5004 | QuoteAssetPrecision | Yes | Integer value that represents a number of decimal points in size E.g. 0.00000001 |
| 6001 | RetailAllowed | Yes | Retail trading allowed Valid values: Y or N |
| 6002 | PiAllowed | Yes | PI trading allowed Valid values: Y or N |
| 6003 | CorporateAllowed | Yes | Corporate trading allowed Valid values: Y or N |
| 6004 | OmnibusAllowed | Yes | Omnibus trading allowed Valid values: Y or N |
| 7001 | LimitOrderMinQty | Yes | Minimum quantity required for Limit order E.g. 0.0003 |
| 7002 | LimitOrderMaxQty | Yes | Maximum quantity required for Limit order E.g. 16 |
| 7003 | LimitOrderMinAmount | Yes | Minimum cash notional required for Limit order E.g. 10 |
| 7004 | LimitOrderMaxAmount | Yes | Maximum cash notional required for Limit order E.g. 400000 |
| 8001 | MarketOrderMinQty | Yes | Minimum quantity required for Market order E.g. 0.0003 |
| 8002 | MarketOrderMaxQty | Yes | Maximum quantity required for Market order E.g. 8 |
| 8003 | MarketOrderMinAmount | Yes | Minimum cash notional required for Market order E.g. 10 |
| 8004 | MarketOrderMaxAmount | Yes | Minimum cash notional required for Market order E.g. 200000 |
| 9001 | TickSize | Yes | Smallest increment of price of a trading pair E.g. 0.01 |
| 9002 | StepSize | Yes | Smallest increment by which the quantity of an order can change E.g. 0.00001 |
| 9003 | buyPriceUpRate | Yes | Upper bound of the current last traded price E.g. 0.20 |
| 9004 | sellPriceDownRate | Yes | Lower bound of the current last traded price E.g. 0.20 |
| Standard trailer | Yes |
Drop Copy Management
HashKey Exchange has provided a drop copy gateway to enable our clients to receive additional copies of the Execution reported generated by the Exchange. This interface may also be used by clients to download the current status of all their orders in the event of a failure. The drop copy gateway cannot be used to submit orders or receive market data.
Market Data Management
Market Data Request <V>
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = V | |
| 262 | MDReqID | Yes | Unique identifier for Market Data request |
| 263 | SubscriptionRequestType | Yes | Indicates to the other party what type of response is expected Valid values: ▪ 1 – Snapshot + Updates (Subscribe) ▪ 2- Disable previous Snapshot + Update Request (Unsubscribe) |
| 264 | MarketDepth | Yes | Depth of market for Book Snapshot Valid values: ▪ 0 – full market depth (Up to 200 layers only) |
| 265 | MDUpdateType | No* | Specifies the type of Market Data update Valid values: ▪ 0 = Full Refresh ▪ 1 = Incremental Refresh * Required when SubscriptionRequestType 263=1 (Snapshot + Updates) |
| 267 | NoMDEntryTypes | Yes | Number of MDEntryType <269> fields requested |
| 269 | MDEntryType | Yes | Entries that the client requesting is interested in receiving. There can be multiple fields Valid Values: ▪ 0 = Bid ▪ 1 = Offer ▪ 2 = Trade ▪ 4 = Opening Price ▪ 5 = Closing Price ▪ 7 = Trading Session High Price (24 hours) ▪ 8 = Trading Session Low Price (24 hours) ▪ B = Trade Volume (24 hours) |
| 146 | NoRelatedSym | Yes | Number of symbols (instruments) requested |
| 55 | Symbol | Yes | Currency-pair. e.g. BTC-USDC, ETH-BTC, ETH-USDC |
| Standard trailer | Yes |
Snapshot/Full Refresh <W>
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = W | |
| 262 | MDReqID | Yes | Unique identifier for Market Data Request (V) this message is in response to |
| 55 | Symbol | Yes | Currency-pair. e.g. BTC-USDC, ETH-BTC, ETH-USDC |
| 268 | NoMDEntries | Yes | Number of entries in this message |
| 268.269 | MDEntryType | Yes | Type of market update Valid Values: ▪ 0 = Bid ▪ 1 = Offer ▪ 2 = Trade ▪ 4 = Opening Price ▪ 5 = Closing Price ▪ 7 = Trading Session High Price (24 hours) ▪ 8 = Trading Session Low Price (24 hours) ▪ B = Trade Volume (24 hours) |
| 268.270 | MDEntryPx | Yes | Price of the Market Data Entry |
| 268.271 | MDEntrySize | Yes | Quantity or volume represented by the Market Data Entry |
| 268.272 | MDEntryDate | Yes | Date of Market Data Entry i.e. yyyyMMdd |
| 268.273 | MDEntryTime | Yes | Time of Market Data Entry (HH:MM:SS.sss) |
| Standard trailer | Yes |
Incremental Refresh <X>
| Tag | Field Name | Required | Comments |
|---|---|---|---|
| Standard Header | Yes | MsgType <35> = X | |
| 262 | MDReqID | Yes | Unique identifier for Market Data Request (V) this message is in response to |
| 268 | NoMDEntries | Yes | Number of entries in this message |
| 268.279 | MDUpdateAction | Yes | Type of market data update Valid values: ▪ 0 = New ▪ 1 = Change ▪ 2 = Delete |
| 268.269 | MDEntryType | Yes | Type of market update Valid Values: ▪ 0 = Bid ▪ 1 = Offer ▪ 2 = Trade ▪ 4 = Opening Price ▪ 5 = Closing Price ▪ 7 = Trading Session High Price (24 hours) ▪ 8 = Trading Session Low Price (24 hours) ▪ B = Trade Volume (24 hours) |
| 268.55 | Symbol | No* | Currency-pair. It is identified only for first market data entry |
| 268.270 | MDEntryPx | Yes | Price of the Market Data Entry |
| 268.271 | MDEntrySize | Yes | Number of units available (or the maximum trade size) at the time the market data snapshot was generated. ▪ Required when MDEntryType <269> is Bid (0), Offer(1), Trade(2), Trade Volume (V) |
| 268.272 | MDEntryDate | Yes | Date of Market Data Entry i.e. yyyyMMdd |
| 268.273 | MDEntryTime | Yes | Time of Market Data Entry (HH:MM:SS.sss) |
| Standard trailer | Yes |