NAV Navbar
cURL Python Node.js Java

General Information

WOO X. A privately-accessible liquidity venue for the trading of cryptocurrencies.

WOO X provides clients with an easily accessible deep pool of liquidity sourced from the largest exchanges and from Kronos’ HFT proprietary trading. We utilize advanced crossing and routing methods which provide ease of access and superior trade execution to select exchanges.

We provide two interfaces to communicate between WOO X and clients.

Base endpoints:

Authorization:
All our interfaces require key to access, and the token will be pre-generated by us.
Please set the corrsponding header in your request. Refer to Authenticaton for more information.

Symbol:
WOO X use the following format: <TYPE>_<BASE>_<QUOTE> to represent a symbol name, for example: SPOT_BTC_USDT means that it is BTC_USDT pair in SPOT trading market.

Rate Limit:

WebSocket Connection: - The establishment of WebSocket connections is based on the application ID. - The application ID should be appended at the end of the wss endpoint.

RESTful API: - For public endpoints, the rate limit is calculated based on the IP address. - For private endpoints, the rate limit is calculated based on the account (i.e., application ID, unique for each main/sub-account). - All api_keys under the same account (i.e., the same application ID) share their rate limits.

WebSocket Service Connection Restrictions: - WebSocket services have limitations on the number of connections and topic subscriptions. - For each account (main and sub-accounts are independent), there is a restriction on the maximum concurrent connection count, set at 80. - The maximum number of topics within each connection is limited to 50.

IP Connection Limitation: - Simultaneously, there is a restriction on the concurrent connection count for each IP address, capped at 1000.

if your application reached the rate limit of a certain endpoint, the server will return an error result with http code 429. You may need to wait until the next time horizon.

Error Message:

Errors consist of three parts: an error code, detail message and a success flag.

{
  "success": false,
  "code": -1005, // Error code
  "message": "order_price must be a positive number" // Detail message  
}

All API will return following json when api failed, the "message" will contain the detail error message, it may be because some data is in the wrong format, or another type of error.
Specific error codes and messages are defined in Errors Codes.

Authentication

Client needs to ask for an api_key and api_secret, and use these to sign your request.

Example

Here we provide a simple example that shows you how to send a valid request to WOO X.
Assume following infomation:

Key Value Description
api_key AbmyVJGUpN064ks5ELjLfA== create from WOO X console
api_secret QHKRXHPAW1MC9YGZMAT8YDJG2HPR create from WOO X console
timestamp 1578565539808 Unix epoch time in milliseconds

Hash your request parameters with api_secret, the hashing logic is described as follows:

If the request looks like:

POST /v1/order

# Body parameter:
symbol:SPOT_BTC_USDT
order_type:LIMIT
order_price:9000
order_quantity:0.11
side:BUY

For v1 API, please follow the steps to normalize request content:

  1. use query string as the parameters for GET methods and body parameters for POST and DELETE methods.
  2. concat query string and body parameters in an alphabetical order in query string format.
  3. concat timestamp with the above result, using | as seperator.

Normalize request content for V1 API, The result content would look like following

order_price=9000&order_quantity=0.11&order_type=LIMIT&side=BUY&symbol=SPOT_BTC_USDT|1578565539808

For v3 API using request body to pass the parameters, please concatenate the timestamp, http request method, request_path and request_body as the normalized content to sign. Besides, please use application/json as Content-Type in the headers.

var signString = timestamp + method + request_path + request_body;

Normalize request content for V3 API, The result content would look like following

1578565539808POST/v3/algo/order{
    "symbol": "PERP_BTC_USDT",
    "side": "BUY",
    "reduceOnly": false,
    "type": "MARKET",
    "quantity": "1",
    "algoType": "TRAILING_STOP",
    "callbackRate": "0.012"
}

Then use api_secret to hash it with HMAC SHA256 algorithm, you can use openssl to get this:

$ echo -n "order_price=9000&order_quantity=0.11&order_type=LIMIT&side=BUY&symbol=SPOT_BTC_USDT|1578565539808" | openssl dgst -sha256 -hmac "QHKRXHPAW1MC9YGZMAT8YDJG2HPR"
(stdin)= 20da0852f73b20da0208c7e627975a59ff072379883d8457d03104651032033d

Put the HMAC signature in request header x-api-signature, and put timestamp in x-api-timestamp, and also api key in x-api-key.

So the final request would look like:

sample code

# python sample code for generate signature
import datetime
import hmac, hashlib, base64
import requests
import json


staging_api_secret_key = '6XXXXXXXXXXXXXXXXXXXXXXXB'
staging_api_key = 'Ppppppppppppppppppp=='

def _generate_signature(data):
  key = staging_api_secret_key#'key' # Defined as a simple string.
  key_bytes= bytes(key , 'utf-8') # Commonly 'latin-1' or 'utf-8'
  data_bytes = bytes(data, 'utf-8') # Assumes `data` is also a string.
  return hmac.new(key_bytes, data_bytes , hashlib.sha256).hexdigest()


milliseconds_since_epoch = round(datetime.datetime.now().timestamp() * 1000)

headers = {
    'x-api-timestamp': str(milliseconds_since_epoch),
    'x-api-key': staging_api_key,
    'x-api-signature': _generate_signature("client_order_id=123456&order_price=0.8148&order_quantity=10&order_type=LIMIT&side=BUY&symbol=PERP_XRP_USDT|"+str(milliseconds_since_epoch)),
    'Content-Type': 'application/x-www-form-urlencoded',
    'Cache-Control':'no-cache'
}
data = {
  'client_order_id':123456,
  'order_price' : 0.8148,
  'order_quantity': 10,
  'order_type': 'LIMIT',
  'side':'BUY',
  'symbol': 'PERP_XRP_USDT'
}



response = requests.post('https://api.staging.woo.org/v1/order', headers=headers, data=data )
print(response.json())

// Node.js sample code for generate signature
var cryptoJS = require('crypto-js');
var axios = require('axios');
async function getAccountInfo() {

  const xApiTimestamp = Date.now();

  const queryString = '|' + xApiTimestamp;

  production_api_secret_key = '3XXXXXXXXXXXXXXXXXXXXXXXXXXXZ'
  production_api_key = 'xxxxxxxxxxxxxxxxxxxxxxxxx=='
  console.log(cryptoJS.HmacSHA256(queryString, production_api_secret_key).toString());
  const headers = {
    'Content-Type': 'application/x-www-form-urlencoded',
    'x-api-key': production_api_key,
    'x-api-signature': cryptoJS.HmacSHA256(queryString, production_api_secret_key).toString(),
    'x-api-timestamp': xApiTimestamp,
    'cache-control': 'no-cache'

  };



  try {
    const res = await axios.get('https://api.woo.org' + '/v1/client/info', {headers:headers});

    console.log('response', res);

    return res;

  } catch (error) {
    console.log(error.response)
    // throw new Error('Error with getAccountInfo : ' + error.message + '\n' + 'queryString : ' + queryString)

  }

}


getAccountInfo()

Security

There have four-layer checker to check if a request is valid. WOO X server only accepts the request that passed all checkers. The checker is defined as follows:

Revoken checker:
The api key/secret can be revoked manaually by clients' request. if the key was revoked, all access tokens generated by this key cannot be used.

Request IP checker:
The api key/secret can be tied to specific ips (default is empty). if the request is not coming from allowed ip addresses, the request would be rejected.

Request Timestamp checker:
The request would be considered expired and get rejected if the timestamp in x-api-timestamp header has a 300+ second difference from the API server time.

HMAC Parameter Signature:
The request must have a x-api-signature header that is generated from request parameters and signed with your secret key.

Error Codes

Errors consist of three parts: an error code and a message. Codes are universal, but messages can vary. Here is the error JSON payload:

{
  "success": false,
  "code": -1001, // Error code
  "message": "order_price must be a positive number" // Detail message  
}
Error Code Status Code Error Name Description
-1000 500 UNKNOWN An unknown error occurred while processing the request.
-1001 401 INVALID_SIGNATURE The api key or secret is in wrong format.
-1002 401 UNAUTHORIZED API key or secret is invalid, it may be because the key has insufficient permission or the key is expired/revoked.
-1003 429 TOO_MANY_REQUEST Rate limit exceed.
-1004 400 UNKNOWN_PARAM An unknown parameter was sent.
-1005 400 INVALID_PARAM Some parameters are in the wrong format for api.
-1006 400 RESOURCE_NOT_FOUND The data is not found in the server. For example, when the client try canceling a CANCELLED order, will raise this error.
-1007 409 DUPLICATE_REQUEST The data already exists or your request is duplicated.
-1008 400 QUANTITY_TOO_HIGH The quantity of settlement is higher than you can request.
-1009 400 CAN_NOT_WITHDRAWAL Can not request withdrawal settlement, you need to deposit other arrears first.
-1011 400 RPC_NOT_CONNECT Can not place/cancel orders, it may be because of internal network error. Please try again in a few seconds.
-1012 400 RPC_REJECT The place/cancel order request is rejected by internal module, it may be because the account is in liquidation or other internal errors. Please try again in a few seconds.
-1101 400 RISK_TOO_HIGH The risk exposure for the client is too high, it may be caused by sending too big order or the leverage is too low. please refer to client info to check the current exposure.
-1102 400 MIN_NOTIONAL The order value (price * size) is too small.
-1103 400 PRICE_FILTER The order price is not following the tick size rule for the symbol.
-1104 400 SIZE_FILTER The order quantity is not following the step size rule for the symbol.
-1105 400 PERCENTAGE_FILTER Price is X% too high or X% too low from the mid price.

RESTful API - (v1)

Get System Maintenance Status (Public)

Limit: 10 requests per 1 second per IP address

GET /v1/public/system_info

For fetch system status to check if system is down or under maintenance.

Response


{ 
    // functioning properly
    "success":true,
    "data":
        {
            "status":0,
            "msg":"System is functioning properly."
        },
    "timestamp":1676335013700
}
{   
    // trading maintenance
    "success":true,
    "data":
        {
            "status":1,
            "msg":"Under trading maintenance."
        },
    "timestamp":1676335013700
}

{   
    // system maintenance
    "success":true,
    "data":
        {
            "status":2,
            "msg":"Under system maintenance."
        },
    "timestamp":1676335013700
}

Parameters

None

Exchange Information

Limit: 10 requests per 1 second per IP address

GET /v1/public/info/:symbol

Get send order requirement by symbol, there are some rules need to be fullfilled in order to successfully send order, which are defined as follows:

Price filter

Size filter

Min Notional filter

Risk Exposure filer

Response

{
    "success":true,
    "info":{
        "symbol":"PERP_ETH_USDT",
        "quote_min":0,
        "quote_max":10000,
        "quote_tick":0.01,
        "base_min":0.001,
        "base_max":4000,
        "base_tick":0.001,
        "min_notional":0,
        "price_range":0.03,
        "price_scope":0.4,
        "created_time":"1647838759.000",
        "updated_time":"1693437961.000",
        "is_stable":0,
        "is_trading":1,
        "precisions":[1,10,50,100,1000,10000],
        "is_prediction":0,
        "base_mmr":0.012,
        "base_imr":0.02
    }
}

Parameters

Name Type Required Description
symbol string Y

Available Symbols (Public)

Limit: 10 requests per 1 second per IP address

GET /v1/public/info

Get the available symbols that WOO X supports, and also send order rules for each symbol. The definition of rules can be found at Exchange Infomation

Response

{
  "success": true,
  "rows": [
    {
      "created_time": "1575441595.65", // Unix epoch time in seconds
      "updated_time": "1575441595.65", // Unix epoch time in seconds
      "symbol": "SPOT_BTC_USDT",
      "quote_min": 100,
      "quote_max": 100000,
      "quote_tick": 0.01,
      "base_min": 0.0001,
      "base_max": 20,
      "base_tick": 0.0001,
      "min_notional": 0.02,
      "price_range": 0.99,
      "price_scope": 0.01,
      "precisions":[1,10,100,500,1000,10000]
    },
    // ...
  ]
}

Parameters

None

Market Trades (Public)

Limit: 10 requests per 1 second per IP address

GET /v1/public/market_trades

Get latest market trades. The response output "source" 1=internal (trade on WOO X), 0=external (trade from aggregrated sources)

Response

{
    "success": true,
    "rows": [
        {
            "symbol": "SPOT_ETH_USDT",
            "side": "BUY",
            "source": 0,
            "executed_price": 202,
            "executed_quantity": 0.00025,
            "executed_timestamp": "1567411795.000" // Unix epoch time in seconds
        },
        {
            "symbol": "SPOT_ETH_USDT",
            "side": "BUY",
            "source": 1,
            "executed_price": 202,
            "executed_quantity": 0.00025,
            "executed_timestamp": "1567411795.000" // Unix epoch time in seconds
        }
    ]
}

Parameters

Name Type Required Description
symbol string Y
limit number N (default: 10) Numbers of trades you want to query.

Market Trades History(Public)

Limit: 1 requests per 1 second per IP address

GET https://api-pub.woo.org/v1/hist/trade

Get historical market trades data. The response output "source" 1=internal (trade on WOO X), 0=external (trade from aggregrated sources)

Response

{
    "success": true,
    "data":{
        "rows": [
            {
                "symbol": "SPOT_ETH_USDT",
                "side": "BUY",
                "source": 0,
                "executed_price": 202,
                "executed_quantity": 0.00025,
                "executed_timestamp": "1567411795.000" // Unix epoch time in seconds
            },
            {
                "symbol": "SPOT_ETH_USDT",
                "side": "BUY",
                "source": 1,
                "executed_price": 202,
                "executed_quantity": 0.00025,
                "executed_timestamp": "1567411795.000" // Unix epoch time in seconds
            }
        ],
        "meta":{
            "total":10911159,
            "records_per_page":100,
            "current_page":1
        }
    },
    "timestamp":1669072422897
}

Parameters

Name Type Required Description
page number N (default: 1)
size number N (default: 25)
start_time number Y start range that you wish to query, noted that the time stamp is a 13-digits timestamp.
symbol string Y

Orderbook snapshot (Public)

Limit: 10 requests per 1 second

GET /v1/public/orderbook/:symbol

SNAPSHOT of current orderbook. Price of asks/bids are in descending order. Note: The original endpoint GET /v1/orderbook/:symbol can still be used.

Response

{
    "success": true,
    "asks": [
        {
            "price": 10669.4,
            "quantity": 1.56263218
        },
        {
            "price": 10670.3,
            "quantity": 0.36466977
        },
        {
            "price": 10670.4,
            "quantity": 0.06738009
        }
    ],
    "bids": [
        {
            "price": 10669.3,
            "quantity": 0.88159988
        },
        {
            "price": 10669.2,
            "quantity": 0.5
        },
        {
            "price": 10668.9,
            "quantity": 0.00488286
        }
    ],
    "timestamp": 1564710591905   // Unix epoch time in milliseconds
}

Parameters

Name Type Required Description
max_level number N (default: 100) the levels you wish to show on both sides.

Kline (Public)

Limit: 10 requests per 1 second

GET /v1/public/kline

The latest klines of the trading pairs. Note: The original endpoint GET /v1/kline can still be used.

Response

{
    "success": true,
    "rows": [
        {
            "open": 66166.23,
            "close": 66124.56,
            "low": 66038.06,
            "high": 66176.97,
            "volume": 23.45528526,
            "amount": 1550436.21725288,
            "symbol": "SPOT_BTC_USDT",
            "type": "1m",
            "start_timestamp": 1636388220000, // Unix epoch time in milliseconds
            "end_timestamp": 1636388280000
        },
        {
            "open": 66145.13,
            "close": 66166.24,
            "low": 66124.62,
            "high": 66178.60,
            "volume": 15.50705000,
            "amount": 1025863.18892610,
            "symbol": "SPOT_BTC_USDT",
            "type": "1m",
            "start_timestamp": 1636388160000,
            "end_timestamp": 1636388220000
        },
        // ...skip
    ]
}

Parameters

Name Type Required Description
symbol string Y
type enum Y 1m/5m/15m/30m/1h/4h/12h/1d/1w/1mon/1y
limit number N (default: 100) Numbers of klines. Maximum of 1000 klines.

Kline - Historical Data (Public)

Limit: 1 request per 1 second per IP

GET https://api-pub.woo.org/v1/hist/kline

The historical klines of the trading pairs. Note that the endpoint is different with other APIs.

Response

{
    "success": true,
    "data": {
        "rows": [
            {
                "open": 66166.23,
                "close": 66124.56,
                "low": 66038.06,
                "high": 66176.97,
                "volume": 23.45528526,
                "amount": 1550436.21725288,
                "symbol": "SPOT_BTC_USDT",
                "type": "1m",
                "start_timestamp": 1636388220000, // Unix epoch time in milliseconds
                "end_timestamp": 1636388280000
            },
            {
                "open": 66145.13,
                "close": 66166.24,
                "low": 66124.62,
                "high": 66178.60,
                "volume": 15.50705000,
                "amount": 1025863.18892610,
                "symbol": "SPOT_BTC_USDT",
                "type": "1m",
                "start_timestamp": 1636388160000,
                "end_timestamp": 1636388220000
            },
            // ...skip
        ],
        "meta":{
            "total":67377,
            "records_per_page":100,
            "current_page":1
        }
    },
    "timestamp": 1636388280000
}

Parameters

Name Type Required Description
symbol string Y
type enum Y 1m/5m/15m/30m/1h/4h/12h/1d/1w/1mon
start_time number Y start range that you wish to query, noted that the time stamp is a 13-digits timestamp.

Available Token (Public)

Limit: 10 requests per 1 second per IP address

GET /v1/public/token

Get the available tokens that WOO X supports, it need to use when you call get deposit address or withdraw api.

Response

{
    "success": true,
    "rows": [
        {
            "created_time": "1579399877.02", // Unix epoch time in seconds
            "updated_time": "1579399877.02", // Unix epoch time in seconds
            "token": "BTC",
            "balance_token": "BTC",
            "fullname": "Bitcoin",
            "decimals": 8,
            "can_collateral":true,
            "can_short":true
        },
        {
            "created_time": "1579399877.02",
            "updated_time": "1579399877.02",
            "token": "BTC_USDT",
            "balance_token": "USDT",
            "fullname": "Tether",
            "decimals": 8,
            "can_collateral":true,
            "can_short":true
        },
        {
            "created_time": "1579399877.02",
            "updated_time": "1579399877.02",
            "token": "ETH",
            "balance_token": "ETH",
            "fullname": "Ethereum",
            "decimals": 18,
            "can_collateral":true,
            "can_short":true
        },
        {
            "created_time": "1579399877.02",
            "updated_time": "1579399877.02",
            "token": "ETH_OKB",
            "balance_token": "OKB",
            "fullname": "OKB",
            "decimals": 18,
            "can_collateral":true,
            "can_short":true
        }
    ]
}

Parameters

None

Token Network (Public)

Limit: 10 requests per 1 second per IP address

GET /v1/public/token_network

Get the available networks for each token as well as the deposit/withdrawal information.

Response

{
    "success": true,
    "rows": [
        {
            "protocol": "BTC",
            "token": "BTC",
            "name": "Bitcoin",
            "minimum_withdrawal": 0.01,
            "withdrawal_fee": 0.05,
            "allow_deposit": 1,
            "allow_withdraw": 1
        },
        {
            "protocol": "ERC20",
            "token": "ETH",
            "name": "Ethereum",
            "minimum_withdrawal": 0.03,
            "withdrawal_fee": 0.06,
            "allow_deposit": 1,
            "allow_withdraw": 1
        },
        {
            "protocol": "ERC20",
            "token": "WOO",
            "name": "Ethereum",
            "minimum_withdrawal": 30,
            "withdrawal_fee": 20,
            "allow_deposit": 1,
            "allow_withdraw": 1
        },
        {
            "protocol": "BEP20",
            "token": "WOO",
            "name": "Binance Smart Chain",
            "minimum_withdrawal": 30,
            "withdrawal_fee": 3,
            "allow_deposit": 1,
            "allow_withdraw": 1
        },
        // ...
    ]
}

Parameters

None

Get Predicted Funding Rate for All Markets (Public)

Limit: 10 requests per 1 second per IP address

GET /v1/public/funding_rates

Get predicted funding rate and the latest funding rate for all the markets.

Response

{
    "success":true,
    "rows": [
        {
            "symbol":"PERP_BTC_USDT",
            "est_funding_rate":-0.00001392,
            "est_funding_rate_timestamp":1681069199002,
            "last_funding_rate":-0.00001666,
            "last_funding_rate_timestamp":1681066800000,
            "next_funding_time":1681070400000,
            "last_funding_rate_interval":1,
            "est_funding_rate_interval":1
        },
        {
            "symbol":"PERP_ETH_USDT",
            "est_funding_rate":-0.00001394,
            "est_funding_rate_timestamp":1681069319011,
            "last_funding_rate":-0.00001661,
            "last_funding_rate_timestamp":1681066800000,
            "next_funding_time":1681070400000,
            "last_funding_rate_interval":1,
            "est_funding_rate_interval":1
        }
    ],
    "timestamp":1681069222726, // Unix epoch time in milliseconds
}

Get Predicted Funding Rate for One Market (Public)

Limit: 10 requests per 1 second per IP address

GET /v1/public/funding_rate/:symbol

Get predicted funding rate and the latest funding rate for one market.

Parameters

Name Type Required Description
symbol string Y

Response

{
    "success":true,
    "timestamp":1681069222726,
    "symbol":"PERP_BTC_USDT",
    "est_funding_rate":-0.00001392,
    "est_funding_rate_timestamp":1681069199002,
    "last_funding_rate":-0.00001666,
    "last_funding_rate_timestamp":1681066800000, // use rate to end calculating funding fee time
    "next_funding_time":1681070400000,
    "last_funding_rate_interval":1,
    "est_funding_rate_interval":1
}

Get Funding Rate History for One Market (Public)

Limit: 10 requests per 1 second per IP address

GET /v1/public/funding_rate_history

Get funding rate for one market.

Parameters

Name Type Required Description
symbol string Y
start_t timestamp N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp. If start_t and end_t are not filled, the newest funding rate will be returned.
end_t timestamp N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp. If start_t and end_t are not filled, the newest funding rate will be returned.
page number N (default: 1) the page you wish to query.
size number N (default: 25)

Response

{
    "success": true,
    "meta": {
        "total": 670,
        "records_per_page": 25,
        "current_page": 1
    },
    "rows": [
        {
            "symbol": "PERP_BTC_USDT",
            "funding_rate": 0.12345689,
            "funding_rate_timestamp": 1567411795000, // use rate to end calculating funding fee time
            "next_funding_time": 1567411995000
        },
        {
            "symbol": "PERP_BTC_USDT",
            "funding_rate": 0.12345689,                                                 
            "funding_rate_timestamp": "1567411795.000", // use rate to end calculating funding fee time
            "next_funding_time": 1567411995000
        }
    ],
    "timestamp": 1564710591905 // Unix epoch time in milliseconds
}

Get Futures Info for All Markets (Public)

Limit: 10 requests per 1 second per IP address

GET /v1/public/futures

Get basic futures information for all the markets.

Response

{
    "success": true,
    "rows": [
        {
          "symbol": "PERP_BTC_USDT",
                "index_price": 56727.31344564,
                "mark_price": 56727.31344564,
                "est_funding_rate": 0.12345689,
                "last_funding_rate": 0.12345689,
                "next_funding_time": 1567411795000,
                "open_interest": 0.12345689,
                "24h_open": 0.16112,
                "24h_close": 0.32206,
                "24h_high": 0.33000,
                "24h_low": 0.14251,
                "24h_volume": 89040821.98,
                "24h_amount": 22493062.21
        },
        {
            "symbol": "PERP_ETH_USDT",
                "index_price": 6727.31344564,
                "mark_price": 6727.31344564,
                "est_funding_rate": 0.12345689,
                "last_funding_rate": 0.12345689,
                "next_funding_time": 1567411795000,
                "open_interest": 0.12345689,
                "24h_open": 0.16112,
                "24h_close": 0.32206,
                "24h_high": 0.33000,
                "24h_low": 0.14251,
                "24h_volume": 89040821.98,
                "24h_amount": 22493062.21
        }
    ],
    "timestamp": 1564710591905 // Unix epoch time in milliseconds
}

Get Futures for One Market (Public)

Limit: 10 requests per 1 second per IP address

GET /v1/public/futures/:symbol

Get basic futures information for one market.

Parameters

Name Type Required Description
symbol string Y

Response

{
    "success": true,
    "info":{
        "symbol": "PERP_BTC_USDT",
        "index_price": 56727.31344564,
        "mark_price": 56727.31344564,
        "est_funding_rate": 0.12345689,
        "last_funding_rate": 0.12345689,
        "next_funding_time": 1567411795000,
        "open_interest": 0.12345689,
        "24h_open": 0.16112,
       "24h_close": 0.32206,
       "24h_high": 0.33000,
       "24h_low": 0.14251,
       "24h_volume": 89040821.98,
       "24h_amount": 22493062.21
    },
    "timestamp": 1564710591905 // Unix epoch time in milliseconds
}

Token Config

Limit: 10 requests per 1 second

GET /v1/client/token

Get the configuration (collateral ratio, margin ratio factor etc) of the token.

Response

{
    "success": true,
    "rows": [
        {
            "token": "BTC",
            "collateral_ratio": 0.85,
            "margin_factor": 2.3e-8,
            "futures_margin_factor": 2.3e-8,
            "collateral": true,        // if the token is now used as collateral
            "can_collateral": true,    // if the token can be used as collateral
            "can_short": true,         // if the token supports short selling
            "stable": false,            // if the token is stable coin or not
            'margin_max_leverage': 5, 
            'futures_max_leverage': 20, 
            'margin_max_position': 100000000000,
            'futures_max_position': 100000000000
        },
        {
            "token": "ETH",
            "collateral_ratio": 0.85,
            "margin_factor": 2.5e-8,
            "futures_margin_factor": 2.3e-8,
            "collateral": true,
            "can_collateral": true,
            "can_short": true,
            "stable": false, 
            'margin_max_leverage': 5, 
            'futures_max_leverage': 20, 
            'margin_max_position': 100000000000,
            'futures_max_position': 100000000000
        },
        {
            "token": "ASD",
            "collateral_ratio": 1,
            "margin_factor": 0,
            "futures_margin_factor": 0,
            "collateral": false,
            "can_collateral": false,
            "can_short": false,
            "stable": false, 
            'margin_max_leverage': 5, 
            'futures_max_leverage': 20, 
            'margin_max_position': 100000000000,
            'futures_max_position': 100000000000
        }
    ]
}

Parameters

None

Send Order

Limit: 5 requests per 1 symbol per 1 second

POST /v1/order

Place order maker/taker, the order executed information will be updated from websocket stream. will respond immediately with an order created message.

MARKET type order behavior: it matches until all size is executed. If the size is too large (larger than the whole book) or the matching price exceeds the price limit (refer to price_range), then the remaining quantity will be cancelled.

IOC type order behavior: it matches as much as possible at the order_price. If not fully executed, then remaining quantity will be cancelled.

FOK type order behavior: if the order can be fully executed at the order_price then the order gets fully executed otherwise it would be cancelled without any execution.

ASK type order behavior: the order price is guaranteed to be the best ask price of the orderbook if it gets accepted.

BID type order behavior: the order price is guaranteed to be the best bid price of the orderbook if it gets accepted.

visible_quantity behavior: it sets the maximum quantity to be shown on orderbook. By default, it is equal to order_quantity, negative number and number larger than order_quantity is not allowed. If it sets to 0, the order would be hidden from the orderbook. It doesn't work for MARKET/IOC/FOK orders since orders with these types would be executed and cancelled immediately and not be shown on orderbook. For LIMIT/POST_ONLY order, as long as it's not complete, visible_quantity is the maximum quantity that is shown on the orderbook.

order_amount behavior: for MARKET/BID/ASK order, order can be placed by order_amount instead of order_quantity. It's the size of the order in terms of the quote currency instead of the base currency. The order would be rejected if both order_amount and order_quantity are provided. The precision of the number should be within 8 digits.

client_order_id behavior: customized order_id, a unique id among open orders. Orders with the same client_order_id can be accepted only when the previous one if completed, otherwise the order will be rejected.

For MARKET/BID/ASK order, if margin trading is disabled, order_amount is not supported when placing SELL order while order_quantity is not supported when placing BUY order.

For Long/ Short order, It is supported when position mode is HEDGE_MODE and the trading involves futures.

Response

{
  "success": true,
  "order_id": 13,
  "client_order_id": 0,
  "order_type": "LIMIT",
  "order_price": 100.12,
  "order_quantity": 0.987654,
  "order_amount": null,
  "reduce_only": false,
  "timestamp": "1639980423.855" // Unix epoch time in seconds
}

Parameters

Name Type Required Description
symbol string Y
client_order_id number N number for scope : from 0 to 9223372036854775807. (default: 0)
order_tag string N An optional tag for this order. (default: default)
order_type enum Y LIMIT/MARKET/IOC/FOK/POST_ONLY/ASK/BID
order_price number N If order_type is MARKET, then is not required, otherwise this parameter is required.
order_quantity number N For MARKET/ASK/BID order, if order_amount is given, it is not required.
order_amount number N For MARKET/ASK/BID order, the order size in terms of quote currency
reduce_only boolean N true or false, default false
visible_quantity number N The order quantity shown on orderbook. (default: equal to order_quantity)
side enum Y SELL/BUY
position_side enum N SHORT/LONG, If position mode is HEDGE_MODE and the trading involves futures,then is required, otherwise this parameter is not required.

Cancel Order

Limit: 10 requests per 1 second shared with cancel_order_by_client_order_id

DELETE /v1/order

Cancel order by order id. The order cancelled information will be updated from websocket stream. note that we give an immediate response with an order cancel sent message, and will update the cancel event via the websocket channel.

Response

{
  "success": true,
  "status": "CANCEL_SENT"
}

Parameters

Name Type Required Description
order_id number Y The order_id that you wish tocancel
symbol string Y

Cancel Order by client_order_id

Limit: 10 requests per 1 second shared with cancel_order

DELETE /v1/client/order

Cancel order by client order id. The order cancelled information will be updated from websocket stream. note that we give an immediate response with an order cancel sent message, and will update the cancel event via the websocket channel.

Only the latest order with the symbol and client_order_id would be canceled.

Response

{
  "success": true,
  "status": "CANCEL_SENT"
}

Parameters

Name Type Required Description
client_order_id number Y The client_order_id that you wish tocancel
symbol string Y

Cancel Orders

Limit: 10 requests per 1 second

DELETE /v1/orders

Cancel orders by symbol.

Response

{
  "success": true,
  "status": "CANCEL_ALL_SENT"
}

Parameters

Name Type Required Description
symbol string Y
page number N (default: 1) the page you wish to query.
size number N (default: 25)

Cancel All Pending Orders

Limit: 10 requests per 1 second

DELETE /v3/orders/pending

Cancel all pending ordinary orders.

Response

// success response
{
    "success": true,
    "status": "CANCEL_ALL_SENT"
}

// Failed response
{
    "success": false,
    "code": -1002,
    "message": "The request is unauthorized."
}

Get Order

Limit: 10 requests per 1 second shared with get_order_by_client_order_id

GET /v1/order/:oid

Get specific order details by order_id. The realized_pnl field in response will only present the settled amount for futures orders.

Response

{
    "success": true,
    "created_time": "1577349119.33", // Unix epoch time in seconds
    "side": "SELL",
    "status": "FILLED",
    "symbol": "SPOT_BTC_USDT",
    "client_order_id": 0,
    "reduce_only": false,
    "order_id": 1,
    "order_tag": "default",
    "type": "LIMIT",
    "price": 123,
    "quantity": 0.1,
    "amount": null,
    "visible": 0.1,
    "executed": 0.1,
    "total_fee": 0.00123,
    "fee_asset": "USDT",
    "average_executed_price": 123,
    "realized_pnl":null,
    "position_side":'SHORT'

    // Detail transactions of this order
    "Transactions": [
        {
            "id": 2,
            "symbol": "SPOT_BTC_USDT",
            "fee": 0.0001,
            "fee_asset": "BTC", // fee. use Base (BTC) as unit when BUY, use Quote (USDT) as unit when SELL
            "side": "BUY",
            "order_id": 1,
            "executed_price": 123,
            "executed_quantity": 0.05,
            "executed_timestamp": "1567382401.000", // Unix epoch time in seconds
            "is_maker": 1
        }]
}

Parameters

Name Type Required Description
oid number Y The order_id oid that you wish to query

Get Order by client_order_id

Limit: 10 requests per 1 seconds shared with get_order

GET /v1/client/order/:client_order_id

Get specific order details by client_order_id. If there is more than one order with the same client_order_id, return the latest one. The realized_pnl field in response will only present the settled amount for futures orders.

Response

{
    "success": true,
    "created_time": "1577349119.33", // Unix epoch time in seconds
    "side": "SELL",
    "status": "FILLED",
    "symbol": "SPOT_BTC_USDT",
    "client_order_id": 123,
    "reduce_only": false,
    "order_id": 1,
    "order_tag": "default",
    "type": "LIMIT",
    "price": 123,
    "quantity": 0.1,
    "amount": null,
    "visible": 0.1,
    "executed": 0.1,
    "total_fee": 0.00123,
    "fee_asset": "USDT",
    "average_executed_price": 123,
    "realized_pnl":null,

    // Detail transactions of this order
    "Transactions": [
        {
            "id": 2,
            "symbol": "SPOT_BTC_USDT",
            "fee": 0.0001,
            "fee_asset": "BTC", // fee. use Base (BTC) as unit when BUY, use Quote (USDT) as unit when SELL
            "side": "BUY",
            "order_id": 1,
            "executed_price": 123,
            "executed_quantity": 0.05,
            "executed_timestamp": "1567382401.000", // Unix epoch time in seconds
            "is_maker": 1
        }]

}

Parameters

Name Type Required Description
client_order_id number Y customized order_id when placing order

Get Orders

Limit: 10 requests per 1 second

GET /v1/orders

Get orders by customize conditions.
- INCOMPLETE = NEW + PARTIAL_FILLED
- COMPLETED = CANCELLED + FILLED + REJECTED The realized_pnl field in response will only present the settled amount for futures orders. The return value default is null unless the input parameter realized_pnl set to true

Response

{
    "success": true,
    "meta": {
        "total": 31,
        "records_per_page": 25,
        "current_page": 1
    },
    "rows": [
        {
            "side": "SELL",
            "status": "CANCELLED",
            "symbol": "SPOT_BCHABC_USDT",
            "client_order_id": 123,
            "reduce_only": false,
            "order_id": 8197,
            "order_tag": "default",
            "type": "LIMIT",
            "price": 308.51,
            "quantity": 0.0019,
            "amount": null,
            "visible": 0.0019,
            "executed": 0,
            "total_fee": 0,
            "fee_asset": null,
            "created_time": "1575014255.089", // Unix epoch time in seconds
            "updated_time": "1575014255.910", // Unix epoch time in seconds
            "average_executed_price": null,
            "position_side": "LONG",  
            "realized_pnl":null
        },
        // ....skip (total 25 items in one page)
    ]
}

Parameters

Name Type Required Description
symbol string N
side string N BUY/SELL
size number N The page size, default 100, max 500.
order_type string N LIMIT/MARKET/IOC/FOK/POST_ONLY/LIQUIDATE
order_tag string N An optional tag for this order.
realized_pnl boolean N Decide if return data calculate realized pnl value for the futures order.
status enum N NEW/CANCELLED/PARTIAL_FILLED/FILLED/REJECTED/INCOMPLETE/COMPLETED
start_t timestamp N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
end_t timestamp N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
page number N (default: 1) the page you wish to query.

Edit Order

Limit: 5 requests per 1 second

PUT /v3/order/:order_id

**Note that for v3 API with json body POST method, please follow the instruction in authentication section for v3 API to generate the signature. **Please use string type for value input field to remain data accurancy.

The API allow you to edit the price and the quantity of the selected order. You must input at least one of it in the request body.

Response

// Success response
{
    "success": true,
    "data": {
        "success": true,
        "status": "EDIT_SENT"
    },
    "timestamp": 1673842319229
}

// Failed response
{
    "success": false,
    "code": -1103,
    "message": "The order does not meet the price filter requirement."
}

Request

{
    "price": "10.5",
    "quantity": "1.4"
}

Parameters

Name Type Required Description
order_id number Y The order_id that you wish to query
price string N New price of the order.
quantity string N New quantity of the order.

Edit Order by client_order_id

Limit: 5 requests per 1 second

PUT /v3/order/client/:client_order_id

**Note that for v3 API with json body POST method, please follow the instruction in authentication section for v3 API to generate the signature. **Please use string type for value input field to remain data accurancy.

The API allow you to edit the price and the quantity of the selected order. You must input at least one of it in the request body.

Response

// Success response
{
    "success": true,
    "data": {
        "success": true,
        "status": "EDIT_SENT"
    },
    "timestamp": 1673842319229
}

// Failed response
{
    "success": false,
    "code": -1103,
    "message": "The order does not meet the price filter requirement."
}

Request

{
    "price": "10.5",
    "quantity": "1.4"
}

Parameters

Name Type Required Description
client_order_id number Y customized order_id when placing order
price string N New price of the order.
quantity string N New quantity of the order.

Send Algo Order

Limit: 2 requests per 1 second per symbol

POST /v3/algo/order

**Note that for v3 API, please follow the instruction in authentication section for v3 API to generate the signature. **Please use string type for value input field to remain data accurancy.

Place algo order maker/taker, the order executed information will be updated from websocket stream. will respond immediately with an order created message.

To place Stop Market order, please use 'STOP' as algoType and 'MARKET' as type. Please input the trigger price in triggerPrice field.

To place Stop Limit order, please use 'STOP' as algoType and 'LIMIT' as type. Please input the trigger price in triggerPrice field.

To place Trailing Stop order, please use 'TRAILING_STOP' as algoType and 'MARKET' as type. Please also input your trailing rate setting in callbackRate field.

To place OCO order, the input fields is 2 layer and includes an array of the objects named childOrder. The second order of OCO order should be a STOP_LIMIT or STOP MARKET order object in the array. please use 'OCO' as algoType in outter parameters, 'STOP' as algoType in childOrder object, and 'LIMIT' or 'MARKET' as type.

To place Positional TP/SL order, the input fields is 2 layer and includes an array of the objects named childOrder. The take-profit or stop-loss order should be the objects in the array. For the sub-order in childOrder, please input 'CLOSE_POSITION' as type, and 'TAKE_PROFIT' or 'STOP_LOSS' in algoType field.

visible_quantity behavior: it sets the maximum quantity to be shown on orderbook. By default, it is equal to order_quantity, negative number and number larger than order_quantity is not allowed. The visibility of the childOrder will inherit the parent order's visibility setting. If it sets to 0, the order would be hidden from the orderbook. It doesn't work for MARKET orders since orders with these types would be executed and cancelled immediately and not be shown on orderbook. For LIMIT order, as long as it's not complete, visible_quantity is the maximum quantity that is shown on the orderbook.

client_order_id behavior: customized order_id, a unique id among open orders. Orders with the same client_order_id can be accepted only when the previous one if completed, otherwise the order will be rejected.

For Long/ Short order, It is supported when position mode is HEDGE_MODE and the trading involves futures.

Response

{
  "code": 0,
  "data": {
    "rows": [
      {
        "algoType": "string",
        "clientOrderId": 0,
        "orderId": 0,
        "quantity": 0
      }
    ]
  },
  "message": "string",
  "success": true,
  "timestamp": 0
}

// bracket order response

{
    "success": true,
    "data": {
        "rows": [
            {
                "orderId": 432132,
                "clientOrderId": 0,
                "algoType": "TAKE_PROFIT",
                "quantity": 0
            },
            {
                "orderId": 432133,
                "clientOrderId": 0,
                "algoType": "STOP_LOSS",
                "quantity": 0
            },
            {
                "orderId": 432131,
                "clientOrderId": 0,
                "algoType": "POSITIONAL_TP_SL",
                "quantity": 0
            },
            {
                "orderId": 432130,
                "clientOrderId": 0,
                "algoType": "BRACKET",
                "quantity": 10
            }
        ]
    },
    "timestamp": 1676283560233
}

Request

// stop market order

{
    "symbol":"PERP_BTC_USDT",
    "side":"BUY",
    "orderCombinationType":"STOP_MARKET",
    "algoType":"STOP",
    "triggerPrice":"1000",
    "type":"MARKET",
    "quantity":"0.01"
}

//stop market limit

{
    "symbol":"PERP_BTC_USDT",
    "side":"BUY",
    "orderCombinationType":"STOP_LIMIT",
    "algoType":"STOP",
    "triggerPrice":"1000",
    "type":"LIMIT",
    "quantity":"0.01",
    "price":1000
}

//OCO 

{
    "symbol": "PERP_ETH_USDT",
    "side": "BUY",
    "reduceOnly": false,
    "type": "LIMIT",
    "quantity": "1",
    "algoType": "OCO",
    "price": "1000",
    "childOrders": [
        {
            "side": "BUY",
            "algoType": "STOP",
            "triggerPrice": "1600",
            "type": "MARKET"
        }
    ]
}

//Positional TP/SL

{
    "symbol": "SPOT_BAL_USDT",
    "reduceOnly": false,
    "algoType": "POSITIONAL_TP_SL",
    "childOrders": [
        {
            "algoType": "TAKE_PROFIT",
            "type": "CLOSE_POSITION",
            "side": "BUY",
            "reduceOnly": true,
            "triggerPrice": "72"
        },
        {
            "algoType": "STOP_LOSS",
            "type": "CLOSE_POSITION",
            "side": "BUY",
            "reduceOnly": true,
            "triggerPrice": "74"
        }
    ]
}

// Bracket order

{
    "symbol": "SPOT_BAL_USDT",
    "side": "BUY",
    "reduceOnly": false,
    "type": "LIMIT",
    "quantity": "1",
    "algoType": "BRACKET",
    "price": "69",
    "childOrders": [
        {
            "symbol": "SPOT_BAL_USDT",
            "reduceOnly": false,
            "algoType": "POSITIONAL_TP_SL",
            "childOrders": [
                {
                    "algoType": "TAKE_PROFIT",
                    "type": "CLOSE_POSITION",
                    "side": "SELL",
                    "reduceOnly": true,
                    "triggerPrice": "76"
                },
                {
                    "algoType": "STOP_LOSS",
                    "type": "CLOSE_POSITION",
                    "side": "SELL",
                    "reduceOnly": true,
                    "triggerPrice": "50"
                }
            ]
        }
    ]
}

Parameters - Parent

Name Type Required Description
activatedPrice string N activated price for algoType=TRAILING_STOP
algoType string Y STOP/OCO/TRAILING_STOP/BRACKET
callbackRate string N callback rate, only for algoType=TRAILING_STOP, i.e. the value = 0.1 represent to 10%.
callbackValue string N callback value, only for algoType=TRAILING_STOP, i.e. the value = 100
childOrders child N Child orders for algoType=POSITIONAL_TP_SL
symbol string Y
clientOrderId number N Client order id defined by client,number for scope : from 0 to 9223372036854775807. (default: 0), duplicated client order id on opening order is not allowed.
orderTag string N An optional tag for this order. (default: default)
price string N order price
quantity string N Order quantity, only optional for algoType=POSITIONAL_TP_SL
reduceOnly boolean N true or false, default false
triggerPrice string N trigger price, if algoType=TRAILING_STOP, you need to provide 'activatedPrice'
triggerPriceType string N trigger price, default MARKET_PRICE, enum: MARKET_PRICE
type string Y LIMIT/MARKET
visibleQuantity number N The order quantity shown on orderbook. (default: equal to orderQuantity)
side enum Y SELL/BUY
positionSide enum N SHORT/LONG, If position mode is HEDGE_MODE and the trading involves futures,then is required, otherwise this parameter is not required.

Parameters - Child

Name Type Required Description
symbol string Y
algoType string Y STOP
side enum Y SELL/BUY
type string Y LIMIT/MARKET
triggerPrice string N trigger price, if algoType=TRAILING_STOP, you need to provide 'activatedPrice'
price string N order price
reduceOnly boolean N true or false, default false
childOrders child N Child orders for algoType=POSITIONAL_TP_SL

Cancel Algo Order

Limit: 10 requests per 1 second shared with cancel_algo_order_by_client_order_id

DELETE /v3/algo/order/:order_id

***Note: This v3 API using query string to pass parameter, please follow the instruction in authentication section for v3 API to generate the signature. Cancel order by order id. The order cancelled information will be updated from websocket stream. note that we give an immediate response with an order cancel sent message, and will update the cancel event via the websocket channel.

Response

// Success response
{
    "success": true,
    "status": "CANCEL_SENT"
}

// Failed response
    "success": false,
    "code": -1006,
    "message": "Your order and symbol are not valid or already canceled."
}

Parameters

Name Type Required Description
order_id number Y The order_id that youwish to cancel

Cancel All Pending Algo Orders

Limit: 10 requests per 1 second

DELETE /v3/algo/orders/pending

***Note: This v3 API using query string to pass parameter, please follow the instruction in authentication section for v3 API to generate the signature. Cancel all pending algo orders.

Response

// Success response
{
    "success": true,
    "status": "CANCEL_SENT"
}

// Failed response
    "success": false,
    "code": -1006,
    "message": "Your order and symbol are not valid or already canceled."
}

Cancel Pending Merge Orders by Symbol

Limit: 10 requests per 1 second

DELETE /v3/merge/orders/pending/:symbol

***Note that for v3 API, please follow the instruction in authentication section for v3 API to generate the signature. Cancel both ordinary and algo orders by symbol.

Response

{
  "success": true,
  "status": "CANCEL_ALL_SENT"
}

Parameters

Name Type Required Description
side string N BUY or SELL
symbol string Y

Get Algo Order

Limit: 10 requests per 1 second shared with get_algo_order_by_client_order_id

GET /v3/algo/order/:oid ***Note: This v3 API using query string to pass parameter, please follow the instruction in authentication section for v3 API to generate the signature.

Get specific order details by Algo order's oid.

Response

// Success response
{
    "success": true,
    "data": {
        "algoOrderId": 431601,
        "clientOrderId": 0,
        "rootAlgoOrderId": 431601,
        "parentAlgoOrderId": 0,
        "symbol": "SPOT_ADA_USDT",
        "orderTag": "default",
        "algoType": "BRACKET",
        "side": "BUY",
        "quantity": 11,
        "isTriggered": false,
        "triggerStatus": "SUCCESS",
        "type": "LIMIT",
        "status": "FILLED",
        "rootAlgoStatus": "FILLED",
        "algoStatus": "FILLED",
        "triggerPriceType": "MARKET_PRICE",
        "price": 0.33,
        "triggerTime": "0",
        "totalExecutedQuantity": 11,
        "averageExecutedPrice": 0.33,
        "totalFee": 0.0033,
        "feeAsset": "ADA",
        "reduceOnly": false,
        "createdTime": "1676277825.917",
        "updatedTime": "1676280901.229",
        "positionSide":"LONG",
        "childOrders": [
            {
                "algoOrderId": 431602,
                "clientOrderId": 0,
                "rootAlgoOrderId": 431601,
                "parentAlgoOrderId": 431601,
                "symbol": "SPOT_ADA_USDT",
                "orderTag": "default",
                "algoType": "POSITIONAL_TP_SL",
                "side": "SELL",
                "quantity": 0,
                "isTriggered": false,
                "triggerStatus": "USELESS",
                "rootAlgoStatus": "FILLED",
                "algoStatus": "NEW",
                "triggerPriceType": "MARKET_PRICE",
                "triggerTime": "0",
                "totalExecutedQuantity": 0,
                "visibleQuantity": 0,
                "averageExecutedPrice": 0,
                "totalFee": 0,
                "feeAsset": "",
                "reduceOnly": false,
                "createdTime": "1676277825.914",
                "updatedTime": "1676277825.914",
                "isActivated": false,
                "positionSide":"LONG",
                "childOrders": [
                    {
                        "algoOrderId": 431603,
                        "clientOrderId": 0,
                        "rootAlgoOrderId": 431601,
                        "parentAlgoOrderId": 431602,
                        "symbol": "SPOT_ADA_USDT",
                        "orderTag": "default",
                        "algoType": "TAKE_PROFIT",
                        "side": "SELL",
                        "quantity": 0,
                        "isTriggered": false,
                        "triggerStatus": "USELESS",
                        "type": "CLOSE_POSITION",
                        "rootAlgoStatus": "FILLED",
                        "algoStatus": "NEW",
                        "triggerPriceType": "MARKET_PRICE",
                        "triggerTime": "0",
                        "totalExecutedQuantity": 0,
                        "visibleQuantity": 0,
                        "averageExecutedPrice": 0,
                        "totalFee": 0,
                        "feeAsset": "",
                        "reduceOnly": true,
                        "createdTime": "1676277825.908",
                        "updatedTime": "1676277872.024",
                        "isActivated": false,
                        "positionSide":"LONG"
                    },
                    {
                        "algoOrderId": 431604,
                        "clientOrderId": 0,
                        "rootAlgoOrderId": 431601,
                        "parentAlgoOrderId": 431602,
                        "symbol": "SPOT_ADA_USDT",
                        "orderTag": "default",
                        "algoType": "STOP_LOSS",
                        "side": "SELL",
                        "quantity": 0,
                        "isTriggered": false,
                        "triggerStatus": "USELESS",
                        "type": "CLOSE_POSITION",
                        "rootAlgoStatus": "FILLED",
                        "algoStatus": "NEW",
                        "triggerPriceType": "MARKET_PRICE",
                        "triggerTime": "0",
                        "totalExecutedQuantity": 0,
                        "visibleQuantity": 0,
                        "averageExecutedPrice": 0,
                        "totalFee": 0,
                        "feeAsset": "",
                        "reduceOnly": true,
                        "createdTime": "1676277825.911",
                        "updatedTime": "1676277872.035",
                        "isActivated": false,
                        "positionSide":"LONG"
                    }
                ]
            }
        ]
    },
    "timestamp": 1676281474630
}

// Failed response
{
    "success": false,
    "code": -1006,
    "message": "The order can not be found."
}

Parameters

Name Type Required Description
oid number Y The Algo order's order_id oid that you wish to query

Get Algo Orders

Limit: 10 requests per 1 second

GET /v3/algo/orders

***Note: This v3 API using query string to pass parameter, please follow the instruction in authentication section for v3 API to generate the signature. Get orders by customize conditions.
- INCOMPLETE = NEW + PARTIAL_FILLED
- COMPLETED = CANCELLED + FILLED + REJECTED The realizedPnl field in response will only present the settled amount for futures orders. The return value default is null unless the input parameter realizedPnl set to true

Response

{
    "success": true,
    "data": {
        "rows": [
            {
                "algoOrderId": 431601,
                "clientOrderId": 0,
                "rootAlgoOrderId": 431601,
                "parentAlgoOrderId": 0,
                "symbol": "SPOT_ADA_USDT",
                "orderTag": "default",
                "algoType": "BRACKET",
                "side": "BUY",
                "quantity": 11,
                "isTriggered": false,
                "triggerStatus": "SUCCESS",
                "type": "LIMIT",
                "status": "FILLED",
                "rootAlgoStatus": "FILLED",
                "algoStatus": "FILLED",
                "triggerPriceType": "MARKET_PRICE",
                "price": 0.33,
                "triggerTime": "0",
                "totalExecutedQuantity": 11,
                "averageExecutedPrice": 0.33,
                "totalFee": 0.0033,
                "feeAsset": "ADA",
                "reduceOnly": false,
                "createdTime": "1676277825.917",
                "updatedTime": "1676280901.229",
                "childOrders": [
                    {
                        "algoOrderId": 431602,
                        "clientOrderId": 0,
                        "rootAlgoOrderId": 431601,
                        "parentAlgoOrderId": 431601,
                        "symbol": "SPOT_ADA_USDT",
                        "orderTag": "default",
                        "algoType": "POSITIONAL_TP_SL",
                        "side": "SELL",
                        "quantity": 0,
                        "isTriggered": false,
                        "triggerStatus": "USELESS",
                        "rootAlgoStatus": "FILLED",
                        "algoStatus": "NEW",
                        "triggerPriceType": "MARKET_PRICE",
                        "triggerTime": "0",
                        "totalExecutedQuantity": 0,
                        "visibleQuantity": 0,
                        "averageExecutedPrice": 0,
                        "totalFee": 0,
                        "feeAsset": "",
                        "reduceOnly": false,
                        "createdTime": "1676277825.914",
                        "updatedTime": "1676277825.914",
                        "isActivated": false,
                        "childOrders": [
                            {
                                "algoOrderId": 431603,
                                "clientOrderId": 0,
                                "rootAlgoOrderId": 431601,
                                "parentAlgoOrderId": 431602,
                                "symbol": "SPOT_ADA_USDT",
                                "orderTag": "default",
                                "algoType": "TAKE_PROFIT",
                                "side": "SELL",
                                "quantity": 0,
                                "isTriggered": false,
                                "triggerStatus": "USELESS",
                                "type": "CLOSE_POSITION",
                                "rootAlgoStatus": "FILLED",
                                "algoStatus": "NEW",
                                "triggerPriceType": "MARKET_PRICE",
                                "triggerTime": "0",
                                "totalExecutedQuantity": 0,
                                "visibleQuantity": 0,
                                "averageExecutedPrice": 0,
                                "totalFee": 0,
                                "feeAsset": "",
                                "reduceOnly": true,
                                "createdTime": "1676277825.908",
                                "updatedTime": "1676277872.024",
                                "isActivated": false,
                                "positionSide":"LONG"
                            },
                            {
                                "algoOrderId": 431604,
                                "clientOrderId": 0,
                                "rootAlgoOrderId": 431601,
                                "parentAlgoOrderId": 431602,
                                "symbol": "SPOT_ADA_USDT",
                                "orderTag": "default",
                                "algoType": "STOP_LOSS",
                                "side": "SELL",
                                "quantity": 0,
                                "isTriggered": false,
                                "triggerStatus": "USELESS",
                                "type": "CLOSE_POSITION",
                                "rootAlgoStatus": "FILLED",
                                "algoStatus": "NEW",
                                "triggerPriceType": "MARKET_PRICE",
                                "triggerTime": "0",
                                "totalExecutedQuantity": 0,
                                "visibleQuantity": 0,
                                "averageExecutedPrice": 0,
                                "totalFee": 0,
                                "feeAsset": "",
                                "reduceOnly": true,
                                "createdTime": "1676277825.911",
                                "updatedTime": "1676277872.035",
                                "isActivated": false,
                                "positionSide":"LONG"
                            }
                        ]
                        "positionSide":"LONG"
                    }
                ]
            }
        ],
        "meta": {
            "total": 436,
            "records_per_page": 1,
            "current_page": 1
        }
    },
    "timestamp": 1676281407576
}

Parameters

Name Type Required Description
algoType string Y STOP/OCO/TRAILING_STOP/BRACKET
createdTimeEnd timestamp N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
createdTimeStart timestamp N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
isTriggered boolean N true or false
orderTag string N An optional tag for this order.
page number N (default: 1) pag of query pagination
realizedPnl boolean N Decide if return data calculate realized pnl value for the futures order.
side string N BUY/SELL
size number N (default: 25) size for query pagination
status enum N NEW/CANCELLED/PARTIAL_FILLED/FILLED/REJECTED/INCOMPLETE/COMPLETED
symbol string N
orderType string N LIMIT/MARKET

Edit Algo Order

Limit: 5 requests per 1 second

PUT /v3/algo/order/:order_id

**Note that for v3 API with json body POST method, please follow the instruction in authentication section for v3 API to generate the signature. **Please use string type for value input field to remain data accurancy.

The API allow you to edit the trigger price and the quantity of the selected algo order. You must input at least one of it in the request body.

Response

{
    "success": true,
    "data": {
        "success": true,
        "status": "EDIT_SENT"
    },
    "timestamp": 1676277871935
}

Request

{
  "activatedPrice": "200",
  "callbackRate": "200",
  "callbackValue": "200",
  "childOrders": [
    {
      "algoOrderId": 123456,
      "price": "1000",
      "quantity": "1000",
      "triggerPrice": "1000"
    }
  ],
  "price": "1000",
  "quantity": "1000",
  "triggerPrice": "1000"
}

Parameters

Name Type Required Description
oid number Y The order_id oid that you wish to query
activatedPrice string N activated price for algoType=TRAILING_STOP
callbackRate string N new callback rate, only for algoType=TRAILING_STOP, i.e. the value = 0.1 represent to 10%.
callbackValue string N new callback value, only for algoType=TRAILING_STOP, i.e. the value = 100
childOrders array N The array list of the child orders, only for algoType=POSITIONAL_TP_SL or TP_SL
price number N New price of the algo order.
quantity number N New quantity of the algo order.
triggerPrice number N New trigger price of the algo order.

Edit Algo Order by client_order_id

Limit: 5 requests per 1 second

PUT /v3/algo/order/client/:client_order_id

**Note that for v3 API with json body POST method, please follow the instruction in authentication section for v3 API to generate the signature. **Please use string type for value input field to remain data accurancy.

The API allow you to edit the price and the quantity of the selected algo order. You must input at least one of it in the request body.

Response

{
  "code": 0,
  "data": {
    "status": "string",
    "success": true
  },
  "message": "string",
  "success": true,
  "timestamp": 0
}

Request

{
  "activatedPrice": "200",
  "callbackRate": "200",
  "callbackValue": "200",
  "childOrders": [
    {
      "algoOrderId": 123456,
      "price": "1000",
      "quantity": "1000",
      "triggerPrice": "1000"
    }
  ],
  "price": "1000",
  "quantity": "1000",
  "triggerPrice": "1000"
}

Parameters

Name Type Required Description
oid number Y The order_id oid that you wish to query
activatedPrice string N activated price for algoType=TRAILING_STOP
callbackRate string N new callback rate, only for algoType=TRAILING_STOP, i.e. the value = 0.1 represent to 10%.
callbackValue string N new callback value, only for algoType=TRAILING_STOP, i.e. the value = 100
childOrders array N The array list of the child orders, only for algoType=POSITIONAL_TP_SL or TP_SL
price number N New price of the algo order.
quantity number N New quantity of the algo order.
triggerPrice number N New trigger price of the algo order.

Get Trade

Limit: 10 requests per 1 second

GET /v1/client/trade/:tid

Get specific transaction detail by id. (The data fetch from this API only contains past 3 months data, if you need the data more than 3 months, please submit the ticket in the support center).

Response

{
    "success": true,
    "id": 1,
    "symbol": "SPOT_BTC_USDT",
    "fee": 0.0001,
    "fee_asset": "BTC", // fee. use Base (BTC) as unit when BUY, use Quote (USDT) as unit when SELL
    "side": "BUY",
    "order_id": 2,
    "executed_price": 123,
    "executed_quantity": 0.05,
    "is_maker": 0,
    "executed_timestamp": "1567382400.000"  // Unix epoch time in seconds
}

Parameters

Name Type Required Description
tid number Y The transaction id tid that you wish to query

Get Trades

Limit: 10 requests per 1 second

GET /v1/order/:oid/trades

Get trades by order_id

Response

{
    "success": true,
    "rows": [
        {
            "id": 5, // transaction id
            "symbol": "SPOT_BTC_USDT",
            "order_id": 211,
            "order_tag": "default",
            "executed_price": 10892.84,
            "executed_quantity": 0.002,
            "is_maker": 0,
            "side": "SELL",
            "fee": 0,
            "fee_asset": "USDT", // use Base (BTC) as unit when BUY, use Quote (USDT) as unit when SELL
            "executed_timestamp": "1566264290.250"  // Unix epoch time in seconds
        }
    ]
}

Parameters

Name Type Required Description
oid number Y The order id oid that you wish to query

Get Trade History

Limit: 10 requests per 1 second

GET /v1/client/trades

Return client’s trade history in a range of time. (The data fetch from this API only contains past 3 months data, if you need the data more than 3 months, please user Get Archived Trade History).

Response

{
    "success": true,
    "meta": {
        "total": 31,
        "records_per_page": 25,
        "current_page": 1
    },
    "rows": [
        {
            "id": 5, // transaction id
            "symbol": "SPOT_BTC_USDT",
            "order_id": 211,
            "order_tag": "default",
            "executed_price": 10892.84,
            "executed_quantity": 0.002,
            "is_maker": 0,
            "side": "SELL",
            "fee": 0,
            "fee_asset": "USDT", // use Base (BTC) as unit when BUY, use Quote (USDT) as unit when SELL
            "executed_timestamp": "1566264290.250"  // Unix epoch time in seconds
        },
        // ....skip (total 25 items in one page)
    ]
}

Parameters

Name Type Required Description
symbol string N
order_tag string N An optional tag for this order.
start_t timestamp N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
end_t timestamp N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
page number N (default: 1) the page you wish to query.
size number N (default: 25)

Get Archived Trade History

Limit: 10 requests per 1 second

GET /v1/client/hist_trades

Return client’s trade history in a range of time. (The data fetch from this API contains all time historical data).

Response

{
    "success": true,
    "meta": {
        "total": 31,
        "records_per_page": 25,
        "current_page": 1
    },
    "rows": [
        {
            "id": 217714629, // transaction id
            "symbol": "SPOT_BTC_USDT",
            "order_id": 211,
            "order_tag": "default",
            "executed_price": 10892.84,
            "executed_quantity": 0.002,
            "is_maker": 0,
            "side": "SELL",
            "fee": 0,
            "fee_asset": "USDT", // use Base (BTC) as unit when BUY, use Quote (USDT) as unit when SELL
            "executed_timestamp": "1566264290.250"  // Unix epoch time in seconds
        },
        // ....skip (total 25 items in one page)
    ]
}

Parameters

Name Type Required Description
symbol string N
start_t timestamp Y start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
end_t timestamp Y end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
fromId number N (default: 1) fromId is the trade id of the the record. It should be use as a cursor, so searching for trades starting with that trade id query.
limit number N (default: 25)

Get Staking Yield History

Limit: 10 requests per 1 second

GET /v1/staking/yield_history

Return client’s staking yield history

Response

{
  "rows": [
    {
      "id": 53173,
      "token": "WOO",
      "user_id": 10174,
      "staking_size": 30100.00000000,
      "annual_reward": "0.24294%",
      "yield_amount": 0.20034259,
      "yield_time": "1673481600.000"
    },
    {
      "id": 53029,
      "token": "WOO",
      "user_id": 10174,
      "staking_size": 30100.00000000,
      "annual_reward": "0.24294%",
      "yield_amount": 0.20034259,
      "yield_time": "1673395200.000"
    },
    {
      "id": 52885,
      "token": "WOO",
      "user_id": 10174,
      "staking_size": 30100.00000000,
      "annual_reward": "0.24294%",
      "yield_amount": 0.20034259,
      "yield_time": "1673308800.000"
    },
    {
      "id": 52741,
      "token": "WOO",
      "user_id": 10174,
      "staking_size": 30100.00000000,
      "annual_reward": "0.242572%",
      "yield_amount": 0.20003858,
      "yield_time": "1673222400.000"
    },
    {
      "id": 52597,
      "token": "WOO",
      "user_id": 10174,
      "staking_size": 30100.00000000,
      "annual_reward": "0.242572%",
      "yield_amount": 0.20003858,
      "yield_time": "1673136000.000"
    }
  ],
  "meta": {
    "total": 582,
    "records_per_page": 5,
    "current_page": 1
  },
  "success": true
}

Parameters

Name Type Required Description
page number N (default: 1) the page you wish to query.
size number N (default: 25) the page size you wish to query, default = 25, 1000 at max.
token string Y i.e: WOO

Get Current Holding

Limit: 10 requests per 1 seconds

GET /v1/client/holding

Holding summary of the client. Note that the number in holding could be negative, it means how much the client owes to WOO X.

Response

{
    "success": true,
    "holding": {
        "BTC": 1.014,
        "USDT": -26333.207589999998,
        "BCHABC": 2
    }
}

Parameters

None

Get Current Holding v2

Limit: 10 requests per 1 seconds

GET /v2/client/holding

** Note: This API will be deprecated at the end of 2023 Q1, please find the replacement API in Get Current Holding Get Balance - New Holding summary of client. Note that the number in holding could be negative, it means how much client owed to WOO X.

Response

{
    "holding":[
        {
            "token":"BTC",
            "holding":0.00590139,
            "frozen":0.0,
            "interest":0.0,
            "outstanding_holding":-0.00080,
            "pending_exposure":0.0,
            "opening_cost":-126.36839957,
            "holding_cost":-125.69703515,
            "realised_pnl":73572.86125165,
            "settled_pnl":73573.5326161,
            "fee_24_h":0.01432411,
            "settled_pnl_24_h":0.67528081,
            "updated_time":"1675220398"
        },{
            "token":"UNI",
            "holding":0.00000000,
            "frozen":0.00000000,
            "interest":0.00000000,
            "outstanding_holding":0.00000000,
            "pending_exposure":0.00000000,
            "opening_cost":0,
            "holding_cost":0,
            "realised_pnl":0,
            "settled_pnl":0,
            "fee_24_h":0,
            "settled_pnl_24_h":0,
            "updated_time":"1655269545"
        }   
    ],
    "success":true
}

Parameters

Name Type Required Description
all enum N true/false. If true then will return all tokens even if balance is empty.

Get Current Holding (Get Balance) - New

Limit: 10 requests per 1 seconds

GET /v3/balances

Holding summary of client. Note that the number in holding could be negative, it means how much client owed to WOO X. The API is design to replace the legacy API Get Current Holding and Get Current Holding v2

Response

{
    "success": true,
    "data": {
        "holding": [
            {
                "token": "WOO",
                "holding": 1,
                "frozen": 0,
                "staked": 0,
                "unbonding": 0,
                "vault": 0,
                "interest": 0,
                "pendingShortQty": 0,
                "pendingLongQty": 0,
                "availableBalance": 0,
                "averageOpenPrice": 0.23432,
                "markPrice": 0.25177,
                "updatedTime": 312321.121
            }
        ]
    },
    "timestamp": 1673323746259
}

Parameters

Parameters

Name Type Required Description
token string N Use the parameter in query string format (i.e. /v3/balance?token=WOO). If the parameter is empty (or not passed) it will return all token's holding.

Get Account Information

Limit: 10 requests per 60 seconds

GET /v1/client/info

** Note: This API will be deprecated at the end of 2023 Q1, please find the replacement API in Get Account Information - New Get account information such as account name, leverage, current exposure ... etc.

Response

{

    "success": true,
    "application": {
        "application_id": "8935820a-6600-4c2c-9bc3-f017d89aa173",
        "account": "CLIENT_ACCOUNT_01",
        "alias": "CLIENT_ACCOUNT_01",
        "account_mode":"FUTURES" //account mode
        "leverage": 5,
        "taker_fee_rate": 0,
        "maker_fee_rate": 0,
        "futures_leverage": 5,
        "futures_taker_fee_rate": 0,
        "futures_maker_fee_rate": 0,
        "otpauth": false
    },
    "margin_rate": 1000
}

Parameters

None

Get Account Information - New

Limit: 10 requests per 60 seconds

GET /v3/accountinfo

Get account information such as account name, leverage, current exposure ... etc. The API is design to replace the legacy API Get Account Information

The referrerID in the response represent the referral code that the user used to sign up, subaccount would pass main account referrerID. The accountType in the response represent the account type is Main account or Subaccount

Response

{
    "success": true,
    "data": {
        "applicationId": "dsa",
        "account": "dsa",
        "alias": "haha",
        "accountMode": "MARGIN",
        "leverage": 1,
        "takerFeeRate": 1,
        "makerFeeRate": 1,
        "interestRate": 1,
        "futuresTakerFeeRate": 1,
        "futuresMakerFeeRate": 1,
        "otpauth": true,
        "marginRatio": 1,
        "openMarginRatio": 1,
        "initialMarginRatio": 1,
        "maintenanceMarginRatio": 1,
        "totalCollateral": 1,
        "freeCollateral": 1,
        "totalAccountValue": 1,
        "totalVaultValue": 1,
        "totalStakingValue": 1,
        'referrerID': 'WOO2023', 
        'accountType': 'Main'
    },
    "timestamp": 1673323685109
}

Parameters

None

Get Token History

Limit: 10 requests per 60 seconds

GET /v1/client/transaction_history

Get account token balance change history, including YIELD_TO_BALANCE, TRADING_FEE, REALIZED_PNL, SPOT_TRADING, FUTURES_TRADING, FUNDING_FEE

Response

{
    "success": true,
    "data": {
        "rows": [
            {
                "id": 1606724,
                "type": "YIELD_TO_BALANCE",
                "token": "WOO",
                "amount": 0.30029155,
                "timestamp": 1686528091385
            },
            {
                "id": 310949247,
                "type": "TRADING_FEE",
                "token": "USDT",
                "amount": -0.174587,
                "timestamp": 1686401821520
            },
            {
                "id": 1686355200000,
                "type": "REALIZED_PNL",
                "token": "USDT",
                "symbol": "PERP_WOO_USDT",
                "amount": -24.64824179,
                "timestamp": 1686355200000
            },
            {
                "id": 7284139,
                "type": "FUNDING_FEE",
                "token": "USDT",
                "amount": 0.02661496,
                "timestamp": 1686009921667
            },
            ...
        ],
        "meta": {
            "total": 65,
            "records_per_page": 25,
            "current_page": 1
        }
    },
    "timestamp": 1686544732777
}

Parameters

Name Type Required Description
type string N WITHDRAW/DEPOSIT/FIAT_WITHDRAW/FIAT_DEPOSIT/EARN/VAULT_WITHDRAW/VAULT_DEPOSIT/YIELD_TO_BALANCE/CREDIT/DISTRIBUTION/REFERRAL/SUB_ACCOUNT_TRANSFER/REBATE/LIQUIDATION/SPECIAL/STAKING/UNSTAKING/UNSTAKING_FEE/INTEREST/CONVERT/FUNDING_FEE/SPOT_TRADING/TRADING_FEE/REALIZED_PNL/RFQ
start_t timestamp N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
end_t timestamp N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
page number N (default: 1) the page you wish to query.
size number N (default: 25)

Get Account API Key & Permission

Limit: 10 requests per 60 seconds

GET usercenter/api/enabled_credential

Get api_key list and its permissions of the account. The response will contain your API keys’ permissions based on the credentials.

Response

{
    "success": true,
    "data": {
        "rows": [
            {
                "account_name": "Main",
                "user_id": 10001,
                "api_key": "+Pxxxxxxxxxxxxxxxxxxxx==",
                "permission": "Read,"
            },
            {
                "account_name": "Main",
                "user_id": 10001,
                "api_key": "Hxxxxxxxxxxxxxxxxxxxx==",
                "permission": "Read,"
            },
            {
                "account_name": "Main",
                "user_id": 10001,
                "api_key": "Cxxxxxxxxxxxxxxxxxxxx==",
                "permission": "Read,"
            },
            {
                "account_name": "testSubAccount",
                "user_id": 10001,
                "api_key": "vxxxxxxxxxxxxxxxxxxxx==",
                "permission": "Read,Enable trade,"
            }
            ...
        ],
        "meta": {
            "total": 11,
            "records_per_page": 5,
            "current_page": 1
        }
    },
    "timestamp": 1685414636917
}

Parameters

None

Get Buy Power

Limit: 60 requests per 60 seconds

GET /v3/buypower

Get buying power for selected symbol.

Response


{
  "success": true,
  "data": [
    {
        "symbol": "SPOT_BTC_USDT",
        "availableBaseQuantity": 1.2,
        "availableQuoteQuantity": 100,
    },
  ],
  "timestamp": 1575014255
}

Parameters

Name Type Required Description
symbol string Y symbol that you wish to query

Get Token Deposit Address

Limit 60 requests per 60 seconds

GET /v1/asset/deposit

Get your unique deposit address by token

Response

{
    "success": true,
    "address": "0x31d64B3230f8baDD91dE1710A65DF536aF8f7cDa",
    "extra": ""
}

Parameters

Name Type Required Description
token string Y token name you want to deposit (can get it by /public/token)

Token Withdraw

Limit 20 requests per 60 seconds

POST /v1/asset/withdraw

Initiate a token withdrawal request, amount must less than or equal to holding

Response

{
    "success": true,
    "withdraw_id": "20200119145703654"
}

Parameters

Name Type Required Description
token string Y token name you want to withdraw (can get it by /public/token)
address string Y the address you want to withdraw
extra string N address extra information such as MEMO or TAG
amount number Y amount you want to withdraw, must less or equal than holding

Cancel Withdraw Request

Limit 5 requests per 60 seconds

DELETE /v1/asset/withdraw

Cancel withdraw request when status is NEW

Response

{
    "success": true
}

Parameters

Name Type Required Description
id string Y the withdraw id you want to cancel

Get Asset History

Limit 10 requests per 60 seconds

GET /v1/asset/history

Get asset history, includes token deposit/withdraw and collateral deposit/withdraw.

Response

{
    "success": true,
    "meta": {
        "records_per_page": 25,
        "current_page": 1
    },
    "rows": [
        {
            "created_time": "1579399877.041", // Unix epoch time in seconds
            "updated_time": "1579399877.041", // Unix epoch time in seconds
            "id": "202029292829292",
            "external_id": "202029292829292",
            "application_id": null,
            "token": "ETH",
            "target_address": "0x31d64B3230f8baDD91dE1710A65DF536aF8f7cDa",
            "source_address": "0x70fd25717f769c7f9a46b319f0f9103c0d887af0",
            "confirming_threshold":12,
            "confirmed_number":12,
            "extra": "",
            "type": "BALANCE",
            "token_side": "DEPOSIT",
            "amount": 1000,
            "tx_id": "0x8a74c517bc104c8ebad0c3c3f64b1f302ed5f8bca598ae4459c63419038106b6",
            "fee_token": null,
            "fee_amount": null,
            "status": "CONFIRMING"
        },
        {
            "created_time": "1579399877.041",
            "updated_time": "1579399877.041",
            "id": "20202020202020022",
            "external_id": "20202020202020022",
            "application_id": null,
            "token": "ETH",
            "target_address": "0x31d64B3230f8baDD91dE1710A65DF536aF8f7cDa",
            "source_address": "0x70fd25717f769c7f9a46b319f0f9103c0d887af0",
            "confirming_threshold":12,
            "confirmed_number":12,
            "extra": "",
            "type": "BALANCE",
            "token_side": "DEPOSIT",
            "amount": 100,
            "tx_id": "0x7f74c517bc104c8ebad0c3c3f64b1f302ed5f8bca598ae4459c63419038106c5",
            "fee_token": null,
            "fee_amount": null,
            "status": "COMPLETED"
        }
    ]
}

Parameters

Name Type Required Description
token string N token name you want to search (can get it by /public/token)
balance_token string N balance_token name you want to search (can get it by /public/token)
type string N BALANCE/COLLATERAL
token_side string N DEPOSIT/WITHDRAW
status string N NEW/CONFIRMING/PROCESSING/COMPLETED/CANCELED
start_t timestamp N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
end_t timestamp N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
page number N (default: 1) the page you wish to query.
size number N (default: 25)

Margin Interest Rates

Limit 10 requests per 60 seconds

GET /v1/token_interest

Get the margin interest rate of each token.

Response

{
    "success": true,
    "rows": [
        {
            "token": "MATIC",
            "current_hourly_base_rate": "0.0001%",
            "est_hourly_base_rate": "0.0001%",
            "current_annual_base_rate": "0.876%",
            "est_annual_base_rate": "0.876%",
            "est_time": "1632394800.000"          // Unix epoch time in seconds
        },
        {
            "token": "USDT",
            "current_hourly_base_rate": "0.0008%",
            "est_hourly_base_rate": "0.0008%",
            "current_annual_base_rate": "7.008%",
            "est_annual_base_rate": "7.008%",
            "est_time": "1632394800.000"          // Unix epoch time in seconds
        },
        {
            "token": "WOO",
            "current_hourly_base_rate": "0.001%",
            "est_hourly_base_rate": "0.001%",
            "current_annual_base_rate": "8.76%",
            "est_annual_base_rate": "8.76%",
            "est_time": "1632394800.000"          // Unix epoch time in seconds
        },
        // ...
    ]
}

Parameters

None

Margin Interest Rate of Token

Limit 10 requests per 60 seconds

GET /v1/token_interest/:token

Get the margin interest rate of the specific token.

Response

{
    "success": true,
    "info": {
        "token": "BTC",
        "current_hourly_base_rate": "0.0001%",
        "est_hourly_base_rate": "0.0001%",
        "current_annual_base_rate": "0.876%",
        "est_annual_base_rate": "0.876%",
        "est_time": "1632448800.000"         // Unix epoch time in seconds
    }
}

Parameters

Name Type Required Description
token string Y should be upper case

Get Interest History

Limit 10 requests per 60 seconds

GET /v1/interest/history

Get margin interest history. loan_amount will only appear when the side is LOAN.

Response

{
    "success": true,
    "meta": {
        "total": 349,
        "records_per_page": 25,
        "current_page": 1
    },
    "rows": [

       {
            "created_time": "1579399877.041", // Unix epoch time in seconds
            "updated_time": "1579399877.041", // Unix epoch time in seconds
            "token": "USDT",
            "application_id": null,
            "user_id": null,
            "status": "SUCCEED",
            "quantity": 0.20768326,
            "side": "LOAN",
            "interest": 0.01,
            "hourly_rate": "0.001%",
            "annual_rate": "8.76%",
            "loan_amount": 1000
        }
    ]
}

Parameters

Name Type Required Description
token string N interest token which you want to query
side string N LOAN/REPAY/AUTO_REPAY
start_t timestamp N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
end_t timestamp N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
page number N (default: 1) the page you wish to query.
size number N (default: 25)

Repay Interest

Limit 10 requests per 60 seconds

POST /v1/interest/repay

REPAY your margin interest.

Response

{
    "success": true,
}

Parameters

Name Type Required Description
token string Y interest token which you want to repay
amount number Y repayment amount

Get referrals summary

Limit: 10 requests per 60 seconds

GET /v3/referrals

Get referral information from each user you has referred.

Response

// The status of the recommender includes four types:Registered; Verified identity; Deposited; Traded
{
    "success": true,
    "data": {
        "rows": [
            {
                "referralId": 12509,
                "registerTime": "1643076873.484",
                "referralCode": "OJEDSSMU",
                "tradeStatus": "Traded",
                "earnWoo": 144.78597143,
                "earnUsdt": 0,
                "email": "[email protected]",
                "extraBonus": 0,
                "extraBonusToken": "WOO",
                "previousVersionCommissionSum": 10.07981438,
                "previousVersionCommissionSumToken": "WOO"
            },
            {
                "referralId": 12192,
                "registerTime": "1639365757.173",
                "referralCode": "OJEDSSMU",
                "tradeStatus": "Traded",
                "earnWoo": 5729.91597424,
                "earnUsdt": 80.39717397,
                "email": "[email protected]",
                "extraBonus": 0,
                "extraBonusToken": "WOO",
                "previousVersionCommissionSum": 5726.55249830,
                "previousVersionCommissionSumToken": "WOO"
            },
            {
                "referralId": 10588,
                "registerTime": "1678349096.000",
                "referralCode": "OJEDSSMU",
                "tradeStatus": "Traded",
                "earnWoo": 2058880.44406483,
                "earnUsdt": 54128.36568263,
                "email": "[email protected]",
                "extraBonus": 90,
                "extraBonusToken": "WOO",
                "previousVersionCommissionSum": 20160.36080029,
                "previousVersionCommissionSumToken": "WOO"
            },
            {
                "referralId": 10492,
                "registerTime": "1623203745.173",
                "referralCode": "DIHGLR3T",
                "tradeStatus": "Traded",
                "earnWoo": 0,
                "earnUsdt": 0.76927350,
                "email": "[email protected]",
                "extraBonus": 90,
                "extraBonusToken": "WOO",
                "previousVersionCommissionSum": null,
                "previousVersionCommissionSumToken": "WOO"
            }
        ],
        "meta": {
            "total": 4,
            "records_per_page": 25,
            "current_page": 1
        }
    },
    "timestamp": 1690192103430
}

Parameters

Name Type Required Description
page number N (default: 1) the page you wish to query.
size number N (default: 25)
from number N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
to number N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.

Get referral reward history

Limit: 10 requests per 60 seconds

GET /v3/referral_rewards

Get referral reward information

Response

{
    "success": true,
    "data": {
        "rows": [
            {
                "trade_date": "2023/07/17",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.47000000,
                "referral_commission": 53929.73957955,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 10588
            },
            {
                "trade_date": "2023/07/17",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 2038704.30927676,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 10588
            },
            {
                "trade_date": "2023/07/12",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 0.05004760,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 10588
            },
            {
                "trade_date": "2023/07/11",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 0.44951069,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 10588
            },
            {
                "trade_date": "2023/07/11",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.47000000,
                "referral_commission": 0.04858848,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/07/11",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 3.09802285,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/07/07",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 134.61965671,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 12509
            },
            {
                "trade_date": "2023/07/06",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 15.27442949,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 10588
            },
            {
                "trade_date": "2023/07/03",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.30000000,
                "referral_commission": 0.00811566,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/07/03",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 0.26545309,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/06/30",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.30000000,
                "referral_commission": 0.00144840,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/06/30",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 0.08224395,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/06/29",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.30000000,
                "referral_commission": 0.06940520,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/06/29",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 4.34149772,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/06/28",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.30000000,
                "referral_commission": 0.01434340,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/06/28",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 0.87468814,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/06/27",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.30000000,
                "referral_commission": 0.01949850,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 10492
            },
            {
                "trade_date": "2023/06/27",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.30000000,
                "referral_commission": 0.00900000,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 10588
            },
            {
                "trade_date": "2023/06/27",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 0.90196242,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 10588
            },
            {
                "trade_date": "2023/06/27",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.30000000,
                "referral_commission": 0.05706141,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/06/27",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 3.43115031,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 12192
            },
            {
                "trade_date": "2023/06/26",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.30000000,
                "referral_commission": 0.74977500,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 10492
            },
            {
                "trade_date": "2023/06/26",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.30000000,
                "referral_commission": 0.05399999,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 10588
            },
            {
                "trade_date": "2023/06/26",
                "referral_receive_percentage": 0,
                "referrer_receive_percentage": 0,
                "referral_rate": 0.00100000,
                "referral_commission": 2.78932410,
                "status": "Credited",
                "reward_token": "WOO",
                "referral_tier": 0,
                "referral_program": "AFFILIATE",
                "referral_id": 10588
            },
            {
                "trade_date": "2023/06/26",
                "referral_receive_percentage": 0.50000000,
                "referrer_receive_percentage": 0.50000000,
                "referral_rate": 0.30000000,
                "referral_commission": 0.06862500,
                "status": "Credited",
                "reward_token": "USDT",
                "referral_tier": 5,
                "referral_program": "TIER",
                "referral_id": 12192
            }
        ],
        "meta": {
            "total": 79,
            "records_per_page": 25,
            "current_page": 1
        }
    },
    "timestamp": 1690273370109
}

Parameters

Name Type Required Description
page number N (default: 1) the page you wish to query.
size number N (default: 25)
from number N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
to number N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.

Get Subaccounts

Limit: 10 requests per 60 seconds

GET /v1/sub_account/all

Get subaccount list.

Response

{
    "rows": [
        {
            "application_id": "6b43de5c-0955-4887-9862-d84e4689f9fe",
            "account": "2",
            "created_time": "1606897264.994"
        },
        {
            "application_id": "5b0df321-3aaf-471f-a386-b922a941d17d",
            "account": "1",
            "created_time": "1606897264.994"
        },
        {
            "application_id": "de25e672-f3e8-4ddc-b264-75d243cb2b9c",
            "account": "test",
            "created_time": "1606897264.994"
        }
    ],
    "success": true
}

Permission

Main account only.

Parameters

None

Get Assets of Subaccounts

Limit: 10 requests per 60 seconds

GET /v1/sub_account/assets

Get assets summary of all subaccounts (including main account).

Response

{
    "rows": [
        {
            "application_id": "0b297f58-9d3e-4c91-95cd-863329631b79",
            "account": "Main",
            "usdt_balance": 0.0
        }
    ],
    "success": true
}

Permission

Main account only.

Parameters

None

Get Asset Details from a Subaccount

Limit: 10 requests per 60 seconds

GET /v1/sub_account/asset_detail

Get assets details from a subaccounts.

Response

{
    "balances": {
        "BTC": {
            "holding": 0.0,
            "frozen": 0.0,
            "interest": 0.0,
            "staked": 0.0,
            "unbonding": 0.0,
            "vault": 0.0
        },
        "WOO": {
            "holding": 4172706.29647137,
            "frozen": 0.0,
            "interest": 0.0,
            "staked": 51370692,
            "unbonding": 0.0,
            "vault": 0.0
        },
        "BNB": {
            "holding": 0.00070154,
            "frozen": 0.0,
            "interest": 0.0,
            "staked": 0.0,
            "unbonding": 0.0,
            "vault": 0.0
        },
        "ETH": {
            "holding": 0.0,
            "frozen": 0.0,
            "interest": 0.0,
            "staked": 0.0,
            "unbonding": 0.0,
            "vault": 0.0
        },
        "USDT": {
            "holding": 14066.5839369,
            "frozen": 0.0,
            "interest": 0.0,
            "staked": 0.0,
            "unbonding": 0.0,
            "vault": 0.0
        }
    },
    "account": "test",
    "success": true,
    "application_id": "e074dd6b-4c03-49be-937f-856472f7a6cb"
}

Permission

Main or Subaccounts.

Parameters

Name Type Required Description
application_id string Y application id for an account, user can find it from WOO X console.

Get IP Restriction

Limit: 10 requests per 10 seconds

GET /v1/sub_account/ip_restriction

Get allowed IP list of a subaccount's API Key.

Response

{
    "rows": [
        {
            "ip_list": "60.248.33.61,1.2.3.4,100.100.1.1,100.100.1.2,100.100.1.3,100.100.1.4,210.64.18.77",
            "api_key": "plXHR+GwX0u8UG/GwMjLsQ==",
            "update_time": "1644553230.916",
            "restrict": true
        }
    ],
    "meta": {
        "total": 1,
        "records_per_page": 25,
        "current_page": 1
    },
    "success": true
}

Permission

Main or Subaccounts.

Parameters

Name Type Required Description
application_id string N from WOO X console
api_key string N created from WOO X console

Get Transfer History

Limit: 20 requests per 60 seconds

GET /v1/asset/main_sub_transfer_history

Get transfer history between main account and subaccounts.

Response


{
    "success":true,
    "data":{
        "rows":[
            {
                "id":225,
                "token":"USDT",
                "amount":1000000,
                "status":"COMPLETED",
                "from_application_id":"046b5c5c-5b44-4d27-9593-ddc32c0a08ae",
                "to_application_id":"082ae5ae-e26a-4fb1-be5b-03e5b4867663",
                "from_user":"Main",
                "to_user":"av",
                "created_time":"1642660941.534",
                "updated_time":"1642660941.950"
            },
            // ....skip (total 25 items in one page)
        ],
        "meta":{
            "total":7,
            "records_per_page":5,
            "current_page":1
        }
    }
}

Permission

Main or Subaccounts.

Parameters

Name Type Required Description
start_t timestamp N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
end_t timestamp N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
page number N (default: 1) the page you wish to query.
size number N (default: 25)

Transfer Assets

Limit: 20 requests per 60 seconds POST /v1/asset/main_sub_transfer

Transfer asset between main account and subaccounts.

Response

{
    "success": true,
    "id": 200
}

Permission

Main or Subaccounts.

Parameters

Name Type Required Description
token string Y token name you want to transfer (can get it by /public/token)
amount number Y amount you want to transfer
from_application_id string Y application id you want to transfer from
to_application_id string Y application id you want to transfer to

Update Account Mode

Limit: 5 requests per 60 seconds per user

POST /v1/client/account_mode

Choose account mode: pure spot or margin or futures

Parameters

Name Type Required Description
account_mode string Y PURE_SPOT, MARGIN, FUTURES

Response

{
    "success": true
}

Update Position Mode

Limit: 2 requests per 1 second per user

POST /v1/client/position_mode

Choose position mode: ONE_WAY or HEDGE_MODE

Parameters

Name Type Required Description
position_mode string Y set ONE_WAY / HEDGE_MODE to position mode

Response

{
    "success": true
}

Update Leverage Setting

Limit: 5 requests per 60 seconds per user

POST /v1/client/leverage

Choose maximum leverage for margin mode or futures mode

Parameters

Name Type Required Description
leverage int Y for margin mode: 1, 2, 3, 4, 5 ; for futures mode: 1, 2, 3, 4, 5, 10, 15, 20

Response

{
    "success": true
}

Get Funding Fee History

Limit: 20 requests per 60 seconds per user

GET /v1/funding_fee/history

Get funding fee history

Parameters

Name Type Required Description
symbol string N symbol that you wish to query
start_t timestamp N start time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
end_t timestamp N end time range that you wish to query, noted that the time stamp is a 13-digits timestamp.
page number N (default: 1) the page you wish to query.
size number N (default: 10) max 5000

Response

{
    "success": true,
    "meta": {
            "total": 670,
        "records_per_page": 25,
        "current_page": 1
    },
    "rows": [
        {
            "id": 10001,
            "symbol": "PERP_BTC_USDT",
            "funding_rate": 0.00345,
            "mark_price": 100,
            "funding_fee": 0.345,
            "payment_type": "Receive", // Receive and Pay
            "status": "COMPLETED",
            "created_time": "1575014255.089", // Unix epoch time in seconds
            "updated_time": "1575014255.910", // Unix epoch time in seconds
            "funding_rate_interval_hours": 1
        },
        // ....skip (total 25 items in one page)

}

Get All Position info

Limit: 30 requests per 10 seconds per user

GET /v1/positions

** Note: This API will be deprecated at the end of 2023 Q1, please find the replacement API in Get Positions - New

Parameters

Response

{
    "success": true,
    "current_margin_ratio": 0.8,
    "initial_margin_ratio": 0.8,
    "maintenance_margin_ratio": 0.8,
    "total_collateral": 100,
    "free_collateral": 80,
    "total_account_value": 150,
    "total_vault_value": 10,
    "total_staking_value": 5,
    "positions": [
        {
            "symbol": "PERP_BTC_USDT",
            "holding": 1.23,
            "pending_long_qty": 0.5,
            "pending_short_qty": 0.23,
            "settle_price": 50000,
            "average_open_price": 49000,
            "pnl_24_h": 20,
            "fee_24_h": 12,
            "mark_price": 49550,
            "est_liq_price": 40000,
            "timestamp": "1575014255.089"
        },
        // ....skip 
    ]  
}

Get All Position info - New

Limit: 30 requests per 10 seconds per user

GET /v3/positions

The API is design to replace the legacy API Get Positions

Parameters

Response

{
    "success": true,
    "data": {
        "positions": [
            {
                "symbol": "0_symbol",
                "holding": 1,
                "pendingLongQty": 0,
                "pendingShortQty": 1,
                "settlePrice": 1,
                "averageOpenPrice": 1,
                "pnl24H": 1,
                "fee24H": 1,
                "markPrice": 1,
                "estLiqPrice": 1,
                "adlQuantile": 1,
                "timestamp": 12321321
            }
        ]
    },
    "timestamp": 1673323880342
}

Get One Position info

Limit: 30 requests per 10 seconds per user

GET /v1/position/:symbol

Parameters

Response

{
    "success": true,
    "symbol": "PERP_BTC_USDT",
    "holding": 1.23,
    "pending_long_qty": 0.5,
    "pending_short_qty": 0.23,
    "settle_price": 50000,
    "average_open_price": 49000,
    "pnl_24_h": 20,
    "fee_24_h": 0.2,
    "mark_price": 49550,
    "est_liq_price": 40000,
    "timestamp": "1575014255.089"
}

GET InsuranceFund

Limit: token filtered to USDT only

GET /v3/public/insuranceFund

Parameters

Name Type Required Description
symbol string Y

Response

{
   "success": true,
    "data": {
      "rows": [
        {
          "balance": 1000,
          "token": "USDT",
        }
      ]
    },
    "timestamp": 1673323685109 
}

Websocket API V2

Market Data Base endpoints:

Private User Data Stream Base endpoints:

PING/PONG

Parameters

Name Type Required Description
event string Y ping/pong
{
    "event":"ping"
}

Response

{
    "event":"pong",
    "ts":1614667590000
}

request orderbook

Push interval: real-time push

Parameters

Name Type Required Description
id string Y id generate by client
event string Y request
params.type string Y orderbook
params.symbol string Y {symbol}
{
    "id": "clientID1",
    "event": "request",
    "params": {
        "type": "orderbook",
        "symbol": "SPOT_BTC_USDT"
    }
}

Response

{
    "id":"123r",
    "event":"request",
    "success":true,
    "ts":1618880432419,
    "data":{
        "symbol":"SPOT_BTC_USDT",
        "ts":1618880432380,
        "asks":[
            [
                54700,
                0.443951
            ],
            [
                54700.02,
                0.002566
            ],
            ...
        ],
        "bids":[
            [
                54699.99,
                2.887466
            ],
            [
                54699.76,
                2.034711
            ],
           ...
        ]
    }
}

orderbook

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y {symbol}@orderbook/{symbol}@orderbook100
{
    "id": "clientID2",
    "topic": "SPOT_WOO_USDT@orderbook",
    "event": "subscribe"
}

Response

{
    "id": "clientID2",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic": "SPOT_WOO_USDT@orderbook",
    "ts": 1614152140945,
    "data": {
        "symbol": "SPOT_WOO_USDT",
        "asks": [
            [
                0.31075,
                2379.63
            ],
            [
                0.31076,
                4818.76
            ],
            [
                0.31078,
                8496.1
            ],
            ...
        ],
        "bids": [
            [
                0.30891,
                2469.98
            ],
            [
                0.3089,
                482.5
            ],
            [
                0.30877,
                20
            ],
            ...
        ]
    }
}

orderbookupdate

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y {symbol}@orderbookupdate
{
    "id": "clientID2",
    "topic": "SPOT_BTC_USDT@orderbookupdate",
    "event": "subscribe"
}

Response

{
    "id": "clientID2",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"SPOT_BTC_USDT@orderbookupdate",
    "ts":1618826337580,
    "data":{
        "symbol":"SPOT_BTC_USDT",
        "prevTs":1618826337380,
        "asks":[
            [
                56749.15,
                3.92864
            ],
            [
                56749.8,
                0
            ],
            ...
        ],
        "bids":[
            [
                56745.2,
                1.03895025
            ],
            [
                56744.6,
                1.0807
            ],
            ...
        ]
    }
}

trade

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y {symbol}@trade
{
    "id": "clientID3",
    "topic": "SPOT_ADA_USDT@trade",
    "event": "subscribe"
}

Response

{
    "id": "clientID3",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"SPOT_ADA_USDT@trade",
    "ts":1618820361552,
    "data":{
        "symbol":"SPOT_ADA_USDT",
        "price":1.27988,
        "size":300,
        "side":"BUY",
        "source":0
    }
}

trades

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y SPOT_BTC_USDT@trades
{
    "id": "clientID3",
    "topic": "SPOT_BTC_USDT@trades",
    "event": "subscribe"
}

Response

{
    "id": "clientID3",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"SPOT_BTC_USDT@trades",
    "ts":1618820361552,
    "data":[{
        "symbol":"SPOT_BTC_USDT",
        "price":42598.27,
        "size":300,
        "side":"BUY",
        "source":0
    },
    {
        "symbol":"SPOT_BTC_USDT",
        "price":42589.74,
        "size":200,
        "side":"BUY",
        "source":0
    }
    ]
}

24h ticker

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y {symbol}@ticker
{
    "id": "clientID4",
    "topic": "SPOT_WOO_USDT@ticker",
    "event": "subscribe"
}

Response

{
    "id": "clientID4",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic": "SPOT_WOO_USDT@ticker",
    "ts": 1614152270000,
    "data": {
        "symbol": "SPOT_WOO_USDT",
        "open": 0.16112,
        "close": 0.32206,
        "high": 0.33000,
        "low": 0.14251,
        "volume": 89040821.98,
        "amount": 22493062.21,
        "count": 15442
    }
}

24h tickers

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y tickers
{
    "id": "clientID4",
    "topic": "tickers",
    "event": "subscribe"
}

Response

{
    "id": "clientID4",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"tickers",
    "ts":1618820615000,
    "data":[
        {
            "symbol":"SPOT_OKB_USDT",
            "open":16.297,
            "close":17.183,
            "high":24.707,
            "low":11.997,
            "volume":0,
            "amount":0,
            "count":0
        },
        {
            "symbol":"SPOT_XRP_USDT",
            "open":1.3515,
            "close":1.43794,
            "high":1.96674,
            "low":0.39264,
            "volume":750127.1,
            "amount":985440.5122,
            "count":396
        },
       ...
    ]
}

bbo

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y {symbol}@bbo
{
    "id": "clientID5",
    "topic": "SPOT_WOO_USDT@bbo",
    "event": "subscribe"
}

Response

{
    "id": "clientID5",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic": "SPOT_WOO_USDT@bbo",
    "ts": 1614152296945,
    "data": {
        "symbol": "SPOT_WOO_USDT",
        "ask": 0.30939,
        "askSize": 4508.53,
        "bid": 0.30776,
        "bidSize": 25246.14
    }
}

bbos

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y bbos
{
    "id": "clientID5",
    "topic": "bbos",
    "event": "subscribe"
}

Response

{
    "id": "clientID5",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"bbos",
    "ts":1618822376000,
    "data":[
        {
            "symbol":"SPOT_FIL_USDT",
            "ask":159.0318,
            "askSize":370.43,
            "bid":158.9158,
            "bidSize":16
        },
        {
            "symbol":"SPOT_BTC_USDT",
            "ask":56987.18,
            "askSize":3.163881,
            "bid":56987.17,
            "bidSize":0.941728
        },
       ...
    ]
}

k-line

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string N {symbol}@kline_{time}
{
    "id": "clientID6",
    "topic": "SPOT_BTC_USDT@kline_1m",
    "event": "subscribe"
}

Response

{
    "id": "clientID6",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"SPOT_BTC_USDT@kline_1m",
    "ts":1618822432146,
    "data":{
        "symbol":"SPOT_BTC_USDT",
        "type":"1m",
        "open":56948.97,
        "close":56891.76,
        "high":56948.97,
        "low":56889.06,
        "volume":44.00947568,
        "amount":2504584.9,
        "startTime":1618822380000,
        "endTime":1618822440000
    }
}

indexprice

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y {symbol}@indexprice
{
    "id": "clientID3",
    "topic": "SPOT_ETH_USDT@indexprice",
    "event": "subscribe"
}

Response

{
    "id": "clientID3",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"SPOT_ETH_USDT@indexprice",
    "ts":1618820361552,
    "data":{
        "symbol":"SPOT_ETH_USDT",
        "price":3987.1
    }
}

markprice

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y {symbol}@markprice
{
    "id": "clientID3",
    "topic": "PERP_ETH_USDT@markprice",
    "event": "subscribe"
}

Response

{
    "id": "clientID3",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"PERP_ETH_USDT@markprice",
    "ts":1618820361552,
    "data":{
        "symbol":"PERP_ETH_USDT",
        "price":3987.2
    }
}

estfundingrate

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y {symbol}@estfundingrate
{
    "id": "clientID3",
    "topic": "PERP_BTC_USDT@estfundingrate",
    "event": "subscribe"
}

Response

{
    "id": "clientID3",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"PERP_BTC_USDT@estfundingrate",
    "ts":1618820361552,
    "data":{
        "symbol":"PERP_BTC_USDT",
        "fundingRate":1.27988,
        "fundingTs":1618820361552
    }
}

openinterests

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y openinterests
{
    "id": "clientID3",
    "topic": "openinterests",
    "event": "subscribe"
}

Response

{
    "id": "clientID3",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"openinterests",
    "ts":1618820361552,
    "data":[
        {
        "symbol":"PERP_BNB_USDT",
        "openinterest":936.37
    },
       {
        "symbol":"PERP_ORDI_USDT",
        "openinterest":110.1
    }
    ]
}

markprices

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y markprices
{
    "id": "clientID5",
    "topic": "markprices",
    "event": "subscribe"
}

Response

{
    "id": "clientID5",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"markprices",
    "ts":1618822376000,
    "data":[
        {
           "symbol":"PERP_BTC_USDT",
            "price":51234.13
        },
        {
            "symbol":"PERP_ETH_USDT",
              "price":3894.34
        },
       ...
    ]
}

auth

Parameters

Name Type Required Description
apikey string Y api key
sign string Y sign
timestamp string Y timestamp
{
    "id":"123r",
    "event":"auth",
    "params":{
        "apikey":"CUS69ZJOXwSV38xo...",
        "sign":"4180da84117fc9753b...",
        "timestamp":"1621910107900"
    }
}

Response

{
    "id":"123r",
    "event":"auth",
    "success":true,
    "ts":1621910107315
}

balance

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y balance
{
    "id": "clientID3",
    "topic": "balance",
    "event": "subscribe"
}

Response

{
    "id": "clientID3",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic":"balance",
    "ts":1618757714353,
    "data":{
        "balances":{
            "BTC":{
                "holding":0,
                "frozen":0,
                "interest":0,
                "pendingShortQty":0,
                "pendingLongQty":0,
                "version":0,
                "staked":0,
                "unbonding":0,
                "vault":309.8,
                "launchpadVault":0.0,
                "earn":0.0,
                "averageOpenPrice":0,
                "pnl24H":0,
                "fee24H":0,
                "markPrice":0
            },
            "ETH":{
                "holding":0,
                "frozen":0,
                "interest":0,
                "pendingShortQty":0,
                "pendingLongQty":0,
                "version":0,
                "staked":0,
                "unbonding":0,
                "vault":309.8,
                "launchpadVault":0.0,
                "earn":0.0,
                "averageOpenPrice":0,
                "pnl24H":0,
                "fee24H":0,
                "markPrice":0
            },
            ...
        }
    }
}

executionreport

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y executionreport
{
    "id": "clientID3",
    "topic": "executionreport",
    "event": "subscribe"
}

Response

{
    "id": "clientID3",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

// receive for order status in new, filled, partial filled execution report
{
    "topic": "executionreport",
    "ts": 1675406261689,
    "data":
    {
        "msgType": 0,  // execution report
        "symbol": "SPOT_BTC_USDT",
        "clientOrderId": 0,
        "orderId": 54774393,
        "type": "MARKET",
        "side": "BUY",
        "quantity": 0.0,
        "price": 0.0,
        "tradeId": 56201985,
        "executedPrice": 23534.06,
        "executedQuantity": 0.00040791,
        "fee": 2.1E-7,
        "feeAsset": "BTC",
        "totalExecutedQuantity": 0.00040791,
        "avgPrice": 23534.06,
        "status": "FILLED",
        "reason": "",
        "orderTag": "default",
        "totalFee": 2.1E-7,
        "visible": 0.0,
        "timestamp": 1675406261689,
        "reduceOnly": false,
        "maker": false
    }
}

// receive when editing order be rejected
{
    "topic": "executionreport",
    "ts": 1675406261689,
    "data":
    {
        "msgType": 1,  // edit reject
        "symbol": "SPOT_BTC_USDT",
        "orderId": 54774393,
        "reason": ""
    }
}

// receive when canceling order be rejected
{
    "topic": "executionreport",
    "ts": 1675406261689,
    "data":
    {
        "msgType": 2,  // cancel reject
        "symbol": "SPOT_BTC_USDT",
        "orderId": 54774393,
        "reason": ""
    }
}

// receive when canceling ALL orders be rejected
{
    "topic": "executionreport",
    "ts": 1675406261689,
    "data":
    {
        "msgType": 3,  // cancel all reject
        "symbol": "SPOT_BTC_USDT",
        "reason": ""
    }
}

Error response

{
    "id": "clientID7",
    "event": "subscribe",
    "success": false,
    "ts": 1614141150601,
    "errorMsg": "invalid symbol SPOT_WOO_USDC"
}

algoexecutionreportv2

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y algoexecutionreportv2
{
    "id": "clientID3",
    "topic": "algoexecutionreportv2",
    "event": "subscribe"
}

Response

{
    "id": "clientID3",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic": "algoexecutionreportv2",
    "ts": 1667978011834,
    "data": [
        {
            "symbol": "SPOT_BAL_USDT",
            "rootAlgoOrderId": 345181,
            "parentAlgoOrderId": 0,
            "algoOrderId": 345181,
            "clientOrderId": 0,
            "orderTag": "default",
            "status": "NEW",
            "algoType": "BRACKET",
            "side": "SELL",
            "quantity": 1,
            "triggerStatus": "SUCCESS",
            "price": 69,
            "type": "LIMIT",
            "triggerTradePrice": 0,
            "triggerTime": 0,
            "tradeId": 0,
            "executedPrice": 0,
            "executedQuantity": 0,
            "fee": 0,
            "reason": "",
            "feeAsset": "USDT",
            "totalExecutedQuantity": 0,
            "averageExecutedPrice": 0,
            "totalFee": 0,
            "timestamp": 1667978011834,
            "visibleQuantity": 1,
            "reduceOnly": false,
            "activatedPrice": 0,
            "triggered": false,
            "activated": false,
            "maker": false,
            "isTriggered": false,
            "isMaker": false,
            "isActivated": false,
            "rootAlgoStatus": "NEW",
            "algoStatus": "NEW"
        },
        {
            "symbol": "SPOT_BAL_USDT",
            "rootAlgoOrderId": 345181,
            "parentAlgoOrderId": 345181,
            "algoOrderId": 345182,
            "clientOrderId": 0,
            "orderTag": "default",
            "algoType": "POSITIONAL_TP_SL",
            "side": "BUY",
            "quantity": 0,
            "triggerStatus": "USELESS",
            "price": 0,
            "triggerTradePrice": 0,
            "triggerTime": 0,
            "tradeId": 0,
            "executedPrice": 0,
            "executedQuantity": 0,
            "fee": 0,
            "reason": "",
            "feeAsset": "",
            "totalExecutedQuantity": 0,
            "averageExecutedPrice": 0,
            "totalFee": 0,
            "timestamp": 1667978011900,
            "visibleQuantity": 0,
            "reduceOnly": false,
            "activatedPrice": 0,
            "triggered": false,
            "activated": false,
            "maker": false,
            "isTriggered": false,
            "isMaker": false,
            "isActivated": false,
            "rootAlgoStatus": "NEW",
            "algoStatus": "NEW"
        },
        {
            "symbol": "SPOT_BAL_USDT",
            "rootAlgoOrderId": 345181,
            "parentAlgoOrderId": 345182,
            "algoOrderId": 345183,
            "clientOrderId": 0,
            "orderTag": "default",
            "algoType": "TAKE_PROFIT",
            "side": "BUY",
            "quantity": 0,
            "triggerPrice": 50,
            "triggerStatus": "USELESS",
            "price": 0,
            "type": "CLOSE_POSITION",
            "triggerTradePrice": 0,
            "triggerTime": 0,
            "tradeId": 0,
            "executedPrice": 0,
            "executedQuantity": 0,
            "fee": 0,
            "reason": "",
            "feeAsset": "",
            "totalExecutedQuantity": 0,
            "averageExecutedPrice": 0,
            "totalFee": 0,
            "timestamp": 1667978011900,
            "visibleQuantity": 0,
            "reduceOnly": true,
            "activatedPrice": 0,
            "triggered": false,
            "activated": false,
            "maker": false,
            "isTriggered": false,
            "isMaker": false,
            "isActivated": false,
            "rootAlgoStatus": "NEW",
            "algoStatus": "NEW"
        },
        {
            "symbol": "SPOT_BAL_USDT",
            "rootAlgoOrderId": 345181,
            "parentAlgoOrderId": 345182,
            "algoOrderId": 345184,
            "clientOrderId": 0,
            "orderTag": "default",
            "algoType": "STOP_LOSS",
            "side": "BUY",
            "quantity": 0,
            "triggerPrice": 75,
            "triggerStatus": "USELESS",
            "price": 0,
            "type": "CLOSE_POSITION",
            "triggerTradePrice": 0,
            "triggerTime": 0,
            "tradeId": 0,
            "executedPrice": 0,
            "executedQuantity": 0,
            "fee": 0,
            "reason": "",
            "feeAsset": "",
            "totalExecutedQuantity": 0,
            "averageExecutedPrice": 0,
            "totalFee": 0,
            "timestamp": 1667978011900,
            "visibleQuantity": 0,
            "reduceOnly": true,
            "activatedPrice": 0,
            "triggered": false,
            "activated": false,
            "maker": false,
            "isTriggered": false,
            "isMaker": false,
            "isActivated": false,
            "rootAlgoStatus": "NEW",
            "algoStatus": "NEW"
        }
    ]
}

position push

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y position
{
    "id": "clientID5",
    "topic": "position",
    "event": "subscribe"
}

Response

{
    "id": "clientID5",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
    "topic": "position",
    "ts": 1677814655101,
    "data":
    {
        "positions":
        {
            "PERP_BTC_USDT":
            {
                "holding": 0.0,
                "pendingLongQty": 0.00020,
                "pendingShortQty": 0.0,
                "averageOpenPrice": 0.0,
                "pnl24H": -1.55902,
                "fee24H": 0.21800043,
                "settlePrice": 0.0,
                "markPrice": 22325.47533333,
                "version": 93454,
                "openingTime": 0,
                "pnl24HPercentage": -0.00542227
                "adlQuantile": 1
            }
        }
    }
}

marginassignment

Parameters

Name Type Required Description
id string Y id generate by client
event string Y subscribe/unsubscribe
topic string Y marginassignment
{
    "id": "clientID3",
    "topic": "marginassignment",
    "event": "subscribe"
}

Response

{
    "id": "clientID3",
    "event": "subscribe",
    "success": true,
    "ts": 1609924478533
}

Subscribed Message

{
     "topic": "marginassignment",
     "ts": 1677814655102,
     "data":{
         "margin": [
             {   
                 "token": "USDT",
                 "qty": 35.41628771
             },
             {
                 "token": "WOO",
                 "qty": 83.62,
             },
             ...
         ],
         "orders": [
             {
                 "id": 5306374839,
                 "symbol": "PERP_NEAR_USDT",
                 "price": 1.7,
                 "type": "LIQUIDATE_BLP",
                 "status": "FILLED",
                 "referencePrice": 1.7,
                 "quantity": 7.0,
                 "side": "BUY",
                 "executedQuantity": 7.0,
                 "executedAmount": 11.9,
                 "visibleQty": 7.0,
                 "feeAsset": "USDT",
                 "fee": 0
            },
            ...
         ]
    }
}

Convert Endpoints

Get Exchange Quote Info

Limit: 6 requests per 60 seconds per IP address

GET /v3/convert/exchangeInfo

Response

{
    "success": true,
    "rows": [
        {
            "fromAsset": "ETH",
            "toAsset": "BTC",
            "fromAssetMin": 1,
            "fromAssetMax": 100,
            "toAssetMin": 0.1,
            "toAssetMax": 10,
            "createdTime": "1575014248.99", // Unix epoch time in seconds
            "updatedTime": "1575014248.99"  // Unix epoch time in seconds
        },
        {
            "fromAsset": "BTC",
            "toAsset": "ETH",
            "fromAssetMin": 0.1,
            "fromAssetMax": 10,
            "toAssetMin": 1,
            "toAssetMax": 100,
            "createdTime": "1575014248.99", // Unix epoch time in seconds
            "updatedTime": "1575014248.99"  // Unix epoch time in seconds
        }
    ]
}

Parameters

Name Type Required Description
None

Get Quote Asset Info

Limit: 6 requests per 60 seconds per IP address

GET /v3/convert/assetInfo

Response

{
    "success": true,
    "rows": [
        {
            "token": "BTC",
            "tick": 0.0001,
            "createdTime": "1575014248.99", // Unix epoch time in seconds
            "updatedTime": "1575014248.99"  // Unix epoch time in seconds
        }, 
        {
            "token": "ETH",
            "tick": 0.001,
            "createdTime": "1575014248.99", // Unix epoch time in seconds
            "updatedTime": "1575014248.99"  // Unix epoch time in seconds
        }
    ]
}

Parameters

Name Type Required Description
None

Get Quote RFQ

Limit: 10 requests per 60 seconds per IP address

GET /v3/convert/rfq

Response

{
    "success": true,
    "data": {
        "quoteId": 123123123,
        "counterPartyId": "",
        "sellToken": "ETH",
        "sellQuantity": "0.0445",
        "buyToken": "USDT",
        "buyQuantity": "33.45",
        "buyPrice": "6.77",
        "expireTimestamp": 1659084466000,
        "message": 1659084466000
    }
}

Parameters

Name Type Required Description
sellToken String false token want to sell
sellQuantity String either The amount of sellToken (in sellToken base units) you want to send e.g “0.001”, “1.2“, “1.005“
buyToken String false token you will receive
buyQuantity String either The amount of sellToken (in sellToken base units) you will receive
validTime Number true quote valid time in seconds; ranges from 5 to 30; default: 10
counterPartyId String true counter-party Id; for brokers, this is to identify the actual user

Send Quote RFT

Limit: 10 requests per 60 seconds per IP address

POST /v3/convert/rft

Response

// Success
{
    "success": true,
    "data": {
        "quoteId": 123123123,
        "counterPartyId": "",
        "rftAccepted": 1 // 1 -> success; 2 -> processing; 3 -> fail
    }
}
// Failure
{
    "success": false,
    "message": "INTERNAL_ERROR" .
    "data": null
}

Parameters

Name Type Required Description
quoteId Long false quote_id

Get Quote Trade

Limit: 6 requests per 60 seconds per IP address

GET /v3/convert/trade

Response

// Success
{
    "success": true,
    "data": {
        "quoteId": 12,
        "buyAsset": "",
        "sellAsset": "",
        "buyAmount": 12.11,
        "sellAmount": 12.11,
        "tradeStatus": 12,
        "createdTime": ""
    }
}
// Failure
{
    "success": false,
    "message": "INTERNAL_ERROR" .
    "data": null
}

Parameters

Name Type Required Description
quoteId Long false quote_id

Get Quote Trades

Limit: 6 requests per 60 seconds per IP address

GET /v3/convert/trades

Response

// Success
{
    "success": true,
    "data": {
        "count": 12,
        "tradeVos":[
            {
                "quoteId": 12,
                "buyAsset": "",
                "sellAsset": "",
                "buyAmount": 12.11,
                "sellAmount": 12.11,
                "tradeStatus": 12,
                "createdTime": ""
            }
            ...
        ]
    }
}
// Failure
{
    "success": false,
    "message": "INTERNAL_ERROR" .
    "data": null
}

Parameters

Name Type Required Description
quoteId Long false quote_id
page Integer false
size Integer false
startTime Long false Millis
endTime Long false Millis

Release Note

All the API changes would be listed here.

2024-02-21

2024-01-30

2024-01-10

2023-12-12

2023-10-30

2023-09-25

2023-07-24

2023-07-03

2023-06-12

2023-04-10

2023-02-06

2022-12-05

2022-11-21

2022-10-24

2022-09-08

2022-08-18

2022-07-28

2022-06-10

2022-05-23

2022-03-21

2022-02-25

2022-01-17

2021-12-24

2021-11-12

2021-10-22

2021-09-27

2021-09-06

2021-09-03

2021-08-06

2021-07-09

2021-06-25

User could cancel order by the user-specified client_order_id.

User could get all the trades by order_id.