API Document
English
简体中文English

Access instructions

interface request base address:

--

Request description:

  • ● POST requests are required for signature authentication. Please read the signature authentication carefully for signature authentication.

  • ● The host in the request header must be the domain name xxx when sending the request.

  • ● The Content-Type in the POST request header must be application/json;charset=UTF-8.

  • ● POST request parameters must be JSON, other parameter servers will not receive.

  • ● In all requests, the parameter accessKey is required. If this value is not passed, the service directly returns an error. If the request mode is GET, this value requires url encoding, POST does not.

  • ● All methods that require signature verification need to pass the timestamp parameter for time judgment in milliseconds. If the current time exceeds 5 seconds, the link will be rejected.

  • ● All request parameters are parameter encapsulated according to the API description.

  • ● The API request that encapsulates the parameters is submitted to the server via POST or GET.

  • ● The website processes the request and returns the corresponding JSON formatted result.

  • ● For the error message that appears, please refer to the error code.

  • ● Please use https request.

  • ● Limit the frequency (the market interface is 1 second, the trading interface is 30 times 1 second).

  • ● The interface call method in the request example, please download the  apiUtils-1.0-SNAPSHOT.jar  under the demo in the Code and use it.

Response parameter description:

Parameter name Type Description
status string Return status code (success, failure) success is the request success, failure is the request failure
message string Return error code (reference error code)
data Object Specific interface returns data

Symbol rule: base currency + pricing currency. For example, BTC/USDT, symbol is btcusdt; ETH/BTC, symbol is ethbtc. Please know!

All of the following data about the request parameters and response examples are for testing purposes and are for reference only!

Signature Authentication

Safety Certification

For the current apikey application and modification, please perform related operations on the 'Personal Center - API Management' page. AccessKey is the API access key, and SecretKey is the key for the user to sign the request (visible only when applying).

● Important: These two keys are closely related to account security and should not be disclosed to others at any time.

legal request structure

For security reasons, transaction-related API requests must be signed. A legitimate request consists of the following:

● Method request address The access server address: https://xxx/v1 is followed by the method name, such as https://xxx/v1/order/saveEntrust.

● API access key (accessKey) The AccessKey in the APIKEY you requested, this parameter must be added to each api interface.

● Required and optional parameters Each method has a set of required and optional parameters for defining API calls. These parameters and their meanings can be viewed in the description of each method.

● When signing a secret, use a hash-based protocol and use the HmacSHA256 algorithm for calculation and verification.

● Signature The value calculated by the signature to ensure that the signature is valid and has not been tampered with.

Signature operation

The API request is very likely to be tampered with during the process of sending over the Internet. To ensure that the request has not been changed, we will ask the user to include a signature in the method request (whether or not each method requires a signature). Check if the parameter or parameter value has changed during transmission.

Signature calculation:

Note: When performing signature calculation, HMACSHA256 is used for signature encryption by default. If other encryption algorithms are used, the api cannot interpret the request data. Therefore, before the signature calculation, please normalize the request.

Example:

POST  /v1/order/saveEntrust order

● Note: In the https request path, the original request parameter value does not need to be sorted and passed the value. Only the encrypted parameters need to be sorted, please know.

1.The path address is  --/order/saveEntrust,The parameters are count, matchType, payPwd, price, symbol, type, timestamp, accessKey. The accessKey is mandatory. This parameter must be added to each api interface. If the parameter does not need to be checked, the signature parameter may not be passed.

2.POST requested interface, parameters are passed in json mode. Lifting chestnuts: the following singles need to be checked.

https://xxx/v1/order/saveEntrust

JSONObject jsonObject = new JSONObject();

jsonObject.put("count",count);

...

jsonObject.put("accessKey",accessKey);

3.Sort the parameter names to be encrypted in the order of ASCII code. The original parameter format is:

{"symbol":"ETHBTC","accessKey":*******,"matchType":"MARKET","price":1,"count":1,"payPwd":****,"type":"BUY","timestamp":"1566963399019"}

4.The order after sorting is:

String signString = Sign.jsonToString(jsonObject.toJSONString());

signString = accessKey=*****&count=1&matchType=MARKET&payPwd=****&price=1&symbol=ETHBTC×tamp=1566963399019&type=BUY

5.Encrypt the sorted parameters to get the signature, use sha256_HMAC to encrypt the signature, convert the encrypted byte array to base64 and convert it to string, and add the signature to json:

String signature = Sign.sha256_HMAC(signString, SECRET_KEY);

jsonObject.put("signature",signature);

6.The final parameter json is:

{"symbol":"ETHBTC","accessKey":*****,"signature":*****,"matchType":"MARKET","price":1,"count":1,"payPwd":****,"type":"BUY","timestamp":"1566963399019"}

/POST request parameter must be json, other parameter API will not receive, json parameter encryption is the same as GET encryption. After encryption is completed, add signature in json: encrypted ciphertext parameter!

Basic

Currency information

GET  /coin/enabled

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management

● Response parameter:

data:[currency name]

Request example

const axios = require('axios');

axios.get('/coin/enabled', {

params: {

accessKey: 'accessKey'

}

}).then(function (response) {

console.log(response);

});

String method = "/coin/enabled";

String param = "accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY);

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/coin/enabled'

params = {}

params['accessKey'] = 'ACCESSKEY'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Exchange rate conversion

GET  /coin/exchange

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
shortName true string CNY USD: US Dollar KRW: Korean Won JPY: Japanese Yen VND: Vietnamese Dong
accessKey true string ACCESS_KEY applied for in API Management

● Response parameter:

'BTC':'68191.28' indicates that the price of BTC is 68191.28

Request example

const axios = require('axios');

axios.get('/coin/exchange', {

params: {

accessKey: 'accessKey',

shortName: 'CNY'

}

}).then(function (response) {

console.log(response);

});

String method = "/coin/exchange";

String param = "shortName=" + shortName + "&accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY);

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/coin/exchange'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['shortName'] = 'shortName'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Announcement List

GET  /cms/bulletin

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
language true string Language Type Chinese Simplified: zh_cn English: en_US
accessKey true string ACCESS_KEY applied for in API Management
pageNum true number current page number
pageSize true number Current page number

● Response parameter:

Parameter name Type Description
pageNum number current page
pageSize number current page number
total number total number
pages number total pages
id number primary key
title string Title
keyword string keyword
showClientId number
isRoll string
newsTypeId number
content string content
createTime string create time
updateTime string modification time
creator string
modifier string
version number
language string language
templateId number

Request example

const axios = require('axios');

axios.get('/cms/bulletin', {

params: {

accessKey: 'accessKey',

language: 'zh_cn',

pageNum: '1',

pageSize: '10'

}

}).then(function (response) {

console.log(response);

});

String method = "/cms/bulletin";

String param = "accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY) + "&language=" + request.getLanguage() +"&pageNum=" + request.getPageNum() + "&pageSize=" + request.getPageSize();

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/cms/bulletin'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['language'] = 'language'

params['pageNum'] = 'pageNum'

params['pageSize'] = 'pageSize'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Market

All trading pairs unit and decimal exchange rate conversion

GET  /market/tradeInfo

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management

● Response parameter:

Parameter name Type Description
symbol string transaction pair name
baseCurrency string base currency
quoteCurrency string counting currency
pricePrecision number price decimal place
countPrescision number number of decimal places

Request example

const axios = require('axios');

axios.get('/market/tradeInfo', {

params: {

accessKey: 'accessKey'

}

}).then(function (response) {

console.log(response);

});

String method = "/market/tradeInfo";

String param = "accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY);

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/market/tradeInfo'

params = {}

params['accessKey'] = 'ACCESSKEY'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Information for all trading pairs

GET  /market/tickers

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management

● Response parameter:

Parameter name Type Description
tradeName string trading pair name
buy number buy one price
sell number sell one price
high number highest price
low number lowest price
last number latest price
open number opening price
chg number Change
vol24hour number 24hrs volume

Request example

const axios = require('axios');

axios.get('/market/tickers', {

params: {

accessKey: 'accessKey'

}

}).then(function (response) {

console.log(response);

});

String method = "/market/tickers";

String param = "accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY);

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/market/tickers'

params = {}

params['accessKey'] = 'ACCESSKEY'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Specify the information for the trading pair

GET  /market/ticker

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
symbol true string Trading pair name(BTCUSDT,ETHUSDT)
accessKey true string ACCESS_KEY applied for in API Management

● Response parameter:

Parameter name Type Description
tradeName string trading pair name
buy number buy one price
sell number sell one price
high number highest price
low number lowest price
last number latest price
open number opening price
chg number Change
vol24hour number 24hrs volume

Request example

const axios = require('axios');

axios.get('/market/ticker', {

params: {

accessKey: 'accessKey',

symbol: 'BTCUSDT'

}

}).then(function (response) {

console.log(response);

});

String method = "/market/ticker";

String param = "symbol=" + symbol + "&accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY);

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/market/ticker'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['symbol'] = 'symbol'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Specify trading pair depth data

GET  /market/depth

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
symbol true string Trading pair identification(BTCUSDT,ETHUSDT...)
step true string Depth file(STEP0=0-99,STEP1=0-19,STEP2=20-39,STEP3=40-59,STEP4=60-79,STEP5=80-99)

● Response parameter:

Parameter name Type Description
buy array[object] buy-depth data collection
price number buy-price
amount number buy-quantity
sell array[object] sell-depth data collection
price number sell-price
amount number sell-quantity

Request example

const axios = require('axios');

axios.get('/market/depth', {

params: {

accessKey: 'accessKey',

symbol: 'BTCUSDT',

step: 'STEP1'

}

}).then(function (response) {

console.log(response);

});

String method = "/market/depth";

String param = "symbol=" + symbol + "&step=" + step + "&accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY);

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/market/depth'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['symbol'] = 'symbol'

params['step'] = 'step'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Specify historical transaction data for the trading pair

GET  /market/trade

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
symbol true string Trading pair name(BTCUSDT,ETHUSDT)

● Response parameter:

Parameter name Type Description
price number transaction price
amount number number of transactions
direction string transaction direction(BUY,SELL)
time number timestamp

Request example

const axios = require('axios');

axios.get('/market/trade', {

params: {

accessKey: 'accessKey',

symbol: 'BTCUSDT'

}

}).then(function (response) {

console.log(response);

});

String method = "/market/trade";

String param = "symbol=" + symbol + "&accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY);

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/market/trade'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['symbol'] = 'symbol'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Specify the K-line data of the trading pair

GET  /market/kline

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
symbol true string Trading pair identification(BTCUSDT,ETHUSDT...)
klineType true string Cycle identifier(min,min5,min15,min30,hour1,hour4,day,week)
klineStep true string Length (step0 50, STEP1 100, STEP2 150, STEP3 200, STEP4 250, STEP5 300)

● Response parameter:

data:[ [highest price, opening price, lowest price, closing price, volume, time stamp] ]

Request example

const axios = require('axios');

axios.get('/market/kline', {

params: {

accessKey: 'accessKey',

symbol: 'BTCUSDT',

klineType: 'min15',

klineStep: 'STEP1'

}

}).then(function (response) {

console.log(response);

});

String method = "/market/kline";

String param = "symbol=" + klineRequest.getSymbol() + "&klineType=" + klineRequest.getKlineType() + "&klineStep=" + klineRequest.getKlineStep()+ "&accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY);

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/market/kline'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['klineStep'] = 'klineStep'

params['klineType'] = 'klineType'

params['symbol'] = 'symbol'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

transaction

Query unfilled order

GET  /order/current

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
currentPage false number 1 current page number
pageSize false number 100 Up to 200, can be customized within 200
symbol false string Trading pair symbol
type false string BUY:Buy SELL:Sell

● Response parameter:

Parameter name Type Description
id string order ID
status string Status (NO-TRADE: Unfilled SOME-TRADE: Partial Transaction COMPLE-TRADE: Transaction WITHDRAWN: Cancelled)
type string Policy type (BUY: buy SELL: sell order)
matchType string LIMIT:limit order MARKET:market order
price number order price
count number number of orders
amount number total order price
leftCount number remaining quantity
completeCount number Complete Quantity
completePrice number averaged price
completeAmount number Total amount of transactions
symbol string Trading pair symbol

Request example

const axios = require('axios');

axios.get('/order/current', {

params: {

accessKey: 'accessKey',

symbol: 'BTCUSDT',

type: 'BUY',

currentPage: 1,

pageSize: 100

}

}).then(function (response) {

console.log(response);

});

String method = "/order/current";

StringBuffer stringBuffer = new StringBuffer();

stringBuffer.append("accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY.trim()));

if (null != symbol && !"".equals(symbol)) {

stringBuffer.append("&symbol=" + symbol);

}

if (null != type && !"".equals(type)) {

stringBuffer.append("&type=" + type);

}

if(null != currentPage && !"".equals(currentPage)) {

stringBuffer.append("&currentPage=" + currentPage);

}

if (null != pageSize && !"".equals(pageSize)) {

stringBuffer.append("&pageSize=" + pageSize);

}

String returnJson = ExchApiUtil.sendGet(method, stringBuffer.toString());

method = '/order/current'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['symbol'] = 'symbol'

params['type'] = 'type'

params['currentPage'] = 1

params['pageSize'] = 100

params['timestamp'] = 'timestamp'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

User Asset Query

GET  /personal/getUserFinanceList

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
selectType true string all all:query all user assets noall: query user non-zero assets

● Response parameter:

Parameter name Type Description
coinName string currency name
total string available balance
frozen string freeze balance
financing string financial balance

Request example

const axios = require('axios');

axios.get('/personal/getUserFinanceList', {

params: {

accessKey: 'accessKey',

selectType: 'all'

}

}).then(function (response) {

console.log(response);

});

String method = "/personal/getUserFinanceList";

String param = "selectType=" + selectType + "&accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY);

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/personal/getUserFinanceList'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['selectType'] = 'selectType'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Order

POST  /order/saveEntrust

● Is it necessary to check: Y

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
count true number number of orders
matchType true string LIMIT:Limit Order MARKET:Market Order
payPwd true string transaction password
price false number commission price (market order can be empty)
source false string Source API
symbol true string Trading pairsymbol
type true string BUY:Buy SELL:Sell
clientOrderId false string Client requests order id

● Response parameter:

Parameter name Type Description
data number comment ID

Request example

const axios = require('axios');

axios.post('/order/saveEntrust', {

accessKey: 'accessKey',

count: 2,

matchType: 'LIMIT',

payPwd: '666666',

price: 16,

source: 'web',

symbol: 'BTCUSDT',

type: 'BUY'

clientOrderId: '88888888'

}).then(function (response) {

console.log(response);

});

JSONObject jsonObject = new JSONObject();

String method = "/order/saveEntrust";

jsonObject.put("count", entrustRequest.getCount());

jsonObject.put("matchType", entrustRequest.getMatchType());

jsonObject.put("payPwd", entrustRequest.getPayPwd());

if (null != entrustRequest.getPrice() && !"".equals(entrustRequest.getPrice())) {

jsonObject.put("price", entrustRequest.getPrice());

}

jsonObject.put("symbol", entrustRequest.getSymbol());

jsonObject.put("type", entrustRequest.getType());

jsonObject.put("clientOrderId", entrustRequest.getClientOrderId());

jsonObject.put("timestamp", System.currentTimeMillis() + "");

jsonObject.put("accessKey", ConstantKey.ACCESS_KEY);

String json = ExchApiUtil.getJsonPost(jsonObject, method, ConstantKey.SECRET_KEY);

method = '/order/saveEntrust'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['count'] = 'count'

params['matchType'] = 'matchType'

params['payPwd'] = 'payPwd'

params['price'] = 'price'

params['symbol'] = 'symbol'

params['type'] = 'type'

params['clientOrderId'] = 'clientOrderId'

params['timestamp'] = 'timestamp'

headers = {"content-type": "application/json;charset=UTF-8"}

params["signature"] = self.get_sign(params).decode("utf-8")

rsp = requests.post(method,data=json.dumps(params),headers=headers)

Response example

JSON

// return results


                            

Cancel an order based on the order id

POST  /order/cancelEntrust

● Is it necessary to check: Y

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
id true number Order ID

● Response parameter:

status :success is successful, others are failed

Request example

const axios = require('axios');

axios.post('/order/cancelEntrust', {

accessKey: 'accessKey',

id: '6666666666666666'

}).then(function (response) {

console.log(response);

});

JSONObject jsonObject = new JSONObject();

String method = "/order/cancelEntrust";

jsonObject.put("id", id);

jsonObject.put("timestamp", System.currentTimeMillis() + "");

jsonObject.put("accessKey", ConstantKey.ACCESS_KEY.trim());

String json = ExchApiUtil.getJsonPost(jsonObject, method, ConstantKey.SECRET_KEY);

method = '/order/cancelEntrust'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['id'] = 'id'

params['timestamp'] = 'timestamp'

params['signature'] = self.get_sign(params).decode('utf-8')

headers = {"content-type": "application/json;charset=UTF-8"}

rsp = requests.post(method, data=json.dumps(params),headers=headers)

Response example

JSON

// return results


                            

Batch cancellation by order ID

POST  /order/batchCancel

● Is it necessary to check: Y

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
ids true List No more than 50 order ids in a single order

● Response parameter:

status :success is successful, others are failed

Request example

const axios = require('axios');

axios.post('/order/batchCancel', {

accessKey: 'accessKey',

ids: ids

}).then(function (response) {

console.log(response);

});

JSONObject jsonObject = new JSONObject();

String method = "/order/batchCancel";

jsonObject.put("ids", ids);

jsonObject.put("timestamp", System.currentTimeMillis() + "");

jsonObject.put("accessKey", ConstantKey.ACCESS_KEY.trim());

String json = ExchApiUtil.getJsonPost(jsonObject, method, ConstantKey.SECRET_KEY);

method = '/order/batchCancel'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['ids'] = 'ids'

params['timestamp'] = 'timestamp'

params['signature'] = self.get_sign(params).decode('utf-8')

headers = {"content-type": "application/json;charset=UTF-8"}

rsp = requests.post(method,data=json.dumps(params),headers=headers)

Response example

JSON

// return results


                            

Batch cancellation by condition

POST  /order/batchCancelOpenOrders

● Is it necessary to check: Y

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
symbol false string Trading pair symbol
type false string BUY:Buy SELL:Sell

● Response parameter:

status :success is successful, others are failed

Request example

const axios = require('axios');

axios.post('/order/batchCancelOpenOrders', {

accessKey: 'accessKey',

symbol: 'BTCUSDT',

type: 'SELL'

}).then(function (response) {

console.log(response);

});

JSONObject jsonObject = new JSONObject();

String method = "/order/batchCancelOpenOrders";

if (null != batchCancelRequest.getSymbol() && !"".equals(batchCancelRequest.getSymbol())) {

jsonObject.put("symbol", batchCancelRequest.getSymbol());

}

if (null != batchCancelRequest.getType() && !"".equals(batchCancelRequest.getType())) {

jsonObject.put("type", batchCancelRequest.getType());

}

jsonObject.put("timestamp", System.currentTimeMillis() + "");

jsonObject.put("accessKey", ConstantKey.ACCESS_KEY.trim());

String json = ExchApiUtil.getJsonPost(jsonObject, method, ConstantKey.SECRET_KEY);

method = '/order/batchCancelOpenOrders'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['symbol'] = 'symbol'

params['type'] = 'type'

params['timestamp'] = 'timestamp'

params['signature'] = self.get_sign(params).decode('utf-8')

headers = {"content-type": "application/json;charset=UTF-8"}

rsp = requests.post(method,data=json.dumps(params),headers=headers)

Response example

JSON

// return results


                            

Query the order according to the ID

GET  /order/queryOrderById

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
orderId true number Order ID

● Response parameter:

Parameter name Type Description
id string Order ID
userId number user ID
tradeId number trading pair ID
buyCoinId number Buyer Currency ID
sellCoinId number Seller Currency ID
status string Status (NO-TRADE: Unfilled SOME-TRADE: Partial Transaction COMPLE-TRADE: Transaction WITHDRAWN: Cancelled)
type string Policy type (BUY: buy SELL: sell order)
matchType string LIMIT:limit order MARKET:market order
price number order price
count number number of orders
amount number order amount
leftCount number remaining quantity
completeCount number number of transactions
completePrice number Average Price
completeAmount number transaction amount
source string source
createTime string create time
fees number fee
version number version number
symbol string Trading pair symbol

Request example

const axios = require('axios');

axios.get('/order/queryOrderById', {

params: {

accessKey: 'accessKey',

orderId: 6666666666666

}

}).then(function (response) {

console.log(response);

});

String method = "/order/queryOrderById";

String param = "orderId=" + orderId + "&accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY);

String returnJson = ExchApiUtil.sendGet(method, param);

method = '/order/queryOrderById'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['orderId'] = 'orderId'

params['timestamp'] = 'timestamp'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

User's current unfilled order inquiry

GET  /order/openOrders

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
symbol false string Trading pair symbol
type false string BUY:Buy SELL:Sell

● Response parameter:

Parameter name Type Description
id string order ID
userId number user ID
tradeId number transaction pair ID
buyCoinId number Buyer Currency ID
sellCoinId number Seller Currency ID
status string Status (NO-TRADE: Unfilled SOME-TRADE: Partial Transaction COMPLE-TRADE: Transaction WITHDRAWN: Cancelled)
type string Policy type (BUY: buy SELL: sell order)
matchType string LIMIT:limit order MARKET:market order
price number order price
count number number of orders
amount number total order price
leftCount number remaining quantity
completeCount number Complete Quantity
completePrice number averaged price
completeAmount number Total amount of transactions
source string source
createTime string create time
fees number fee
version number version number
symbol string Trading pair symbol
clientOrderId string Client request id

Request example

const axios = require('axios');

axios.get('/order/openOrders', {

params: {

accessKey: 'accessKey',

symbol: 'BTCUSDT',

type: 'BUY'

}

}).then(function (response) {

console.log(response);

});

String method = "/order/openOrders";

StringBuffer stringBuffer = new StringBuffer();

stringBuffer.append("accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY.trim()));

if (null != symbol && !"".equals(symbol)) {

stringBuffer.append("&symbol=" + symbol);

}

if (null != type && !"".equals(type)) {

stringBuffer.append("&type=" + type);

}

String returnJson = ExchApiUtil.sendGet(method, stringBuffer.toString());

method = '/order/openOrders'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['symbol'] = 'symbol'

params['type'] = 'type'

params['timestamp'] = 'timestamp'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

My order inquiry

GET  /order/queryMyEntrust

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
symbol false string Trading pair symbol
matchType false string LIMIT:Limit Order MARKET:Market Order
type false string BUY:Buy SELL:Sell
startTime false string Query start date, date format yyyy-MM-dd HH:mm:ss
endTime false string Query end date, date format yyyy-MM-dd HH:mm:ss
currentPage false number 1 current page number
pageSize false number 10 How many pieces are displayed per page

● Response parameter:

Parameter name Type Description
id string order ID
userId number user ID
tradeId number trading pair ID
buyCoinId number Buyer Currency ID
sellCoinId number Seller Currency ID
status string Status (NO-TRADE: Unfilled SOME-TRADE: Partial Transaction COMPLE-TRADE: Transaction WITHDRAWN: Cancelled)
type string Policy type (BUY: buy order SELL: sell order)
matchType string LIMIT: limit order MARKET: market order
price number order price
count number number of orders
amount number total order price
leftCount number remaining quantity
completeCount number Complete Quantity
completePrice number averaged price
completeAmount number Total amount of transactions
createTime string create time
fees number fee
version number version number
symbol string Trading symbol
pageNum number current page
pageSize number current page number
total number total number
pages number total pages

Request example

const axios = require('axios');

axios.get('/order/queryMyEntrust', {

params: {

accessKey: 'accessKey',

symbol: 'BTCUSDT',

matchType: 'LIMIT',

type: 'BUY'

}

}).then(function (response) {

console.log(response);

});

StringBuffer stringBuffer = new StringBuffer();

String method = "/order/queryMyEntrust";

stringBuffer.append("accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY.trim()));

if (myEntrustRequest.getType() != null && !"".equals(myEntrustRequest.getType())) {

stringBuffer.append("&type=" + myEntrustRequest.getType());

}

if (myEntrustRequest.getSymbol() != null && !"".equals(myEntrustRequest.getSymbol())) {

stringBuffer.append("&symbol=" + myEntrustRequest.getSymbol());

}

if (myEntrustRequest.getMatchType() != null && !"".equals(myEntrustRequest.getMatchType())) {

stringBuffer.append("&type=" + myEntrustRequest.getType());

}

if (myEntrustRequest.getStartTime() != null && !"".equals(myEntrustRequest.getStartTime())) {

stringBuffer.append("&startTime=" + myEntrustRequest.getStartTime());

}

if (myEntrustRequest.getEndTime() != null && !"".equals(myEntrustRequest.getEndTime())) {

stringBuffer.append("&endTime=" + myEntrustRequest.getEndTime());

}

if (myEntrustRequest.getCurrentPage() != null && !"".equals(myEntrustRequest.getCurrentPage())) {

stringBuffer.append("&currentPage=" + myEntrustRequest.getCurrentPage());

}

if (myEntrustRequest.getPageSize() != null && !"".equals(myEntrustRequest.getPageSize())) {

stringBuffer.append("&pageSize=" + myEntrustRequest.getPageSize());

}

String returnJson = ExchApiUtil.sendGet(method, stringBuffer.toString());

method = '/order/queryMyEntrust'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['symbol'] = 'symbol'

params['type'] = 'type'

params['startTime'] = 'startTime'

params['endTime'] = 'endTime'

params['currentPage'] = 'currentPage'

params['pageSize'] = 'pageSize'

params['matchType'] = 'matchType'

params['timestamp'] = 'timestamp'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

My historical order query

GET  /order/queryMyHisEntrust

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
symbol false string Trading pair symbol
matchType false string LIMIT: limit order MARKET: market order
type false string BUY: Buy SELL: Sell
startTime false string Query start date, date format yyyy-MM-dd HH:mm:ss
endTime false string Query end date, date format yyyy-MM-dd HH:mm:ss
status false string COMPLE-TRADE: Complete Transaction WITHDRAWN: Cancelled
currentPage false number 1 current page number
pageSize false number 10 How many pieces are displayed per page

● Response parameter:

Parameter name Type Description
id string order ID
userId number user ID
tradeId number trading pair ID
buyCoinId number Buyer Currency ID
sellCoinId number Seller Currency ID
status string Status (NO-TRADE: Unfilled SOME-TRADE: Partial Transaction COMPLE-TRADE: Transaction WITHDRAWN: Cancelled)
type string Policy type (BUY: buy order SELL: sell order)
matchType string LIMIT: limit order MARKET: market order
price number order price
count number number of orders
amount number total order price
leftCount number remaining quantity
completeCount number Complete Quantity
completePrice number averaged price
completeAmount number Total amount of transactions
createTime string create time
fees number fee
version number version number
symbol string Trading pair symbol
pageNum number current page
pageSize number current page number
total number total number
pages number total pages

Request example

const axios = require('axios');

axios.get('/order/queryMyHisEntrust', {

params: {

accessKey: 'accessKey',

symbol: 'BTCUSDT',

matchType: 'LIMIT',

type: 'BUY'

}

}).then(function (response) {

console.log(response);

});

StringBuffer stringBuffer = new StringBuffer();

String method = "/order/queryMyHisEntrust";

stringBuffer.append("accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY.trim()));

if (myHisEntrustRequest.getType() != null && !"".equals(myHisEntrustRequest.getType())) {

stringBuffer.append("&type=" + myHisEntrustRequest.getType());

}

if (myHisEntrustRequest.getSymbol() != null && !"".equals(myHisEntrustRequest.getSymbol())) {

stringBuffer.append("&symbol=" + myHisEntrustRequest.getSymbol());

}

if (myHisEntrustRequest.getMatchType() != null && !"".equals(myHisEntrustRequest.getMatchType())) {

stringBuffer.append("&type=" + myHisEntrustRequest.getType());

}

if (myHisEntrustRequest.getStartTime() != null && !"".equals(myHisEntrustRequest.getStartTime())) {

stringBuffer.append("&startTime=" + myHisEntrustRequest.getStartTime());

}

if (myHisEntrustRequest.getEndTime() != null && !"".equals(myHisEntrustRequest.getEndTime())) {

stringBuffer.append("&endTime=" + myHisEntrustRequest.getEndTime());

}

if (myHisEntrustRequest.getCurrentPage() != null && !"".equals(myHisEntrustRequest.getCurrentPage())) {

stringBuffer.append("&currentPage=" + myHisEntrustRequest.getCurrentPage());

}

if (myHisEntrustRequest.getPageSize() != null && !"".equals(myHisEntrustRequest.getPageSize())) {

stringBuffer.append("&pageSize=" + myHisEntrustRequest.getPageSize());

}

if (myHisEntrustRequest.getStatus() != null && !"".equals(myHisEntrustRequest.getStatus())) {

stringBuffer.append("&status=" + myHisEntrustRequest.getStatus());

}

String returnJson = ExchApiUtil.sendGet(method, stringBuffer.toString());

method = '/order/queryMyHisEntrust'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['symbol'] = 'symbol'

params['type'] = 'type'

params['startTime'] = 'startTime'

params['endTime'] = 'endTime'

params['currentPage'] = 'currentPage'

params['pageSize'] = 'pageSize'

params['status'] = 'status'

params['timestamp'] = 'timestamp'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Transaction details

GET  /order/queryMyEntrustOrder

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
symbol false string Trading pair symbol
matchType false string LIMIT: limit order MARKET: market order
type false string BUY: Buy SELL: Sell
startTime false string Query start date, date format yyyy-MM-dd HH:mm:ss
endTime false string Query end date, date format yyyy-MM-dd HH:mm:ss
currentPage false number 1 current page number
pageSize false number 10 How many pieces are displayed per page

● Response parameter:

Parameter name Type Description
id number transaction detail ID
entrustId string order ID
type string Policy type (BUY: buy order SELL: sell order)
tradeId number trading pair ID
buyCoinId number Buyer Currency ID
sellCoinId number Seller Currency ID
symbol string Trading pair symbol
matchType string LIMIT: limit order MARKET: market order
price number transaction unit price
count number number of deals
amount number Total transactions
createTime string transaction time
fees number fee
pageNum number current page
pageSize number current page number
total number total number
pages number total pages

Request example

const axios = require('axios');

axios.get('/order/queryMyEntrustOrder', {

params: {

accessKey: 'accessKey',

symbol: 'BTCUSDT',

matchType: 'LIMIT',

type: 'BUY'

}

}).then(function (response) {

console.log(response);

});

StringBuffer stringBuffer = new StringBuffer();

String method = "/order/queryMyEntrustOrder";

stringBuffer.append("accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY.trim()));

if (myEntrustRequest.getType() != null && !"".equals(myEntrustRequest.getType())) {

stringBuffer.append("&type=" + myEntrustRequest.getType());

}

if (myEntrustRequest.getSymbol() != null && !"".equals(myEntrustRequest.getSymbol())) {

stringBuffer.append("&symbol=" + myEntrustRequest.getSymbol());

}

if (myEntrustRequest.getMatchType() != null && !"".equals(myEntrustRequest.getMatchType())) {

stringBuffer.append("&type=" + myEntrustRequest.getType());

}

if (myEntrustRequest.getStartTime() != null && !"".equals(myEntrustRequest.getStartTime())) {

stringBuffer.append("&startTime=" + myEntrustRequest.getStartTime());

}

if (myEntrustRequest.getEndTime() != null && !"".equals(myEntrustRequest.getEndTime())) {

stringBuffer.append("&endTime=" + myEntrustRequest.getEndTime());

}

if (myEntrustRequest.getCurrentPage() != null && !"".equals(myEntrustRequest.getCurrentPage())) {

stringBuffer.append("&currentPage=" + myEntrustRequest.getCurrentPage());

}

if (myEntrustRequest.getPageSize() != null && !"".equals(myEntrustRequest.getPageSize())) {

stringBuffer.append("&pageSize=" + myEntrustRequest.getPageSize());

}

String returnJson = ExchApiUtil.sendGet(method, stringBuffer.toString());

method = '/order/queryMyEntrustOrder'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['symbol'] = 'symbol'

params['type'] = 'type'

params['startTime'] = 'startTime'

params['endTime'] = 'endTime'

params['currentPage'] = 'currentPage'

params['pageSize'] = 'pageSize'

params['timestamp'] = 'timestamp'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Cancel an order based on client request id

POST  /order/cancelEntrustByClientOrderId

● Is it necessary to check: Y

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
secretKey true string SECRET_KEY applied in API management
clientOrderId true string Request order ID

● Response parameter:

status :success is successful, others are failed

Request example

const axios = require('axios');

axios.post('/order/cancelEntrustByClientOrderId', {

accessKey: 'accessKey',

secretKey: 'secretKey',

clientOrderId: '88888888',

}).then(function (response) {

console.log(response);

});

JSONObject jsonObject = new JSONObject();

String method = "/order/cancelEntrustByClientOrderId";

jsonObject.put("clientOrderId", clientOrderId);

jsonObject.put("timestamp", System.currentTimeMillis() + "");

jsonObject.put("accessKey", ConstantKey.ACCESS_KEY.trim());

String json = ExchApiUtil.getJsonPost(jsonObject, method, ConstantKey.SECRET_KEY);

method = '/order/cancelEntrustByClientOrderId'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['secretKey'] = 'secretKey'

params['clientOrderId'] = 'clientOrderId'

params['timestamp'] = 'timestamp'

rsp = requests.post(method,params)

Response example

JSON

// return results


                            

Batch cancellation of orders based on client request id

POST  /order/batchCancelByClientOrderIds

● Is it necessary to check: Y

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
secretKey true string SECRET_KEY applied in API management
clientOrderIds true List Request order IDs

● Response parameter:

status :success is successful, others are failed

Request example

const axios = require('axios');

axios.post('/order/batchCancelByClientOrderIds', {

accessKey: 'accessKey',

secretKey: 'secretKey',

clientOrderIds: 'clientOrderIds',

}).then(function (response) {

console.log(response);

});

JSONObject jsonObject = new JSONObject();

String method = "/order/batchCancelByClientOrderIds";

jsonObject.put("clientOrderIds", clientOrderIds);

jsonObject.put("timestamp", System.currentTimeMillis() + "");

jsonObject.put("accessKey", ConstantKey.ACCESS_KEY.trim());

String json = ExchApiUtil.getJsonPost(jsonObject, method, ConstantKey.SECRET_KEY);

method = '/order/batchCancelByClientOrderIds'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['secretKey'] = 'secretKey'

params['clientOrderIds'] = 'clientOrderIds'

params['timestamp'] = 'timestamp'

rsp = requests.post(method,params)

Response example

JSON

// return results


                            

Socket transaction push

WebSocket  wss://gctapp.com

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management

● Response parameter:

Parameter name Type Description
count number number of transactions
dealTime number transaction time
entrustId string Order ID
oneselfDeal boolean Whether self-dealing
price number transaction price
symbol string trading pair name
type string Type: BUY: buy order SELL: sell order
userId number User ID

Request example

ws = new WebSocket(" wss://gctapp.com");

ws.send(JSON.stringify({

"accessKey": "**"

}));

public class EntrustClient extends WebSocketClient {

public EntrustClient(URI serverUri) {

super(serverUri);}

}

EntrustClient entrustClient = new EntrustClient(URI.create(" wss://gctapp.com"));

entrustClient.connect();

# -*- coding: utf-8 -*-

import json

import websocket

def on_message(self, message):

print(message)

def on_error(self, error):

print(error)

def on_close(self):

print("### closed ###")

def on_open(self):

ws.send(json.dumps({"accessKey": "fu7FOfjHnwJmURiP6LrhJpGxVjgcxR9YcGeKTPm8JT8="}))

if __name__ == "__main__":

try:

websocket.enableTrace(True)

ws = websocket.WebSocketApp("ws://192.168.2.65:8001/",

on_open=on_open,

on_message=on_message,

on_error=on_error,

on_close=on_close)

ws.run_forever()

except Exception as e:

print("ws 断开 或者psycopg2.OperationalError, {}: {}".format(type(e), e))

Response example

JSON

// return results


                            

Deposit and Withdrawal

Add new application for withdrawal

POST  /dw/addWithdraw

● Is it necessary to check: Y

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
coinName true string currency name(btc...)
withdrawAddress true string Withdrawal Address
payCode true string transaction password
amount true string Number of withdrawal
networkFees true string fee
remark false string Withdrawal label

● Response parameter:

status :success is successful, others are failed

Request example

const axios = require('axios');

axios.post('/dw/addWithdraw', {

accessKey: 'accessKey',

coinName: 'btc',

withdrawAddress: 'aaaaaaaaaaaaaaaaaaaaaa',

payCode: '666666',

amount: '168',

networkFees: '10',

remark: 'Withdrawal label'

}).then(function (response) {

console.log(response);

});

JSONObject jsonObject = new JSONObject();

String method = "/dw/addWithdraw";

jsonObject.put("coinName", withdrawRequest.getCoinName());

jsonObject.put("withdrawAddress", withdrawRequest.getWithdrawAddress());

jsonObject.put("payCode", withdrawRequest.getPayCode());

jsonObject.put("amount", withdrawRequest.getAmount());

jsonObject.put("networkFees", withdrawRequest.getNetworkFees());

jsonObject.put("remark", withdrawRequest.getRemark());

jsonObject.put("timestamp", System.currentTimeMillis() + "");

jsonObject.put("accessKey", ConstantKey.ACCESS_KEY.trim());

String json = ExchApiUtil.getJsonPost(jsonObject, method, ConstantKey.SECRET_KEY);

method = '/dw/addWithdraw'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['coinName'] = 'coinName'

params['withdrawAddress'] = 'withdrawAddress'

params['payCode'] = 'payCode'

params['amount'] = 'amount'

params['networkFees'] = 'networkFees'

params['remark'] = 'remark'

params['timestamp'] = 'timestamp'

params['signature'] = self.get_sign(params).decode('utf-8')

headers = {"content-type": "application/json;charset=UTF-8"}

rsp = requests.post(method,data=json.dumps(params),headers=headers)

Response example

JSON

// return results


                            

Cancel withdrawal

POST  /dw/cancelWithdraw

● Is it necessary to check: Y

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
id true number User withdrawal ID

● Response parameter:

status :success is successful, others are failed

Request example

const axios = require('axios');

axios.post('/dw/cancelWithdraw', {

accessKey: 'accessKey',

id: 168168168

}).then(function (response) {

console.log(response);

});

JSONObject jsonObject = new JSONObject();

String method = "/dw/cancelWithdraw";

jsonObject.put("id",id);

jsonObject.put("timestamp", System.currentTimeMillis() + "");

jsonObject.put("accessKey",ACCESS_KEY.trim());

String json = ExchApiUtil.getJsonPost(jsonObject, method, ConstantKey.SECRET_KEY);

method = '/dw/cancelWithdraw'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['id'] = 'id'

params['timestamp'] = 'timestamp'

params['signature'] = self.get_sign(params).decode('utf-8')

headers = {"content-type": "application/json;charset=UTF-8"}

rsp = requests.post(method,data=json.dumps(params),headers=headers)

Response example

JSON

// return results


                            

User deposit and withdrawal record query

GET  /dw/queryWithdrawRecording

● Is it necessary to check: N

● Request parameter

Parameter name Is it necessary Type Defaults Description
accessKey true string ACCESS_KEY applied for in API Management
coinName false string Trading pair symbol
type false string Transaction Type RECHARGE:Deposit WITHDRAW WITHDRAW:Withdrawal
startTime false string Query start date, date format yyyy-MM-dd HH:mm:ss
endTime false string Query end date, date format yyyy-MM-dd HH:mm:ss
currentPage false number 1 current page number
pageSize false number 10 How many pieces are displayed per page

● Response parameter:

Parameter name Type Description
id number deposit and withdrawal record ID
userId number user ID
coinId number currency ID
type string transaction type RECHARGE:deposit WITHDRAW:withdrawal
status string Status WAIT-WITHDRAW:Waiting for withdrawal LOCK:Lock WITHDRAW-SUCCESS:Cash withdrawal successful CANCEL:Cancel RECHARGING:Confirm RECHARGE-SUCCESS:Recharge successful AUDITED:Reviewed
amount string quantity
networkFees string fee
withdrawAddress string withdrawal address
rechargeAddress string deposit address
source string source
hash string transaction hash
successCount string successful confirmation number
confirmationCount string confirmation number
createTime string create time
updateTime string last modified time
coinName string currency name

Request example

const axios = require('axios');

axios.get('/dw/queryWithdrawRecording', {

params: {

accessKey: 'accessKey',

coinName: 'BTCUSDT',

type: 'RECHARGE'

}

}).then(function (response) {

console.log(response);

});

StringBuffer stringBuffer = new StringBuffer();

String method = "/dw/queryWithdrawRecording";

stringBuffer.append("accessKey=" + URLEncoder.encode(ConstantKey.ACCESS_KEY.trim()));

if (request.getType() != null && !"".equals(request.getType())) {

stringBuffer.append("&type=" + request.getType());

}

if (request.getCoinName() != null && !"".equals(request.getCoinName())) {

stringBuffer.append("&coinName=" + request.getCoinName());

}

if (request.getStartTime() != null && !"".equals(request.getStartTime())) {

stringBuffer.append("&startTime=" + request.getStartTime());

}

if (request.getEndTime() != null && !"".equals(request.getEndTime())) {

stringBuffer.append("&endTime=" + request.getEndTime());

}

if (request.getCurrentPage() != null && !"".equals(request.getCurrentPage())) {

stringBuffer.append("&currentPage=" + request.getCurrentPage());

}

if (request.getPageSize() != null && !"".equals(request.getPageSize())) {

stringBuffer.append("&pageSize=" + request.getPageSize());

}

String returnJson = ExchApiUtil.sendGet(method, stringBuffer.toString());

method = '/dw/queryWithdrawRecording'

params = {}

params['accessKey'] = 'ACCESSKEY'

params['coinName'] = 'coinName'

params['type'] = 'type'

params['startTime'] = 'startTime'

params['endTime'] = 'endTime'

params['currentPage'] = 'currentPage'

params['pageSize'] = 'pageSize'

params['timestamp'] = 'timestamp'

rsp = requests.get(method,params)

Response example

JSON

// return results


                            

Error code

Error message example


                            

[Public Area]

Error code Description
common_success Success!
common_failure Failed!
common_failure_0001 network exception
get_login_failure Failed to get licensor information
access_key_not_found The access key does not exist
inconsistent_parameters_and_signatures Parameters and signatures are inconsistent
access_key_not_found_or_ip_Incorrect accessKey does not exist or the ip address is incorrect
json_unresolved json cannot parse
signature_verification_failed Signature verification failed, signature could not be parsed
user_pay_is_error Transaction password error
disable_access Already prohibited access
ip_disable_access IP has been banned from access
access_IP_not_found The accessed IP does not exist
excessive_access Very too fast
access_failure Request failed

[Quote]

Error code Description
api_market_001 Invalid User Information
api_market_002 Invalid trading pair name
api_market_003 Invalid parameter
api_market_004 No data
api_market_005 Get failed

[Committee Internationalization Document]

Error code Description
entrust_failure_0001 network exception
entrust_failure_0002 Query type error
entrust_failure_0003 The match type cannot be empty
entrust_failure_0004 The merchant ID cannot be empty
entrust_failure_0005 User does not exist
entrust_failure_0007 Trading pair ID cannot be empty
entrust_failure_0009 Trading pair does not exist
entrust_failure_0010 The transaction password cannot be empty
entrust_failure_0011 transaction password error
entrust_failure_0012 The order type cannot be empty
entrust_failure_0013 The number of orders cannot be empty
entrust_failure_0014 The price of the limit order can not be empty
entrust_failure_0015 The single ID cannot be empty
entrust_failure_0016 The order does not exist
entrust_failure_0017 This order has been deleted
entrust_failure_0018 The order cannot be cancelled
entrust_failure_0019 The version number cannot be empty
entrust_failure_0020 The market order cannot be cancelled
entrust_failure_0021 Current data has been updated
entrust_failure_0022 There is no order at the moment, cannot be placed on the market order
entrust_failure_0023 The trading pair is disabled or the associated currency is disabled
entrust_failure_0024 The transaction pair is not open for trading
entrust_failure_0025 The entrusted price is below the minimum price or above the maximum price
entrust_failure_0026 The number of delegates is below the minimum or above the maximum limit
entrust_failure_0027 This account has been banned from trading, please contact customer service
entrust_failure_0028 Exceeded transaction pair purchaseable{}
entrust_failure_0029 The project is currently banned from selling
entrust_failure_0030 Exceeding the current trading pair highest rise{} in one day, can not place orders
entrust_failure_0031 Exceeding the current trading pair lowest drop{} in one day, can not place orders
entrust_failure_0032 The commission price is above the ceiling price
entrust_failure_0033 The number of commissions is above the maximum limit
entrust_failure_0034 The commission turnover is below the minimum
entrust_failure_0035 The commission turnover is higher than the maximum
entrust_failure_0036 Not ready, please try again later
entrust_failure_0037 Order client request ID cannot be duplicate
entrust_failure_0038 Order client request ID does not exist
entrust_failure_0039 Order client request ID cannot be empty

[Deposit and withdrawal management]

Error code Description
account_failure_0002 There are not enough assets available for the account to process
recharge_withdraw_failure_0001 network exception
recharge_withdraw_failure_0002 The transaction password cannot be empty
recharge_withdraw_failure_0003 The verification code cannot be empty
recharge_withdraw_failure_0004 The merchant ID cannot be empty
recharge_withdraw_failure_0005 User does not exist
recharge_withdraw_failure_0007 Currency does not exist
recharge_withdraw_failure_0010 Google verification code cannot be empty
recharge_withdraw_failure_0011 Transaction password error
recharge_withdraw_failure_0012 The recharge type cannot be empty
recharge_withdraw_failure_0013 The number of deposit cannot be empty
recharge_withdraw_failure_0014 The deposit note cannot be empty
recharge_withdraw_failure_0015 The deposit order does not exist
recharge_withdraw_failure_0017 Only waiting for deposit can be deleted
recharge_withdraw_failure_0018 Only waiting for deposit to review
recharge_withdraw_failure_0019 Only the approval can be issued to freeze
recharge_withdraw_failure_0020 The version number cannot be empty
recharge_withdraw_failure_0021 Parameter error
recharge_withdraw_failure_0022 Current data has been updated
recharge_withdraw_failure_0023 Data does not exist
recharge_withdraw_failure_0024 Only locked status can be audited
recharge_withdraw_failure_0025 Only waiting for the withdrawal status to lock
recharge_withdraw_failure_0026 Cancel only when waiting for withdrawal or lock status
recharge_withdraw_failure_0027 The number of freezes cannot be empty
recharge_withdraw_failure_0028 Freeze reason cannot be empty
recharge_withdraw_failure_0029 Unfreeze note cannot be empty
recharge_withdraw_failure_0030 The number of withdrawal cannot be empty
recharge_withdraw_failure_0031 The withdrawal address cannot be empty
recharge_withdraw_failure_0032 The fee cannot be empty
recharge_withdraw_failure_0033 fee exception
recharge_withdraw_failure_0034 Data does not exist
recharge_withdraw_failure_0035 This asset cannot be unfreeze
recharge_withdraw_failure_0036 The withdrawal address is incorrect
recharge_withdraw_failure_0037 The withdrawal note cannot be empty
recharge_withdraw_failure_0038 External withdrawal exception