Xevenue API Documentation

Api Endpoint

Error Message

Rate Limiting

Markets

Tickers

Tickers {market}

Depth

Trades

Timestamp

Deposit fee

Withdraw fee

Currency trades (Last 24 hours)

Currency List

Currency ID

OHLC(k line)

K data with pending trades.


Api Endpoint

The base API end point is https://xevenue.com

Error Message:

If Api request is failed then following type of message will be displayed in JSON format:

{
   "error":{
      "code":1001,
      "message":"market does not have a valid value"
   }
}
Rate Limiting:

For Api endpoints, the maximum access rate is 200 requests per minute, any more requests per minute will result in in error with status code of 429.

Markets

URL: /api/v2/markets (Api Test Link)

Description: Get all available markets.

Method: GET

Success Response:

Code: 200

Response Body:

[
   {
      "id":"xeveth",
      "name":"XEV/ETH"
   },
   {
      "id":"linkltc",
      "name":"LINK/LTC"
   },
   {
      "id":"aebtc",
      "name":"AE/BTC"
   }   .....
]
Tickers

URL: /api/v2/tickers (Api Test Link)

Description: Get ticker of all markets.

Method: GET

Success Response:

Code: 200

Response Body:

{
   "xeveth":{
      "at":1553607199,
      "ticker":{
         "buy":"0.0",
         "sell":"0.0",
         "low":"0.0",
         "high":"0.0",
         "last":"0.0",
         "vol":"0.0"
      }
   },
   "linkltc":{
      "at":1553607199,
      "ticker":{
         "buy":"0.0",
         "sell":"0.0",
         "low":"0.0",
         "high":"0.0",
         "last":"0.0",
         "vol":"0.0"
      }
   
   .....
}
Tickers{market}

URL: /api/v2/tickers/{market_id} (Api Test Link)

Description: Get ticker of specific market.

Method: GET

Example Request:

Request: GET /api/v2/tickers/xevbtc

Success Response:

Code: 200

Content:

{
   "at":1553607518,
   "ticker":{
      "buy":"0.00000959",
      "sell":"0.0000098",
      "low":"0.00000965",
      "high":"0.00000971",
      "last":"0.00000971",
      "vol":"209390.582062"
   }
}
Depth

URL: api/v2/depth (Api Test Link)

Description: Get the depth information of specified market.

Method: GET

Parameters

Example Request:

Request: GET /api/v2/depth?market=xevbtc&limit=2

Success Response:

Code: 200

Content:

{
   "timestamp":1553608689,
   "asks":[
      [
         "0.00000988",
         "1886.0",
         1
      ],
      [
         "0.0000098",
         "21139.507452",
         1
      ]
   ],
   "bids":[
      [
         "0.00000959",
         "133021.90278444",
         1
      ],
      [
         "0.0000095",
         "8943.0",
         1
      ]
   ]
}
Trades

URL: /api/v2/trades (Api Test Link)

Description: Get recent trades on market, each trade is included only once. Trades are sorted in reverse creation order.

Method: GET

Parameters

market(required): Unique market id. All available markets can be found at /api/v2/markets.

limit: Limit the number of returned price levels. Default to 50.

timestamp: An integer represents the seconds elapsed since Unix epoch. If set, only trades executed before the time will be returned.

from: Trade id. If set, only trades created after the trade will be returned.

to: Trade id. If set, only trades created before the trade will be returned.

order_by: If set, returned trades will be sorted in specific order, default to 'desc’.

Example Request:

Request: GET /api/v2/trades?market=xevbtc&limit=1&order_by=desc

Success Response:

Code: 200

Content:

[
   {
      "id":5716,
      "price":"0.00000971",
      "volume":"445.34556",
      "funds":"0.0043243053876",
      "market":"xevbtc",
      "created_at":"2019-03-26T14:09:24+01:00",
      "side":null
   }
]
Timestamp

URL: /api/v2/timestamp (Api Test Link)

Description: Get server current time.

Method: GET

Example Request:

Request: GET /api/v2/timestamp

Success Response:

Code: 200

Content:

"2019-03-26T09:54:03+00:00"
Deposit fee

URL: /api/v2/fees/deposit (Api Test Link)

Description: GET Returns deposit fees for currencies.

Example Request:

Request: GET /api/v2/fees/deposit

Success Response:

Code: 200

Content:

[
   {
      "currency":"ae",
      "type":"coin",
      "fee":{
         "type":"fixed",
         "value":"0.0"
      }
   },
   {
      "currency":"bat",
      "type":"coin",
      "fee":{
         "type":"fixed",
         "value":"0.0"
      }
   },
   {
      "currency":"btc",
      "type":"coin",
      "fee":{
         "type":"fixed",
         "value":"0.0"
      }
   },
   {
      "currency":"doge",
      "type":"coin",
      "fee":{
         "type":"fixed",
         "value":"0.0"
      }
   .....
]
Withdraw fee

URL: /api/v2/fees/withdraw (Api Test Link)

Description: GET Returns withdraw fees for currencies.

Example Request:

Request: GET /api/v2/fees/withdraw

Success Response:

Code: 200

Content:

[
   {
      "currency":"ae",
      "type":"coin",
      "fee":{
         "type":"fixed",
         "value":"2.1"
      }
   },
   {
      "currency":"bat",
      "type":"coin",
      "fee":{
         "type":"fixed",
         "value":"7.0"
      }
   },
   {
      "currency":"btc",
      "type":"coin",
      "fee":{
         "type":"fixed",
         "value":"0.0005"
      }
   },
   {
      "currency":"doge",
      "type":"coin",
      "fee":{
         "type":"fixed",
         "value":"50.0"
      }
   },
   {
      "currency":"eth",
      "type":"coin",
      "fee":{
         "type":"fixed",
         "value":"0.0"
      }
   .....
]
Currency trades (Last 24 hours)

URL: /api/v2/currency/trades?currency=xev (Api Test Link)

Description: Get currency trades at last 24h

Parameters

Currency: unique currency ticker.

Example Request:

Request: GET /api/v2/currency/trades?currency=xev

Success Response:

Code: 200

Content:

[
   {
      "btc":{
         "price":"0.00000971058823529412",
         "volume":"140426.71651715",
         "change":"+0.21%"
      }
   },
   {
      "eth":{
         "price":"0.0",
         "volume":"0.0",
         "change":"+0.0%"
      }
   }
]
Currencies list

URL: /api/v2/currencies (Api Test Link)

Description: Get list of currencies

Example Request:

Request: GET /api/v2/currencies

Success Response:

Code: 200

Content:

[
   {
      "id":"ae",
      "symbol":"A",
      "explorer_transaction":"https://etherscan.io/tx/#{txid}",
      "explorer_address":"https://etherscan.io/address/#{address}",
      "type":"coin",
      "deposit_fee":"0.0",
      "withdraw_fee":"2.1",
      "quick_withdraw_limit":"0.0",
      "base_factor":1000000000000000000,
      "precision":8,
      "icon_url":"coinlogo/AE.png"
   },
   {
      "id":"bat",
      "symbol":"B",
      "explorer_transaction":"https://etherscan.io/tx/#{txid}",
      "explorer_address":"https://etherscan.io/address/#{address}",
      "type":"coin",
      "deposit_fee":"0.0",
      "withdraw_fee":"7.0",
      "quick_withdraw_limit":"0.0",
      "base_factor":1000000000000000000,
      "precision":8,
      "icon_url":"coinlogo/BAT.png"
   }.....
]
Currency ID:

URL: /api/v2/currencies/{ID} (Api Test Link)

Description: Get currency INFO

Example Request:

Request: GET /api/v2/currencies/xev

Success Response:

Code: 200

Content:

{
   "id":"xev",
   "symbol":"X",
   "explorer_transaction":"https://etherscan.io/tx/#{txid}",
   "explorer_address":"https://etherscan.io/address/#{address}",
   "type":"coin",
   "deposit_fee":"0.0",
   "withdraw_fee":"0.0",
   "quick_withdraw_limit":"0.0",
   "base_factor":1000000000000000000,
   "precision":8,
   "icon_url":"coinlogo/XEV.png"
}
OHLC(k line)

URL: /api/v2/k (Api Test Link)

Description: Get OHLC(k line) of specific market.

Request: GET /api/v2/k?market=xevbtc

Success Response:

Parameters

period: Time period of K line, default to 1. You can choose between 1, 5, 15, 30, 60, 120, 240, 360, 720, 1440, 4320, 10080.

from: An integer represents the seconds elapsed since Unix epoch. If set, only k-line data after that time will be returned.

to: An integer represents the seconds elapsed since Unix epoch. If set, only k-line data till that time will be returned.

limit: Limit the number of returned data points default to 30. Ignored if time_from and time_to are given.

Code: 200

Content:

[
   [
      1553686020,
      0.00000361,
      0.00000361,
      0.00000361,
      0.00000361,
      0
   ],
   [
      1553686080,
      0.00000361,
      0.00000361,
      0.00000361,
      0.00000361,
      0
   ],
   [
      1553686140,
      0.00000361,
      0.00000361,
      0.00000361,
      0.00000361,
      0
   ].....
]
K data with pending trades.

URL: /api/v2/k_with_pending_trades (Api Test Link)

Description: Get K data with pending trades, which are the trades not included in K data yet, because there's delay between trade generated and processed by K data generator.

Request: GET /api/v2/k_with_pending_trades?market=xevbtc&trade_id=1

Success Response:

Parameters

trade_id: The trade id of the first trade you received.

period: Time period of K line, default to 1. You can choose between 1, 5, 15, 30, 60, 120, 240, 360, 720, 1440, 4320, 10080.

from: An integer represents the seconds elapsed since Unix epoch. If set, only k-line data after that time will be returned.

to: An integer represents the seconds elapsed since Unix epoch. If set, only k-line data till that time will be returned.

limit: Limit the number of returned data points, default to 30.

Code: 200

Content:

{
   "k":[
      [
         1553685660,
         0.00000361,
         0.00000361,
         0.00000361,
         0.00000361,
         0
      ],
      [
         1553685720,
         0.00000361,
         0.00000361,
         0.00000361,
         0.00000361,
         0
      ],
      [
         1553685780,
         0.00000361,
         0.00000361,
         0.00000361,
         0.00000361,
         0
      ].....
   ]
}