REST API Documentation

Welcome to the Veserus REST API documentation. This API (Application Programming Interface) will allow you to access the functionality of this exchange by means of HTTP requests, making integration with your own applications possible.

Connecting to the API

API Endpoint

          https://veserus.com/api
        

You can access the API at the following url:

  • https://veserus.com/api

Usage

Basic usage examples

          # Example request using CURL on the command line
curl "https://veserus.com/api/pairs"
        
          // Example valid response
{
  "NEO_LTC": {
      "id": 8,
      "last_price": 0,
      "lowest_ask": 22,
      "highest_bid": 0.1,
      "percentage_change": 0,
      "base_volume": 0,
      "quote_volume": 0,
      "is_active": 1,
      "high_24h": 0,
      "low_24h": 0
  },
  "BTC_LTC": {
      "id": 37,
      "last_price": 0.2,
      "lowest_ask": 0,
      "highest_bid": 0,
      "percentage_change": 0,
      "base_volume": 0,
      "quote_volume": 0,
      "is_active": 1,
      "high_24h": 0,
      "low_24h": 0
}

        
          // Example error response
{
  "error": "Method not found"
}

        

In order to use a public API method, you must make an HTTP request to the appropriate endpoint for that particular method, sending the appropriate GET or POST parameters for that method. You can also send them in the PAYLOAD of the request in JSON format.

Public API Methods

These methods can be accessed without an account or API key.

Pairs

          curl "https://veserus.com/api/pairs"
        
          // Example valid response
{
  "NEO_LTC": {
      "id": 8,
      "last_price": 0,
      "lowest_ask": 22,
      "highest_bid": 0.1,
      "percentage_change": 0,
      "base_volume": 0,
      "quote_volume": 0,
      "is_active": 1,
      "high_24h": 0,
      "low_24h": 0
  },
  "BTC_LTC": {
      "id": 37,
      "last_price": 0.2,
      "lowest_ask": 0,
      "highest_bid": 0,
      "percentage_change": 0,
      "base_volume": 0,
      "quote_volume": 0,
      "is_active": 1,
      "high_24h": 0,
      "low_24h": 0
}

        

Retrieves summary information for each currency pair listed on the exchange.

Response:

  • id Id of the currency pair.
  • last_price Execution price for the most recent trade for this pair.
  • lowest_ask Lowest current purchase price for this asset.
  • highest_bid Highest current sale price for this asset.
  • percentage_change Price change percentage.
  • base_volume Base units traded in the last 24 hours.
  • quote_volume Quoted units traded in the last 24 hours.
  • is_active Indicates if this market is currently trading or not.
  • high_24h The highest execution price for this pair within the last 24 hours.
  • low_24h The lowest execution price for this pair within the last 24 hours.

24h Volumes

          curl "https://veserus.com/api/24h-volumes"
        
          
{
  "NEO_LTC": {
      "NEO": 2.63563213,
      "LTC": 1.98464343
  },
  "BTC_LTC": {
      "BTC": 5.93734623,
      "LTC": 5.34234323
  },
  "NEO": 2.63563213,
  "LTC": 7.32698666,
  "BTC": 5.93734623
}

        

Retrieves summary information for each currency pair listed on the exchange.

Primary currencies include BTC, ETH, LTC, TUSD and show the total amount of those tokens that have traded within the last 24 hours.

Order Book

          curl "https://veserus.com/api/order-book?pair=all&limit=20"
        
          
{
  "NEO_LTC": {
    "bids": [
        [
            0.1,
            0.1
        ]
    ],
    "asks": [
        [
            22,
            0.54545455
        ]
    ],
    "is_active": 1
  },
  "BTC_ETH": {
    "bids": [
        [
            1,
            0.1
        ]
    ],
    "asks": [
        [
            1,
            0.504
        ],
        [
            0.3,
            0.06666667
        ],
        [
            0.2,
            0.3
        ]
    ],
    "is_active": 1
  }
}

        

Returns information on all the orders currently in the order book. Return will be grouped into two different arrays for bid and ask respectively.

Parameters:

  • pair A pair like BTC_ETH or all.
  • depth (optional) Default depth is 50. Max depth is 100.

Response:

  • asks An array of price aggregated offers in the book ordered from low to high price.
  • bids An array of price aggregated bids in the book ordered from high to low price.
  • is_active Indicates if trading the market is currently disabled or not.

Trade History

          curl "https://veserus.com/api/trade-history?pair=BTC_LTC&start=1561962336&end=1567319136"
        
          
[
  {
      "id": 45,
      "date": "2019-07-23 07:52:59",
      "type": "buy",
      "rate": "0.2",
      "amount": "0.002"
  },
  {
      "id": 44,
      "date": "2019-07-21 10:31:15",
      "type": "buy",
      "rate": "0.01",
      "amount": "0.00001"
  }
]

        

Returns the past 200 trades for a given market, or up to 1,000 trades between a range specified in UNIX timestamps by the 'start' and 'end' GET parameters.

Parameters:

  • pair The currency pair of the market being requested
  • start (optional) UNIX timestamp for start date.
  • end (optional) UNIX timestamp for end date.

Response:

  • id The globally unique ID associated with this trade.
  • date The UTC date and time of the trade execution.
  • type Designates this trade as a buy or a sell from the side of the taker.
  • rate The price in base currency for this asset.
  • amount The number of units transacted in this trade.

Chart Data

          curl "https://veserus.com/api/chart-data?pair=BTC_ETH&period=6h&start=1547971026&end=1550649426"
        
          
{
  "1548271020": {
      "date": 1548271020,
      "high": 2,
      "low": 1,
      "open": 1,
      "close": 1,
      "volume": 0.7000000000000001
  },
  "1548302700": {
      "date": 1548302700,
      "high": 2,
      "low": 2,
      "open": 2,
      "close": 2,
      "volume": 0.035
  },
  "1548324300": {
      "date": 1548324300,
      "high": 2,
      "low": 2,
      "open": 2,
      "close": 2,
      "volume": 0.008
  }
}

        

Returns candlestick chart data. Required GET parameters are 'currencyPair', 'period' (candlestick period in string; valid values are 1m, 5m, 15m, 1h, 6h and 1d), 'start', and 'end'. 'Start' and 'end' are given in UNIX timestamp format and used to specify the date range for the data returned.

Parameters:

  • pair The currency pair of the market being requested
  • period Candlestick period in string. Valid values are 1m, 5m, 15m, 1h, 6h and 1d.
  • start The start of the window in seconds since the unix epoch.
  • end The end of the window in seconds since the unix epoch.

Response:

  • date The UTC date for this candle in miliseconds since the Unix epoch.
  • high The highest price for this asset within this candle.
  • low The lowest price for this asset within this candle.
  • open The price for this asset at the start of the candle.
  • close The price for this asset at the end of the candle.
  • volume The total amount of this asset transacted within this candle.

Currencies

          curl "https://veserus.com/api/currencies"
        
          
{
  "NEO": {
      "id": 1,
      "name": "NEO Testnet",
      "tx_fee": 0,
      "num_confirmations": 2,
      "is_active": 1
  },
  "GAS": {
      "id": 2,
      "name": "GAS Testnet",
      "tx_fee": 0,
      "num_confirmations": null,
      "is_active": 1
  },
  "ONT": {
      "id": 3,
      "name": "Ontology Token",
      "tx_fee": 0,
      "num_confirmations": null,
      "is_active": 0
  }
}

        

Returns information about currencies.

Response:

  • id ID of the currency.
  • name Name of the currency.
  • tx_fee The network fee necessary to withdraw this currency.
  • num_confirmations The minimum number of blocks necessary before a deposit can be credited to an account.
  • is_active Designates whether (1) or not (0) trading for this currency is disabled for trading.