Rest API
EXX provides APIs for fast access to its spot markets with the following features: Market data, Order book, Depths of bids and asks, Trade history, Trade execution, Order information, Order history, Account information.
In case of any problem, please contact our support team, please contact on [email protected]
Receive the latest EXX market data
| Interface | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
+- https://api.exx.com/data/v1/markets
All markets
Description //# Request
GET https://api.exx.com/data/v1/markets
//# Response
{
"eos_btc":{
"minAmount":"0.00010",
"amountScale":2,
"priceScale":6,
"maxLevels":0,
"isOpen":false
},
"etc_hsr":{
"minAmount":"0.001",
"amountScale":3,
"priceScale":3,
"maxLevels":0,
"isOpen":true
},
...
}
Returned Value Specification minAmount : Minimum transaction amount
amountScale : The decimal point of buyer's coin
priceScale : The decimal point of seller's coin
maxLevels : The maximum time of leverage, select 0 means not enable margin
isOpen : Whether open market
|
|||||||||||
+- https://api.exx.com/data/v1/tickers
All price
Description //# Request
GET https://api.exx.com/data/v1/tickers
//# Response
{
"bts_btc":{
"vol":0.0,
"last":0,
"sell":0.0,
"buy":0.0,
"weekRiseRate":0.0,
"riseRate":0.0,
"high":0.0,
"low":0,
"monthRiseRate":0.0
},
...
}
Returned Value Specification vol : 24 Hours Trading Volume
last : Last Price
sell : Sell1 Price
buy : Buy1 price
weekRiseRate : 1 Week Change
riseRate : 24 Hours Change
high : Maximum price
low : Minimum price
monthRiseRate : 30 Days Change
|
|||||||||||
+- https://api.exx.com/data/v1/ticker
Market quotation
Description //# Request
GET https://api.exx.com/data/v1/ticker?currency=eth_hsr
//# Response
{
"ticker": {
"vol": "1447.851",
"last": "30.487000000",
"sell": "30.499",
"buy": "30.487",
"weekRiseRate": -1.17,
"riseRate": 9.45,
"high": "30.812",
"low": "27.855",
"monthRiseRate": -0.99
},
"date": "1510383406453"
}
Returned Value Specification vol : 24 Hours Trading Volume
last : Last Price
sell : Sell1 Price
buy : Buy1 price
weekRiseRate : 1 Week Change
riseRate : 24 Hours Change
high : Maximum price
low : Minimum price
monthRiseRate : 30 Days Change
Request Parameter Specification
|
|||||||||||
+- https://api.exx.com/data/v1/depth
The depth of market
Description //# Request
GET https://api.exx.com/data/v1/depth?currency=eth_hsr
//# Response
{
"asks": [
[
"32.831",
"0.083"
]...
],
"bids": [
[
"30.434",
"10.766"
]...
],
"timestamp" : Timestamp
}
Returned Value Specification asks : The depth of seller
bids : The depth of buyer
timestamp : The timestamp of this depth
Request Parameter Specification
|
|||||||||||
+- https://api.exx.com/data/v1/trades
Trade History
Description //# Request
GET https://api.exx.com/data/v1/trades?currency=eth_hsr
//# Response
[
{
"amount" : 0.933,
"price" : 31.595,
"tid" : 2583932,
"type" : "sell",
"date" : 2583932,
"trade_type" : "ask",
}...
]
Returned Value Specification amount : Amount
price : Price
tid : Trading ID
type : Trading Type, buy/sell
date : Time(Timestamp)
trade_type : Order Type, ask/bid
Request Parameter Specification
|
|||||||||||
+- https://api.exx.com/data/v1/klines
获取K线
Description //# Request
https://api.exx.com/data/v1/klines?market=eth_btc&type=1min&size=1&assist=cny
//# Response
{
"datas": {
"limit": 1,
"time": 60,
"symbol": "eth_btc",
"contractUnit": "ETH",
"assistCoin": "btc",
"data": [
[
1529997660000, //时间戳
0.07301, //开盘价
0.07301, //最高价
0.072621, //最低价
0.072621, //收盘价
12.41 //交易量
]
],
"riseRate": 0,
"since": 0,
"type": "1min",
"moneyType": "BTC"
},
"isSuc": true,
"resMsg": {
"message": "SUCCESS",
"code": 1000
}
}
Returned Value Specification limit : 条数
time : 1min对应的秒数
symbol : 市场名
contractUnit : 卖币币种的英文简称
assistCoin : 辅助货币的英文简称
data : kline数据
riseRate :汇率
since :Start Time
type :kline类型
moneyType :买币币种的英文简称
Request Parameter Specification
|
|||||||||||
Trade API
Fast Trade on EXX.com
| Interface | Description | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
+- https://trade.exx.com/api/order
Place commissioned order
Description //# Request
GET https://trade.exx.com/api/order?accesskey=accesskey&amount=1.5¤cy=eth_hsr&nonce=Current time in milliseconds&price=1024&type=buy
&signature=Request Encrypted Signature String
//# Response
{
"code": 100,
"message": "操作成功",
"id": "13877"
}
Returned Value Specification code : Returned Code
message : Notice
id : Commissioned order number
Request Parameter Specification(Encrypted signature please according to this order, signature and ReqTime need not to join with signature string)
|
|||||||||||||||||
+- https://trade.exx.com/api/cancel
Cancel order
Description //# Request
GET https://trade.exx.com/api/cancel?accesskey=your_access_key¤cy=eth_hsr&id=123456789&nonce=Current time in milliseconds
&signature=Request Encrypted Signature String
//# Response
{
"code": "100",
"message": "操作成功。"
}
Returned Value Specification code : Returned Code
message : Notice
Request Parameter Specification(Encrypted signature please according to this order, signature and ReqTime need not to join with signature string)
|
|||||||||||||||||
+- https://trade.exx.com/api/getOrder
Acquire buy order or sell order
Description //# Request
GET https://trade.exx.com/api/getOrder?accesskey=your_access_key¤cy=eth_hsr&id=123456789&nonce=Current time in milliseconds
&signature=Request Encrypted Signature String
//# Response
{
"fees": 0,
"total_amount": 1,
"trade_amount": 0,
"price": 31,
"currency": “eth_hsr",
"id": "13877",
"trade_money": 0,
"type": "buy",
"trade_date": 1509728383300,
"status": 0
}
Returned Value Specification fees : Transaction Fee
total_amount : Order Amount
trade_amount : Completed Order Amount
price : unit price
currency : Trading Market
id : Commissioned order number
trade_money : Total Trading Amount
type: : Order Typebuy/sell')
trade_date : Timestamp
status : Order Status (0: Pending 1: Cancel 2: Completed 3:Part of pending trading order)
Request Parameter Specification(Encrypted signature please according to this order, signature and ReqTime need not to join with signature string)
|
|||||||||||||||||
+- https://trade.exx.com/api/getOpenOrders
Acquire multiple buy order or sell order, request to return 10 records each time.
Description //# Request
GET https://trade.exx.com/api/getOpenOrders?accesskey=your_access_key¤cy=eth_hsr
&nonce=Current time in milliseconds&pageIndex=1&type=buy&signature=Request Encrypted Signature String
//# Response
[
{
"fees": 0,
"total_amount": 1,
"trade_amount": 0,
"price": 30,
"currency": “eth_hsr",
"id": "13878",
"trade_money": 0,
"type": "buy",
"trade_date": 1509728897772,
"status": 0
},
{
"fees": 0,
"total_amount": 1,
"trade_amount": 0,
"price": 30,
"currency": “eth_hsr",
"id": "13877",
"trade_money": 0,
"type": "buy",
"trade_date": 1509728383300,
"status": 0
}
]
Returned Value Specification fees : Transaction Fee
total_amount : Order Amount
trade_amount : Completed Order Amount
price : unit price
currency : Trading Market
id : Commissioned order number
trade_money : Total Trading Amount
type: : Order Type buy/sell
trade_date : Timestamp
status : Order Status (0: Pending 1: Cancel 2: Completed 3:Part of pending trading order)
Request Parameter Specification(Encrypted signature please according to this order, signature and ReqTime need not to join with signature string)
|
|||||||||||||||||
+- https://trade.exx.com/api/getBalance
Acquire user information
Description //# Request
GET https://trade.exx.com/api/getBalance?accesskey=your_access_key&nonce=Current time in milliseconds&signature=Request Encrypted Signature String
//# Response
{
"credits": [
{
"flatRatio": "0.1",
"userRatio": "0.0985",
"noticeRatio": "0.2",
"levels": 10,
"flatPrice": 11.01471399
}
],
"funds": {
"BTS": {
"total": "10",
"freeze": "0",
"balance": "10",
"propTag": "BTS",
"credit_quota": "121.938066",
"credit_borrowed": "0",
"credit_interest": "0"
},
"MONA": {
"total": "0.966033",
"freeze": "0.966033",
"balance": "0",
"propTag": "MONA",
"credit_quota": "0",
"credit_borrowed": "0",
"credit_interest": "0"
},
....
"ETH": {
"total": "10",
"freeze": "0",
"balance": "10",
"propTag": "ETH",
"credit_quota": "121.938066",
"credit_borrowed": "0",
"credit_interest": "0"
},
"LTC": {
"total": "0",
"freeze": "0",
"balance": "0",
"propTag": "LTC",
"credit_quota": "121.938066",
"credit_borrowed": "0",
"credit_interest": "0"
},
"QTUM": {
"total": "0.003",
"freeze": "0.003",
"balance": "0",
"propTag": "QTUM",
"credit_quota": "0",
"credit_borrowed": "9.65",
"credit_interest": "0.026252"
}
}
}
Returned Value Specification credits Lending information:
flatRatio : Liquidation Risk Proportion, When the liquidation risk of user’s account is lower than this value, the system will conduct liquidation to the account.
userRatio : Liquidation Proportion, The risk of user’s account
noticeRatio : Remind Proportion,
levels : Leverage Times,
flatPrice : Liquidation Price
funds(Assets information) :
ETH(ETHAsset details): {
total : Total Amount,
freeze : Frozen Amount,
balance : Available Assets,
propTag : Coin Identifier,
credit_quota : Borrowing Limit,
credit_borrowed : Used Amount,
credit_interest : Outstanding Interest
}
...
QTUM(QTUMAsset details): {
total : Total Amount,
freeze : Frozen Amount,
balance : Available Assets,
propTag : Coin Identifier,
credit_quota : Borrowing Limit,
credit_borrowed : Used Amount,
credit_interest : Outstanding Interest
}
|
|||||||||||||||||
+- https://trade.exx.com/api/getChargeAddress
Get deposit address
Description //# Request
GET https://trade.exx.com/api/getChargeAddress?accesskey=your_access_key¤cy=qtum&nonce=Current time in milliseconds&signature=Request Encrypted Signature String
//# Response
{
"code":100,
"message" : {
"des" : "success",
"isSuc" : true,
"datas" : {
"currency":"qtum",
"key":"QSWnWqpHiM7Rz2S4Ybf76seYNURPL3Z5TN"
}
}
}
Returned Value Specification code : Returned Code
message : Notice:
des : Notice:
isSuc : Notice:
data :{
key : 充值地址,
currency : Coin Identifier
}
|
+- https://trade.exx.com/api/getChargeRecord
Get deposit record
Description //# Request
GET https://trade.exx.com/api/getChargeRecord?accesskey=your_access_key¤cy=qtum&nonce=Current time in milliseconds&pageIndex=页数&signature=Request Encrypted Signature String
//# Response
{
"code":100,
"message":{
"des": "success",
"isSuc": true,
"datas": {
"total":2,
"pageSize":10,
"list":[{
"amount":11.000000000,
"status":"-",
"hash":"2018013019033000098753290",
"submit_time":"2018-01-30 19:03:31"
"confirmTimes":1
},
{
"amount":11.000000000,
"status":"-",
"hash":"2018013018533000050778882",
"submit_time":"2018-01-30 18:53:31"
"confirmTimes":1
},
"pageIndex":1
}
}
}
Returned Value Specification code : Returned Code
message : Notice:
des : Notice:
isSuc:Notice:
data:{
total : 记录数,
status : Deposit,
hash : 充值交易号
submit_time : 充值时间,
confirmTimes: 确认数
}
|
||||||||||||||||
+- https://trade.exx.com/api/getWithdrawAddress
Get certification withdrawal address
Description //# Request
GET https://trade.exx.com/api/getWithdrawAddress?accesskey=your_access_key¤cy=qtum&nonce=Current time in milliseconds&signature=Request Encrypted Signature String
//# Response
{
"code":100,
"message":{
"des": "success",
"isSuc": true,
"datas": [{
"memo":"备注信息",
"key":"QSWnWqpHiM7Rz2S4Ybf76seYNURPL3Z5TN",
"currency":"qtum"
}]
}
}
Returned Value Specification code : Returned Code
message : Notice:
des :
isSuc:
data:[{
memo : Remark ,
key : 提币地址地址,
currency : Coin Identifier
}]
|
|||||||||||||||||
+- https://trade.exx.com/api/getWithdrawRecord
Get withdrawal record
Description //# Request
GET https://trade.exx.com/api/getWithdrawRecord?accesskey=your_access_key¤cy=qtum&nonce=Current time in milliseconds&pageIndex=页数&signature=Request Encrypted Signature String
//# Response
{
"code":100,
"message":{
"des": "success",
"isSuc": true,
"datas": {
"pageSize":10,
"list":[{
"amount":11.00000000,
"id":2018013084703,
"status":"success",
"submitTime":1517310691000,
"manageTime":1517310812000,
"receive":11.00000000,
"toAddress":"QjedNoj5cU6M5Vv5ipWoPtZEebWBXskYnu"
},{
"amount":11.00000000,
"id":2018013084684,
"status":"success",
"submitTime":1517309701000,
"manageTime":1517309912000,
"receive":11.00000000,
"toAddress":"QjedNoj5cU6M5Vv5ipWoPtZEebWBXskYnu"
}]
,"pageIndex":1
}
}
}
Returned Value Specification code : Returned Code
message : Notice:
des : Notice:
isSuc : Notice:
data :{
pageSize:每页记录数,
list:
amount : Withdrawal amount,
id : 提币记录ID,
status : Status,
submitTime : Submission time,
manageTime : Processing Time,
receive : 到账金额,
toAddress : Withdrawal address
}
|
|||||||||||||||||
+- https://trade.exx.com/api/withdraw
Withdrawal
Description //# Request
GET https://trade.exx.com/api/withdraw?accesskey=your_access_key&amount=10¤cy=qtum&nonce=Current time in milliseconds&receiveAddr=Withdrawal address &safePwd=提币密码&signature=Request Encrypted Signature String
//# Response
{
"code":100,
"message":"success",
"id":"2018013084703"
}
Returned Value Specification code : Returned Code
message : Notice
id : 提币单号
|
|||||||||||||||||
Sample Code
Request Parameter Specification(Encrypted signature please according to this order, signature and ReqTime need not to join with signature string)
//......
try{
//......
String params = "accesskey=yourAccessKey&nonce="+System. currentTimeMillis();
String secretKey = "yourSecretKey";
String baseURL = "https://trade.exx.com/api/getBalance";
String signature = HmacSHA512(params, secretKey);
String url = baseURL + "?" + params + "&signature=" + signature;
String result = doRequest(url);
//String params = "accesskey=yourAccessKey&nonce=1234567890123";
//String secretKey = "yourSecretKey";
//The result of being encrypted with HmacSHA512:
//c247be4b0b3f448254e70d422d199c874afa8fe873fd25d39cc1d14e4d60700bdbe0ea681a57bf772a8c16706e8a4d4bef3cd362fcc89f03a15e7e1b9e1930b1
//......
}catch(Exception ex){
ex.printStackTrace();
}
//......
FAQ
Access Restrictions
1. Each IP can send maximum of 1000 https requests within 1 minute. If exceeds 1000 requests, the system will automatically block the IP for one hour. After an hour, the IP will be automatically unlocked.
2. Each user can send maximum of 10 request within one second, it will be considered invalid if exceeds 10 requests.
3.The asset interface supports up to 3 visits per second
4.The address and record interface can be accessed at most 1 times per second.
5.The money raising authority needs to be opened in the generated API key operation, and the default is not opened.
6.Subaccount does not allow currency manipulation