Navbar
python javascript shell php java ruby
  • ChainRider Finance
  • Volume Weighted Average Price
  • Time Weighted Average Price
  • Market Volume
  • Websocket API
  • Supported Pairs and Exchanges
  • Data Objects
  • Errors
  • Support
  • ChainRider Finance

    ChainRider offers a powerful set of RESTful APIs to view real-time information on cryptocurrency markets. Our database aggregates up-to-the-second trade data from 10+ exchanges, giving you access to indicators and price feeds that are accurate and reliable.

    ChainRider allows you to customize data feeds, selecting which exchanges to include or exclude from a calculation. We generally offer two versions of an indicator or price feed: a real time version which accounts for information within the last 24 hours, and a historical version to provide insight into previous market trends.

    Functionality

    The initial version of ChainRider Finance supports the following data feeds:

    Market Indicator Time Frame Base URL
    Volume Weighted Average Price, Moving Real-Time https://api.chainrider.io/v1/finance/vwap/realtime/
    Volume Weighted Average Price Historic https://api.chainrider.io/v1/finance/vwap/historic/
    Time Weighted Average Price R.T. & Historic https://api.chainrider.io/v1/finance/twap/historic/
    Exchange Volume (e.g. Poloniex, Gemini) R.T. & Historic https://api.chainrider.io/v1/finance/volume/exchange/realtime/
    Pair Volume (e.g. BTCUSD, ETHUSD) R.T. & Historic https://api.chainrider.io/v1/finance/volume/pair/realtime/

    For specific inquiries or general help using ChainRider Finance, please contact us at support@vizlore.com. We are always open to new ideas or suggestions for improving our service.

    How to Register

    In order to use ChainRider Finance, you must Register an Account to obtain a unique authentication token (tokens can be generated through the ChainRider dashboard once logged in). Registration is free and you can begin using ChainRider right away. However, keep in mind that basic accounts are only given a limited number of API calls (3,000 per day).

    To upgrade an account to MVP or Production level, please visit our Pricing Page to learn more.

    Authentication Token

    ChainRider requires an authentication token to access API calls. The token is passed in the request header with key name Chain-Rider and token as value.

    The URL examples throughout this documentation use <token> as a placeholder. When testing out our examples, substitute <token> with your unique authentication token.

    Base URL and API Version

    The Base URL for all ChainRider API calls is:

    • https://api.chainrider.io/

    Therefore, if you see POST /v1/ratelimit/, then the corresponding API URL would be: https://api.chainrider.io/v1/ratelimit/

    Currently, only v1 version of ChainRider Finance exists. Any future updates which might introduce conflicts with v1 will result in introducing v2 accordingly. API versioning will ensure backwards compatibility with existing integrations.

    Token Usage

    The following API call allows you to check the current status of your authentication token, including usage statistics on an hourly and daily basis.

    POST /v1/ratelimit/

    Parameter Location Type Description
    token Body String Your unique authentication token.

    Response

    Status Meaning Schema
    200 OK TokenUsageObject
    400 Bad Request Error Object
    401 Unauthorized None
    403 Forbidden None
    404 Not Found None

    Code samples.

    curl -X POST https://api.chainrider.io/v1/ratelimit/ \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -D '<body_here>'
    
    
        $body="<body_here>";
        $opts = array('http' =>
          array(
            'method'  => 'POST',
            'header'  => Content-Type: application/json\r\nAccept: application/json\r\n",
            'content' => $body
          )
        );
        $context  = stream_context_create($opts);
        $URL = "https://api.chainrider.io/v1/ratelimit/";
        $result = file_get_contents($url, false, $context, -1, 40000);
    );
    
    
    $context = stream_context_create($aHTTP);
        $response = file_get_contents($URL, false, $context);
    ?>
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
    };
    
    var requestBody=<body_here>
    
    $.ajax({
      url: 'https://api.chainrider.io/v1/ratelimit/',
      method: 'POST',
      headers: headers,
      data: requestBody,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json'
    }
    
    result = RestClient.post 'https://api.chainrider.io/v1/ratelimit/',
             payload:<body_here>, headers: headers
    
    p JSON.parse(result)
    
    import requests
    
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json'
    }
    
    r = requests.post('https://api.chainrider.io/v1/ratelimit/',
                      json=<body_here>, params={}, headers = headers)
    
    print r.json()
    
    URL obj = new URL("https://api.chainrider.io/v1/ratelimit/");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestProperty("Accept", "application/json");
    con.setRequestProperty("Content-Type", "application/json");
    con.setDoOutput(true);
    con.setRequestMethod("POST");
    OutputStream os = con.getOutputStream();
    OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
    osw.write("<body_here>");
    osw.flush();
    osw.close();
    os.close();  //don't forget to close the OutputStream
    httpCon.connect();
    
    
    //read the inputstream and print it
    String result;
    BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    int result2 = bis.read();
    while(result2 != -1) {
        buf.write((byte) result2);
        result2 = bis.read();
    }
    result = buf.toString();
    System.out.println(result);
    

    Body parameter.

    {
        "token": "o2IEP1p50pe1jfDtz8osOc7RpWZkwbfp"
    }
    

    Example response.

    {
      "message":{
          "hour":{
              "usage":2,
              "limit":300,
              "time_left":1857
          },
          "day":{
              "usage":2,
              "limit":3000,
              "time_left":34257
          },
          "forward":{
              "usage":0,
              "limit":3,
              "time_left":1675857
          }
      }
    }
    

    Volume Weighted Average Price

    VWAP represents the average price of an asset, for the given time range. Commonly referred to as Moving VWAP for real time calculations, this indicator provides an accurate price discovery mechanism for shorter time durations (1-minute or 5-minutes). For longer time durations, VWAP reflects whether or not an entry price or exit price was profitable, relative to the average market price at the time.

    For more info, see the following Investopedia articles: Definition and Importance of VWAP

    Moving VWAP - Realtime

    Calculate the Moving VWAP for the last "X" seconds, ranging from 1 to 86,400 seconds (up to a maximum of 24 hours).

    With each subsequent API call (using the same parameters), you will receive a different MVWAP calculation that includes any recent trades within the last "X" seconds. This means that any trades older than "X" seconds are discarded, even if they were included in the previous call, thus creating a Moving VWAP calculation.

    POST /v1/finance/vwap/realtime/

    Parameter In Type Description
    pair Body String The digital asset pair to calculate MVWAP for. See Supported Pairs
    seconds Body Integer Number of seconds in the past to consider, ranging from 1 to 86,400 seconds.
    analytics Body Boolean Provides the total number of data points used for each exchange, when set to True. Setting this to False will optimize response time.
    exchanges Body Array of Strings Exchanges to include in the calculation. See Supported Exchanges
    Chain-Rider Headers String Your unique authentication token.

    Response

    Status Meaning Schema
    200 OK VWAP Object
    400 Bad Request Error Object
    401 Unauthorized None
    403 Forbidden None
    404 Not Found None

    Code samples

    curl -X POST https://api.chainrider.io/v1/finance/vwap/realtime/ \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Chain-Rider: <TOKEN>' \
      -D '<body_here>'
    
    <?php
        $body="<body_here>";
        $opts = array('http' =>
          array(
            'method'  => 'POST',
            'header'  => Content-Type: application/json\r\nAccept: application/json\r\nChain-Rider: <TOKEN>\r\n",
            'content' => $body
          )
        );
        $context  = stream_context_create($opts);
        $URL = "https://api.chainrider.io/v1/finance/vwap/realtime/";
        $result = file_get_contents($url, false, $context, -1, 40000);
    );
    
    
    $context = stream_context_create($aHTTP);
        $response = file_get_contents($URL, false, $context);
    ?>
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Chain-Rider': '<TOKEN>'
    };
    
    var requestBody=<body_here>
    
    $.ajax({
      url: 'https://api.chainrider.io/v1/finance/vwap/realtime/',
      method: 'POST',
      headers: headers,
      data: requestBody,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Chain-Rider' => '<TOKEN>'
    }
    
    result = RestClient.post 'https://api.chainrider.io/v1/finance/vwap/realtime/',
             payload:<body_here>, headers: headers
    
    p JSON.parse(result)
    
    import requests
    
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Chain-Rider': '<TOKEN>'
    }
    
    r = requests.post('https://api.chainrider.io/v1/finance/vwap/realtime/',
                      json=<body_here>, params={}, headers = headers)
    
    print r.json()
    
    URL obj = new URL("https://api.chainrider.io/v1/finance/vwap/realtime/");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestProperty("Accept", "application/json");
    con.setRequestProperty("Content-Type", "application/json");
    con.setRequestProperty("Chain-Rider", "<TOKEN>");
    con.setDoOutput(true);
    con.setRequestMethod("POST");
    OutputStream os = con.getOutputStream();
    OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
    osw.write("<body_here>");
    osw.flush();
    osw.close();
    os.close();  //don't forget to close the OutputStream
    httpCon.connect();
    
    
    //read the inputstream and print it
    String result;
    BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    int result2 = bis.read();
    while(result2 != -1) {
        buf.write((byte) result2);
        result2 = bis.read();
    }
    result = buf.toString();
    System.out.println(result);
    

    Body parameter

    {
        "pair": "DASHUSD",
        "seconds": 1000,
        "analytics": true,
        "exchanges": ["Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"]
     }
    

    Example response

    {
        "message": {
            "pair": "DASHUSD",
            "upper_unix": 1535987905,
            "lower_unix": 1535986905,
            "vwap": 210.19,
            "analytics": {
                "data_points": 219,
                "exchange_data": {
                    "Bitfinex": 4,
                    "HitBTC": 24,
                    "Huobi": 189,
                    "Kraken": 2,
                    "Poloniex": 0
                }
            }
        }
    }
    

    VWAP - Historical

    When calculating VWAP for time durations longer than 24 hours, or for a specific time range such as 2:00 AM to 3:00 AM, use the Historical VWAP calcuation.

    VWAP parameters are almost identical to MVWAP, except that you must specify an upper_unix and a lower_unix to indicate which time range to calculate the VWAP for.

    POST /v1/finance/vwap/historic/

    Parameter In Type Description
    pair Body String The digital asset to calculate MVWAP for. See Supported Pairs
    upper_unix Body Integer Upper unix timestamp in seconds. See Unix Timestamp
    lower_unix Body Integer Lower unix timestamp in seconds.
    analytics Body Boolean Returns the number of data points gathered from each exchange if set to True. Setting this to False will optimize API response time.
    exchanges Body Array of Strings Exchanges to include in the calculation. See Supported Exchanges
    Chain-Rider Headers String Your unique authentication token.

    Response

    Status Meaning Schema
    200 OK VWAP Object
    400 Bad Request Error Object
    401 Unauthorized None
    403 Forbidden None
    404 Not Found None

    Code samples

    curl -X POST https://api.chainrider.io/v1/finance/vwap/historic/ \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Chain-Rider: <TOKEN>' \
      -D '<body_here>'
    
    <?php
        $body="<body_here>";
        $opts = array('http' =>
          array(
            'method'  => 'POST',
            'header'  => Content-Type: application/json\r\nAccept: application/json\r\nChain-Rider: <TOKEN>\r\n",
            'content' => $body
          )
        );
        $context  = stream_context_create($opts);
        $URL = "https://api.chainrider.io/v1/finance/vwap/historic/";
        $result = file_get_contents($url, false, $context, -1, 40000);
    );
    
    
    $context = stream_context_create($aHTTP);
        $response = file_get_contents($URL, false, $context);
    ?>
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Chain-Rider': '<TOKEN>'
    };
    
    var requestBody=<body_here>
    
    $.ajax({
      url: 'https://api.chainrider.io/v1/finance/vwap/historic/',
      method: 'POST',
      headers: headers,
      data: requestBody,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Chain-Rider' => '<TOKEN>'
    }
    
    result = RestClient.post 'https://api.chainrider.io/v1/finance/vwap/historic/',
             payload:<body_here>, headers: headers
    
    p JSON.parse(result)
    
    import requests
    
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Chain-Rider': '<TOKEN>'
    }
    
    r = requests.post('https://api.chainrider.io/v1/finance/vwap/historic/',
                      json=<body_here>, params={}, headers = headers)
    
    print r.json()
    
    URL obj = new URL("https://api.chainrider.io/v1/finance/vwap/historic/");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestProperty("Accept", "application/json");
    con.setRequestProperty("Content-Type", "application/json");
    con.setRequestProperty("Chain-Rider", "<TOKEN>");
    con.setDoOutput(true);
    con.setRequestMethod("POST");
    OutputStream os = con.getOutputStream();
    OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
    osw.write("<body_here>");
    osw.flush();
    osw.close();
    os.close();  //don't forget to close the OutputStream
    httpCon.connect();
    
    
    //read the inputstream and print it
    String result;
    BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    int result2 = bis.read();
    while(result2 != -1) {
        buf.write((byte) result2);
        result2 = bis.read();
    }
    result = buf.toString();
    System.out.println(result);
    

    Body parameter

    {
        "pair": "BTCUSD",
        "upper_unix": 1535466227,
        "lower_unix": 1535466002,
        "analytics": true,
        "exchanges": ["Bitfinex", "Kucoin", "Binance"]
     }
    

    Example response

    {
        "message": {
            "pair": "BTCUSD",
            "upper_unix": 1535466227,
            "lower_unix": 1535466002,
            "vwap": 7064.24,
            "analytics": {
                "data_points": 1153,
                "exchange_data": {
                    "Bitfinex": 289,
                    "Kucoin": 12,
                    "Binance": 852
                }
            }
        }
    }
    

    Time Weighted Average Price

    TWAP represents the average price of an asset for a given time. Instead of using volume, TWAP tracks the Typical Price across all time intervals, and then calculates the rolling average.

    TWAP is commonly used by algorithmic traders when placing large orders over an extended period time. This indicator will help ensure market orders are placed near the asset's true market price. For more information, visit the following Wikipedia and Quora page.

    • Typical Price: (Open + High + Low + Close) / 4

    • TWAP: (Sum of Typical Price) / (# of Intervals)

    TWAP Calculation

    This calculation will return an array of intervals, each including a time range, typical price for that time range, and the corresponding TWAP. Depending on how you structure the call, a different TWAP value could be returned for the same time interval, because TWAP is directly tied to the start_unix provided.

    This indicator is real-time by nature. Each subsequent call using the same parameters will return the same number of intervals_required, but will incorporate new trade data as time goes on while discarding old trade data (similar to the Moving VWAP calculation).

    POST /v1/finance/twap/realtime/

    Parameter In Type Description
    pair body String The digital asset to calculate TWAP for. See Supported Pairs
    interval body Integer Interval duration in minutes, accepted values include: 1, 5, 10, 15, 30, 60
    intervals_required body Integer Number of intervals required. See Info Object
    start_unix body Integer Start time in seconds. See Unix Timestamp
    Chain-Rider Headers String Your unique authentication token.

    Response

    Status Meaning Schema
    200 OK TWAP Object
    400 Bad Request Error Object
    401 Unauthorized None
    403 Forbidden None
    404 Not Found None

    Code samples

    curl -X POST https://api.chainrider.io/v1/finance/twap/realtime/\
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Chain-Rider: <TOKEN>' \
      -D '<body_here>'
    
    <?php
        $body="<body_here>";
        $opts = array('http' =>
          array(
            'method'  => 'POST',
            'header'  => Content-Type: application/json\r\nAccept: application/json\r\nChain-Rider: <TOKEN>\r\n",
            'content' => $body
          )
        );
        $context  = stream_context_create($opts);
        $URL = "https://api.chainrider.io/v1/finance/twap/realtime/";
        $result = file_get_contents($url, false, $context, -1, 40000);
    );
    
    
    $context = stream_context_create($aHTTP);
        $response = file_get_contents($URL, false, $context);
    ?>
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Chain-Rider': '<TOKEN>'
    };
    
    var requestBody=<body_here>
    
    $.ajax({
      url: 'https://api.chainrider.io/v1/finance/twap/realtime/',
      method: 'POST',
      headers: headers,
      data: requestBody,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Chain-Rider' => '<TOKEN>'
    }
    
    result = RestClient.post 'https://api.chainrider.io/v1/finance/twap/realtime/',
             payload:<body_here>, headers: headers
    
    p JSON.parse(result)
    
    import requests
    
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Chain-Rider': '<TOKEN>'
    }
    
    r = requests.post('https://api.chainrider.io/v1/finance/twap/realtime/',
                      json=<body_here>, params={}, headers = headers)
    
    print r.json()
    
    URL obj = new URL("https://api.chainrider.io/v1/finance/twap/realtime/");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestProperty("Accept", "application/json");
    con.setRequestProperty("Content-Type", "application/json");
    con.setRequestProperty("Chain-Rider", "<TOKEN>");
    con.setDoOutput(true);
    con.setRequestMethod("POST");
    OutputStream os = con.getOutputStream();
    OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
    osw.write("<body_here>");
    osw.flush();
    osw.close();
    os.close();  //don't forget to close the OutputStream
    httpCon.connect();
    
    
    //read the inputstream and print it
    String result;
    BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    int result2 = bis.read();
    while(result2 != -1) {
        buf.write((byte) result2);
        result2 = bis.read();
    }
    result = buf.toString();
    System.out.println(result);
    

    Body parameter

    {
        "pair": "ETCUSD",
        "interval": 60,
        "intervals_required": 10,
        "unix_start": 1536306456
     }
    

    Example response

    {
        "message": {
            "1536306480": {
                "typical_price": 11.75,
                "twap": 11.75
            }
        }
    }
    

    Market Volume

    There are four different tools available for viewing market volume across different exchanges:

    • A real-time and historical volume for specific asset pairs. BTCUSD, ETHUSD, ETCUSD, LTCUSD, DASHUSD
    • A real-time and historical volume for specific exchanges. Kraken, Poloniex, Binance, etc.

    Values returned indicate the amount of cryptocurrency traded. For example, "BTCUSD": 1.52 indicates 1.52 BTC were either bought or sold for a given time period.

    Asset Volume - Realtime

    Retrieve the volume of a specific asset pair across all supported exchanges, for the last "X" seconds.

    POST /v1/finance/volume/pair/realtime/

    Parameter In Type Description
    pair Body String The digital asset pair to retrieve volume for. See Supported Pairs
    seconds Body Integer Number of seconds to retrieve volume for. Minimum value is 1, maximum value is 86,400 (exactly 24 hours).
    Chain-Rider Headers String Your unique authentication token.

    Response

    Status Meaning Schema
    200 OK Volume Pair Object
    400 Bad Request Error Object
    401 Unauthorized None
    403 Forbidden None
    404 Not Found None

    Code samples

    curl -X POST https://api.chainrider.io/v1/finance/volume/pair/realtime/\
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Chain-Rider: <TOKEN>' \
      -D '<body_here>'
    
    <?php
        $body="<body_here>";
        $opts = array('http' =>
          array(
            'method'  => 'POST',
            'header'  => Content-Type: application/json\r\nAccept: application/json\r\nChain-Rider: <TOKEN>\r\n",
            'content' => $body
          )
        );
        $context  = stream_context_create($opts);
        $URL = "https://api.chainrider.io/v1/finance/volume/pair/realtime/";
        $result = file_get_contents($url, false, $context, -1, 40000);
    );
    
    
    $context = stream_context_create($aHTTP);
        $response = file_get_contents($URL, false, $context);
    ?>
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Chain-Rider': '<TOKEN>'
    };
    
    var requestBody=<body_here>
    
    $.ajax({
      url: 'https://api.chainrider.io/v1/finance/volume/pair/realtime/',
      method: 'POST',
      headers: headers,
      data: requestBody,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Chain-Rider' => '<TOKEN>'
    }
    
    result = RestClient.post 'https://api.chainrider.io/v1/finance/volume/pair/realtime/',
             payload:<body_here>, headers: headers
    
    p JSON.parse(result)
    
    import requests
    
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Chain-Rider': '<TOKEN>'
    }
    
    r = requests.post('https://api.chainrider.io/v1/finance/volume/pair/realtime/',
                      json=<body_here>, params={}, headers = headers)
    
    print r.json()
    
    URL obj = new URL("https://api.chainrider.io/v1/finance/volume/pair/realtime/");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestProperty("Accept", "application/json");
    con.setRequestProperty("Content-Type", "application/json");
    con.setRequestProperty("Chain-Rider", "<TOKEN>");
    con.setDoOutput(true);
    con.setRequestMethod("POST");
    OutputStream os = con.getOutputStream();
    OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
    osw.write("<body_here>");
    osw.flush();
    osw.close();
    os.close();  //don't forget to close the OutputStream
    httpCon.connect();
    
    
    //read the inputstream and print it
    String result;
    BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    int result2 = bis.read();
    while(result2 != -1) {
        buf.write((byte) result2);
        result2 = bis.read();
    }
    result = buf.toString();
    System.out.println(result);
    

    Body parameter

    {
     "seconds": 1000,
     "pair": "BTCUSD"
    }
    

    Example response

    {
        "message": {
            "pair": "BTCUSD",
            "volume_data": {
                "Binance": 408.6127,
                "Bitfinex": 0,
                "Bitstamp": 0,
                "Coinbase": 0,
                "Gemini": 0.5026,
                "HitBTC": 34.49,
                "Huobi": 300.8407,
                "Kraken": 7.5747,
                "Kucoin": 0.4886,
                "Poloniex": 17.8651
            },
            "upper_unix": 1535989565,
            "lower_unix": 1535988565
        }
    }
    

    Asset Volume - Historic

    Retrieve the historical volume of an asset pair across all supported exchanges. You must specify a time interval between upper_unix and lower_unix.

    POST /v1/finance/volume/pair/historic/

    Get historic information about a volume for a given pair across all supported exchanges

    Parameter In Type Description
    pair Body String The digital asset pair to retrieve volume for. See Supported Pairs
    upper_unix Body Integer Upper time range in seconds. See Unix Timestamp
    lower_unix Body Integer Lower time range in seconds.
    Chain-Rider Headers String Your unique authentication token.

    Response

    Status Meaning Schema
    200 OK Volume Pair Object
    400 Bad Request Error Object
    401 Unauthorized None
    403 Forbidden None
    404 Not Found None

    Code samples

    curl -X POST https://api.chainrider.io/v1/finance/volume/pair/historic/\
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Chain-Rider: <TOKEN>' \
      -D '<body_here>'
    
    <?php
        $body="<body_here>";
        $opts = array('http' =>
          array(
            'method'  => 'POST',
            'header'  => Content-Type: application/json\r\nAccept: application/json\r\nChain-Rider: <TOKEN>\r\n",
            'content' => $body
          )
        );
        $context  = stream_context_create($opts);
        $URL = "https://api.chainrider.io/v1/finance/volume/pair/historic/";
        $result = file_get_contents($url, false, $context, -1, 40000);
    );
    
    
    $context = stream_context_create($aHTTP);
        $response = file_get_contents($URL, false, $context);
    ?>
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Chain-Rider': '<TOKEN>'
    };
    
    var requestBody=<body_here>
    
    $.ajax({
      url: 'https://api.chainrider.io/v1/finance/volume/pair/historic/',
      method: 'POST',
      headers: headers,
      data: requestBody,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Chain-Rider' => '<TOKEN>'
    }
    
    result = RestClient.post 'https://api.chainrider.io/v1/finance/volume/pair/historic/',
             payload:<body_here>, headers: headers
    
    p JSON.parse(result)
    
    import requests
    
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Chain-Rider': '<TOKEN>'
    }
    
    r = requests.post('https://api.chainrider.io/v1/finance/volume/pair/historic/',
                      json=<body_here>, params={}, headers = headers)
    
    print r.json()
    
    URL obj = new URL("https://api.chainrider.io/v1/finance/volume/pair/historic/");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestProperty("Accept", "application/json");
    con.setRequestProperty("Content-Type", "application/json");
    con.setRequestProperty("Chain-Rider", "<TOKEN>");
    con.setDoOutput(true);
    con.setRequestMethod("POST");
    OutputStream os = con.getOutputStream();
    OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
    osw.write("<body_here>");
    osw.flush();
    osw.close();
    os.close();  //don't forget to close the OutputStream
    httpCon.connect();
    
    
    //read the inputstream and print it
    String result;
    BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    int result2 = bis.read();
    while(result2 != -1) {
        buf.write((byte) result2);
        result2 = bis.read();
    }
    result = buf.toString();
    System.out.println(result);
    

    Body parameter

    {
     "upper_unix": 1535466227,
     "lower_unix": 1535466002,
     "pair": "BTCUSD"
    }
    

    Example response

    {
        "message": {
            "pair": "BTCUSD",
            "volume_data": {
                "Binance": 102.4649,
                "Bitfinex": 61.1467,
                "Bitstamp": 14.7418,
                "Coinbase": 14.2054,
                "Gemini": 12.3009,
                "HitBTC": 5.36,
                "Huobi": 74.229,
                "Kraken": 26.8009,
                "Kucoin": 0.1383,
                "Poloniex": 0.4425
            },
            "upper_unix": 1535466227,
            "lower_unix": 1535466002
        }
    }
    

    Exchange Volume - Realtime

    Retrieve the volume on a specific exchange for all supported asset pairs, for the last "X" seconds.

    POST /v1/finance/volume/exchange/realtime/

    Parameter In Type Description
    exchange body String Exchange to retrieve volume for. See Supported Exchanges
    seconds Body Integer Number of seconds to retrieve volume for. Minimum value is 1, maximum value is 86,400 (exactly 24 hours).
    Chain-Rider Headers String Your unique authentication token.

    Response

    Status Meaning Schema
    200 OK Volume Exchange Object
    400 Bad Request Error Object
    401 Unauthorized None
    403 Forbidden None
    404 Not Found None

    Code samples

    curl -X POST https://api.chainrider.io/v1/finance/volume/exchange/realtime/ \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Chain-Rider: <TOKEN>' \
      -D '<body_here>'
    
    <?php
        $body="<body_here>";
        $opts = array('http' =>
          array(
            'method'  => 'POST',
            'header'  => Content-Type: application/json\r\nAccept: application/json\r\nChain-Rider: <TOKEN>\r\n",
            'content' => $body
          )
        );
        $context  = stream_context_create($opts);
        $URL = "https://api.chainrider.io/v1/finance/volume/exchange/realtime/";
        $result = file_get_contents($url, false, $context, -1, 40000);
    );
    
    
    $context = stream_context_create($aHTTP);
        $response = file_get_contents($URL, false, $context);
    ?>
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Chain-Rider': '<TOKEN>'
    };
    
    var requestBody=<body_here>
    
    $.ajax({
      url: 'https://api.chainrider.io/v1/finance/volume/exchange/realtime/',
      method: 'POST',
      headers: headers,
      data: requestBody,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Chain-Rider' => '<TOKEN>'
    }
    
    result = RestClient.post 'https://api.chainrider.io/v1/finance/volume/exchange/realtime/',
             payload:<body_here>, headers: headers
    
    p JSON.parse(result)
    
    import requests
    
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Chain-Rider': '<TOKEN>'
    }
    
    r = requests.post('https://api.chainrider.io/v1/finance/volume/exchange/realtime/',
                      json=<body_here>, params={}, headers = headers)
    
    print r.json()
    
    URL obj = new URL("https://api.chainrider.io/v1/finance/volume/exchange/realtime/");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestProperty("Accept", "application/json");
    con.setRequestProperty("Content-Type", "application/json");
    con.setRequestProperty("Chain-Rider", "<TOKEN>");
    con.setDoOutput(true);
    con.setRequestMethod("POST");
    OutputStream os = con.getOutputStream();
    OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
    osw.write("<body_here>");
    osw.flush();
    osw.close();
    os.close();  //don't forget to close the OutputStream
    httpCon.connect();
    
    
    //read the inputstream and print it
    String result;
    BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    int result2 = bis.read();
    while(result2 != -1) {
        buf.write((byte) result2);
        result2 = bis.read();
    }
    result = buf.toString();
    System.out.println(result);
    

    Body parameter

    {
        "seconds": 100,
        "exchange": "Kraken"
     }
    

    Example response

    {
        "message": {
            "exchange": "Kraken",
            "volume_data": {
                "BTCUSD": 0.06,
                "ETHUSD": 0,
                "ETCUSD": 0,
                "LTCUSD": 0,
                "DASHUSD": 0.03
            },
            "upper_unix": 1536058383,
            "lower_unix": 1536058283
        }
    }
    

    Exchange Volume - Historic

    Retrieve the historical volume on an exchange for all supported asset pairs. You must specify a time interval between upper_unix and lower_unix.

    POST /v1/finance/volume/exchange/historic/

    Get historic information about a volume at corresponding exchange

    Parameter In Type Description
    exchange body String Exchange to retrieve volume for. See Supported Exchanges
    upper_unix Body Integer Upper time range in seconds. See Unix Timestamp
    lower_unix Body Integer Lower time range in seconds.
    Chain-Rider Headers String Your unique authentication token.

    Response

    Status Meaning Schema
    200 OK Volume Exchange Object
    400 Bad Request Error Object
    401 Unauthorized None
    403 Forbidden None
    404 Not Found None

    Code samples

    curl -X POST https://api.chainrider.io/v1/finance/volume/exchange/historic/ \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Chain-Rider: <TOKEN>' \
      -D '<body_here>'
    
    <?php
        $body="<body_here>";
        $opts = array('http' =>
          array(
            'method'  => 'POST',
            'header'  => Content-Type: application/json\r\nAccept: application/json\r\nChain-Rider: <TOKEN>\r\n",
            'content' => $body
          )
        );
        $context  = stream_context_create($opts);
        $URL = "https://api.chainrider.io/v1/finance/volume/exchange/historic/";
        $result = file_get_contents($url, false, $context, -1, 40000);
    );
    
    
    $context = stream_context_create($aHTTP);
        $response = file_get_contents($URL, false, $context);
    ?>
    
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Chain-Rider': '<TOKEN>'
    };
    
    var requestBody=<body_here>
    
    $.ajax({
      url: 'https://api.chainrider.io/v1/finance/volume/exchange/historic/',
      method: 'POST',
      headers: headers,
      data: requestBody,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    })
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type' => 'application/json',
      'Accept' => 'application/json',
      'Chain-Rider' => '<TOKEN>'
    }
    
    result = RestClient.post 'https://api.chainrider.io/v1/finance/volume/exchange/historic/',
             payload:<body_here>, headers: headers
    
    p JSON.parse(result)
    
    import requests
    
    headers = {
      'Content-Type': 'application/json',
      'Accept': 'application/json',
      'Chain-Rider': '<TOKEN>'
    }
    
    r = requests.post('https://api.chainrider.io/v1/finance/volume/exchange/historic/',
                      json=<body_here>, params={}, headers = headers)
    
    print r.json()
    
    URL obj = new URL("https://api.chainrider.io/v1/finance/volume/exchange/historic/");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestProperty("Accept", "application/json");
    con.setRequestProperty("Content-Type", "application/json");
    con.setRequestProperty("Chain-Rider", "<TOKEN>");
    con.setDoOutput(true);
    con.setRequestMethod("POST");
    OutputStream os = con.getOutputStream();
    OutputStreamWriter osw = new OutputStreamWriter(os, "UTF-8");
    osw.write("<body_here>");
    osw.flush();
    osw.close();
    os.close();  //don't forget to close the OutputStream
    httpCon.connect();
    
    
    //read the inputstream and print it
    String result;
    BufferedInputStream bis = new BufferedInputStream(con.getInputStream());
    ByteArrayOutputStream buf = new ByteArrayOutputStream();
    int result2 = bis.read();
    while(result2 != -1) {
        buf.write((byte) result2);
        result2 = bis.read();
    }
    result = buf.toString();
    System.out.println(result);
    

    Body parameter

    {
        "upper_unix": 1535466227,
        "lower_unix": 1535466026,
        "exchange": "Bitfinex"
     }
    

    Example response

    {
        "message": {
            "exchange": "Bitfinex",
            "volume_data": {
                "BTCUSD": 52.3741,
                "ETHUSD": 683.7672,
                "ETCUSD": 2045.4391,
                "LTCUSD": 413.115,
                "DASHUSD": 22.1823
            },
            "upper_unix": 1535466227,
            "lower_unix": 1535466026
        }
    }
    

    Websocket API

    ChainRider provides option for streaming real time information about Moving VWAP via web sockets. Websockets are commonly used for client side applications for instant update of mobile or web UI displaying real time crypto currency price charts.

    The base URL for accessing websocket APIs is: wss://websocketapi.chainrider.io/ws/private/vwap/ In a single connection, you can specify one or more supported pairs and exactly one supported interval to receive real time updates on moving VWAP. Regardless of the interval specified, you will receive updates every 30s.

    WebSocket Moving VWAP

    wss://websocketapi.chainrider.io/ws/private/vwap/

    Calculate the Moving VWAP for specified interval and pairs. Streams can be access either in a single raw stream or a combined stream, meaning you can specify one or multiple pairs for a given interval and you will receive stream of results for all provided pairs.

    Parameter In Type Description
    pairs query String List of pairs separated with forward-slash /. In case only one pair is requested, / should be omitted. See Supported Pairs
    interval query String Interval for which you would like to receive stream updates. See Supported Websocket Intervals
    token query String Your unique Chain-Rider authentication token.

    Response

    Event Schema
    Connection successful WebSocket Welcome Object
    Data streaming WebSocket VWAP Object
    Connection error WebSocket Error Object

    Code samples

    websocat wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1m&pairs=BTCUSD/ETHUSD/LTCUSD/DASHUSD&token=<TOKEN>
    
    <?php
    
    require 'vendor/autoload.php';
    use WSSC\WebSocketClient;
    use \WSSC\Components\ClientConfig;
    
    $client = new WebSocketClient('wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1m&pairs=BTCUSD/ETHUSD/ETCUSD/LTCUSD/DASHUSD/BCHUSD/BTGUSD&token=<TOKEN>', new ClientConfig());
    
    
    while(true){
        try{
            echo $client->receive();
            sleep(5);
        }catch (Exception $e) {
            print("exception");
            continue;
        }
    }
    ?>
    
    function WebSocketTest() {
    
        if ("WebSocket" in window) {
            alert("WebSocket is supported by your Browser!");
           // Let us open a web socket
           var ws = new WebSocket("wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1m&pairs=BTCUSD/ETHUSD/LTCUSD/DASHUSD&token=<TOKEN>");
    
           ws.onopen = function(evt) {
              // Connection open
           };
    
           ws.onmessage = function (evt) {
              var received_msg = evt.data;
              // Data received, do stuff.
              console.log(received_msg);
           };
    
           ws.onclose = function() {  
              // websocket is closed.
              alert("Connection is closed...");
           };
        } else {
           // The browser doesn't support WebSocket
           alert("WebSocket NOT supported by your Browser!");
        }
     }
    
    require 'rubygems'
    require 'websocket-client-simple'
    
    ws = WebSocket::Client::Simple.connect 'wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1m&pairs=BTCUSD/ETHUSD/LTCUSD/DASHUSD&token=<TOKEN>'
    
    ws.on :message do |msg|
      puts msg.data
    end
    
    ws.on :open do
      puts "Opened"
    end
    
    ws.on :close do |e|
      p e
      exit 1
    end
    
    ws.on :error do |e|
      p e
    end
    
    loop do
      ws.send STDIN.gets.strip
    end
    
    import websocket
    
    def on_message(ws, message):
        print(message)
    
    def on_error(ws, error):
        print(error)
    
    def on_close(ws):
        print("### closed ###")
    
    def on_open(ws):
        print("### opened ###")
    
    if __name__ == "__main__":
        websocket.enableTrace(True)
        ws = websocket.WebSocketApp("wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1m&pairs=BTCUSD/ETHUSD/LTCUSD/DASHUSD&token=<TOKEN>",
          on_message = on_message,
          on_error = on_error,
          on_close = on_close
        )
        ws.on_open = on_open
        ws.run_forever()
    
    package ws.client.example;
    
    import org.eclipse.jetty.websocket.api.Session;
    import org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose;
    import org.eclipse.jetty.websocket.api.annotations.OnWebSocketConnect;
    import org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage;
    import org.eclipse.jetty.websocket.api.annotations.WebSocket;
    import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
    import org.eclipse.jetty.websocket.client.WebSocketClient;
    
    import java.net.URI;
    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.TimeUnit;
    
    public class Main {
        public static void main(String[] args) {
            String destUri = "wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1m&pairs=BTCUSD/ETHUSD/ETCUSD/LTCUSD/DASHUSD/BCHUSD/BTGUSD&token=<TOKEN>";
    
            WebSocketClient client = new WebSocketClient();
            WSClient socket = new Main.WSClient();
            try {
                client.start();
    
                URI echoUri = new URI(destUri);
                ClientUpgradeRequest request = new ClientUpgradeRequest();
                client.connect(socket, echoUri, request);
                System.out.printf("Connecting to : %s%n", echoUri);
                // wait for closed socket connection.
                while (true) {
                    Thread.sleep(100);
                }
    
            } catch (Throwable t) {
                t.printStackTrace();
            } finally {
                try {
                    client.stop();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    
        @WebSocket(maxTextMessageSize = 64 * 1024)
        public static class WSClient {
            private final CountDownLatch closeLatch;
    
            @SuppressWarnings("unused")
            private Session session;
    
            public WSClient() {
                this.closeLatch = new CountDownLatch(1);
            }
    
            public boolean awaitClose(int duration, TimeUnit unit) throws InterruptedException {
                return this.closeLatch.await(duration, unit);
            }
    
            @OnWebSocketClose
            public void onClose(int statusCode, String reason) {
                System.out.printf("Connection closed: %d - %s%n", statusCode, reason);
                this.session = null;
                this.closeLatch.countDown(); // trigger latch
            }
    
            @OnWebSocketConnect
            public void onConnect(Session session) {
                System.out.printf("Got connect: %s%n", session);
                this.session = session;
                try {
    
                } catch (Throwable t) {
                    t.printStackTrace();
                }
            }
    
            public void closeSession() {
                if (session != null) {
                    this.session.close();
                }
            }
    
            @OnWebSocketMessage
            public void onMessage(String msg) {
                System.out.printf("Got msg: %s%n", msg);
            }
        }
    }
    

    Example response

    {
      "message": [
          {"pair": "BTCUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 6367.78, "difference": 0.21},
          {"pair": "ETHUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 198.48, "difference": 0.01},
          {"pair": "LTCUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 50.02, "difference": -0.02},
          {"pair": "DASHUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 152.92, "difference": 0.03}
      ]
    }
    

    Websockets exemplified

    Let's say that we need BTC price real time updates for last hour. In order to access websocket stream, our final websocket URI will be:

    wss://websocketapi.chainrider.io/ws/private/vwap/?pairs=BTCUSD&interval=1h&token=<YOUR_CHAINRIDER_TOKEN>

    When the connection with ChainRider websocket server is established, we will receive BTC price (Moving VWAP) for the last hour every 30 seconds.

    Let's look at another example where we want to receive updates for more than one pair (i.e. BTC, DASH and ETH) for an interval of last 10 minutes. In that case, our final websocket URI would be:

    wss://websocketapi.chainrider.io/ws/private/vwap/?pairs=BTCUSD/DASHUSD/ETHUSD&interval=10m&token=<YOUR_CHAINRIDER_TOKEN>

    Again, we will receive updates every 30s but the provided results would be VWAP price of BTC, DASH and ETH for last 10 minutes.

    Example 1

    websocat wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1h&pairs=BTCUSD&token=<TOKEN>
    
    <?php
    
    require 'vendor/autoload.php';
    use WSSC\WebSocketClient;
    use \WSSC\Components\ClientConfig;
    
    $client = new WebSocketClient('wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1h&pairs=BTCUSD&token=<TOKEN>', new ClientConfig());
    
    
    while(true){
        try{
            echo $client->receive();
            sleep(5);
        }catch (Exception $e) {
            print("exception");
            continue;
        }
    }
    ?>
    
    function WebSocketTest() {
    
        if ("WebSocket" in window) {
            alert("WebSocket is supported by your Browser!");
           // Let us open a web socket
           var ws = new WebSocket("wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1h&pairs=BTCUSD&token=<TOKEN>");
    
           ws.onopen = function(evt) {
              // Connection open
           };
    
           ws.onmessage = function (evt) {
              var received_msg = evt.data;
              // Data received, do stuff.
              console.log(received_msg);
           };
    
           ws.onclose = function() {  
              // websocket is closed.
              alert("Connection is closed...");
           };
        } else {
           // The browser doesn't support WebSocket
           alert("WebSocket NOT supported by your Browser!");
        }
     }
    
    require 'rubygems'
    require 'websocket-client-simple'
    
    ws = WebSocket::Client::Simple.connect 'wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1h&pairs=BTCUSD&token=<TOKEN>'
    
    ws.on :message do |msg|
      puts msg.data
    end
    
    ws.on :open do
      puts "Opened"
    end
    
    ws.on :close do |e|
      p e
      exit 1
    end
    
    ws.on :error do |e|
      p e
    end
    
    loop do
      ws.send STDIN.gets.strip
    end
    
    import websocket
    
    def on_message(ws, message):
        print(message)
    
    def on_error(ws, error):
        print(error)
    
    def on_close(ws):
        print("### closed ###")
    
    def on_open(ws):
        print("### opened ###")
    
    if __name__ == "__main__":
        websocket.enableTrace(True)
        ws = websocket.WebSocketApp("wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1h&pairs=BTCUSD&token=<TOKEN>",
          on_message = on_message,
          on_error = on_error,
          on_close = on_close
        )
        ws.on_open = on_open
        ws.run_forever()
    
    package ws.client.example;
    
    import org.eclipse.jetty.websocket.api.Session;
    import org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose;
    import org.eclipse.jetty.websocket.api.annotations.OnWebSocketConnect;
    import org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage;
    import org.eclipse.jetty.websocket.api.annotations.WebSocket;
    import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
    import org.eclipse.jetty.websocket.client.WebSocketClient;
    
    import java.net.URI;
    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.TimeUnit;
    
    public class Main {
        public static void main(String[] args) {
            String destUri = "wss://websocketapi.chainrider.io/ws/private/vwap/?interval=1h&pairs=BTCUSD&token=<TOKEN>";
    
            WebSocketClient client = new WebSocketClient();
            WSClient socket = new Main.WSClient();
            try {
                client.start();
    
                URI echoUri = new URI(destUri);
                ClientUpgradeRequest request = new ClientUpgradeRequest();
                client.connect(socket, echoUri, request);
                System.out.printf("Connecting to : %s%n", echoUri);
                // wait for closed socket connection.
                while (true) {
                    Thread.sleep(100);
                }
    
            } catch (Throwable t) {
                t.printStackTrace();
            } finally {
                try {
                    client.stop();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    
        @WebSocket(maxTextMessageSize = 64 * 1024)
        public static class WSClient {
            private final CountDownLatch closeLatch;
    
            @SuppressWarnings("unused")
            private Session session;
    
            public WSClient() {
                this.closeLatch = new CountDownLatch(1);
            }
    
            public boolean awaitClose(int duration, TimeUnit unit) throws InterruptedException {
                return this.closeLatch.await(duration, unit);
            }
    
            @OnWebSocketClose
            public void onClose(int statusCode, String reason) {
                System.out.printf("Connection closed: %d - %s%n", statusCode, reason);
                this.session = null;
                this.closeLatch.countDown(); // trigger latch
            }
    
            @OnWebSocketConnect
            public void onConnect(Session session) {
                System.out.printf("Got connect: %s%n", session);
                this.session = session;
                try {
    
                } catch (Throwable t) {
                    t.printStackTrace();
                }
            }
    
            public void closeSession() {
                if (session != null) {
                    this.session.close();
                }
            }
    
            @OnWebSocketMessage
            public void onMessage(String msg) {
                System.out.printf("Got msg: %s%n", msg);
            }
        }
    }
    

    Example1 response

    {
      "message": [
          {"pair": "BTCUSD", "lower_unix": 1541069810, "upper_unix": 1541073410, "vwap": 6357.96, "difference": 0.01}
      ]
    }
    

    Example 2

    websocat wss://websocketapi.chainrider.io/ws/private/vwap/?interval=10m&pairs=BTCUSD/DASHUSD/ETHUSD&token=<TOKEN>
    
    <?php
    
    require 'vendor/autoload.php';
    use WSSC\WebSocketClient;
    use \WSSC\Components\ClientConfig;
    
    $client = new WebSocketClient('wss://websocketapi.chainrider.io/ws/private/vwap/?interval=10m&pairs=BTCUSD/ETHUSD/DASHUSD&token=<TOKEN>', new ClientConfig());
    
    
    while(true){
        try{
            echo $client->receive();
            sleep(5);
        }catch (Exception $e) {
            print("exception");
            continue;
        }
    }
    ?>
    
    function WebSocketTest() {
    
        if ("WebSocket" in window) {
            alert("WebSocket is supported by your Browser!");
           // Let us open a web socket
           var ws = new WebSocket("wss://websocketapi.chainrider.io/ws/private/vwap/?interval=10m&pairs=BTCUSD/DASHUSD/ETHUSD&token=<TOKEN>");
    
           ws.onopen = function(evt) {
              // Connection open
           };
    
           ws.onmessage = function (evt) {
              var received_msg = evt.data;
              // Data received, do stuff.
              console.log(received_msg);
           };
    
           ws.onclose = function() {  
              // websocket is closed.
              alert("Connection is closed...");
           };
        } else {
           // The browser doesn't support WebSocket
           alert("WebSocket NOT supported by your Browser!");
        }
     }
    
    require 'rubygems'
    require 'websocket-client-simple'
    
    ws = WebSocket::Client::Simple.connect 'wss://websocketapi.chainrider.io/ws/private/vwap/?interval=10m&pairs=BTCUSD/DASHUSD/ETHUSD&token=<TOKEN>'
    
    ws.on :message do |msg|
      puts msg.data
    end
    
    ws.on :open do
      puts "Opened"
    end
    
    ws.on :close do |e|
      p e
      exit 1
    end
    
    ws.on :error do |e|
      p e
    end
    
    loop do
      ws.send STDIN.gets.strip
    end
    
    import websocket
    
    def on_message(ws, message):
        print(message)
    
    def on_error(ws, error):
        print(error)
    
    def on_close(ws):
        print("### closed ###")
    
    def on_open(ws):
        print("### opened ###")
    
    if __name__ == "__main__":
        websocket.enableTrace(True)
        ws = websocket.WebSocketApp("wss://websocketapi.chainrider.io/ws/private/vwap/?interval=10m&pairs=BTCUSD/DASHUSD/ETHUSD&token=<TOKEN>",
          on_message = on_message,
          on_error = on_error,
          on_close = on_close
        )
        ws.on_open = on_open
        ws.run_forever()
    
    package ws.client.example;
    
    import org.eclipse.jetty.websocket.api.Session;
    import org.eclipse.jetty.websocket.api.annotations.OnWebSocketClose;
    import org.eclipse.jetty.websocket.api.annotations.OnWebSocketConnect;
    import org.eclipse.jetty.websocket.api.annotations.OnWebSocketMessage;
    import org.eclipse.jetty.websocket.api.annotations.WebSocket;
    import org.eclipse.jetty.websocket.client.ClientUpgradeRequest;
    import org.eclipse.jetty.websocket.client.WebSocketClient;
    
    import java.net.URI;
    import java.util.concurrent.CountDownLatch;
    import java.util.concurrent.TimeUnit;
    
    public class Main {
        public static void main(String[] args) {
            String destUri = "wss://websocketapi.chainrider.io/ws/private/vwap/?interval=10m&pairs=BTCUSD/ETHUSD/DASHUSD&token=<TOKEN>";
    
            WebSocketClient client = new WebSocketClient();
            WSClient socket = new Main.WSClient();
            try {
                client.start();
    
                URI echoUri = new URI(destUri);
                ClientUpgradeRequest request = new ClientUpgradeRequest();
                client.connect(socket, echoUri, request);
                System.out.printf("Connecting to : %s%n", echoUri);
                // wait for closed socket connection.
                while (true) {
                    Thread.sleep(100);
                }
    
            } catch (Throwable t) {
                t.printStackTrace();
            } finally {
                try {
                    client.stop();
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        }
    
        @WebSocket(maxTextMessageSize = 64 * 1024)
        public static class WSClient {
            private final CountDownLatch closeLatch;
    
            @SuppressWarnings("unused")
            private Session session;
    
            public WSClient() {
                this.closeLatch = new CountDownLatch(1);
            }
    
            public boolean awaitClose(int duration, TimeUnit unit) throws InterruptedException {
                return this.closeLatch.await(duration, unit);
            }
    
            @OnWebSocketClose
            public void onClose(int statusCode, String reason) {
                System.out.printf("Connection closed: %d - %s%n", statusCode, reason);
                this.session = null;
                this.closeLatch.countDown(); // trigger latch
            }
    
            @OnWebSocketConnect
            public void onConnect(Session session) {
                System.out.printf("Got connect: %s%n", session);
                this.session = session;
                try {
    
                } catch (Throwable t) {
                    t.printStackTrace();
                }
            }
    
            public void closeSession() {
                if (session != null) {
                    this.session.close();
                }
            }
    
            @OnWebSocketMessage
            public void onMessage(String msg) {
                System.out.printf("Got msg: %s%n", msg);
            }
        }
    }
    

    Example2 response

    {
      "message": [
        {"pair": "BTCUSD", "lower_unix": 1541072905, "upper_unix": 1541073505, "vwap": 6348.32, "difference": -0.12},
        {"pair": "ETHUSD", "lower_unix": 1541072905, "upper_unix": 1541073505, "vwap": 198.38, "difference": 0.04},
        {"pair": "DASHUSD", "lower_unix": 1541072905, "upper_unix": 1541073505, "vwap": 153.55, "difference": 0.01}
      ]
    }
    

    Supported Pairs and Exchanges

    Supported pairs

    • BTCUSD
    • ETHUSD
    • ETCUSD
    • LTCUSD
    • DASHUSD
    • BCHUSD
    • BTGUSD
    • EOSUSD
    • TRXUSD
    • XMRUSD
    • VETUSD
    • IOTAUSD
    • ZECUSD
    • TUSDUSD
    • NEOUSD
    • ADAUSD

    Supported exchanges

    • Binance
    • Bitfinex
    • Bitstamp
    • Coinbase
    • Gemini
    • HitBTC
    • Huobi
    • Kraken
    • Kucoin
    • Poloniex

    Supported websocket intervals

    Interval Description
    1m Provides Moving VWAP for last 60 seconds
    5m Provides Moving VWAP for last 5 minutes
    10m Provides Moving VWAP for last 10 minutes
    30m Provides Moving VWAP for last 30 minutes
    1h Provides Moving VWAP for last hour
    6h Provides Moving VWAP for last 6 hours
    12h Provides Moving VWAP for last 12 hours
    24h Provides Moving VWAP for last 24 hours

    API Query

    View information about ChainRider supported exchanges and asset pairs through the API.

    GET /v1/finance/info/

    Parameter In Type Description
    Chain-Rider Headers String Your unique authentication token.

    Response

    Status Meaning Schema
    200 OK Info Object
    400 Bad Request Error Object
    401 Unauthorized None
    403 Forbidden None
    404 Not Found None

    Code samples

    curl -X GET https://api.chainrider.io/v1/finance/info/ \
      -H 'Content-Type: application/json' \
      -H 'Accept: application/json' \
      -H 'Chain-Rider: <TOKEN>'
    
    # Response example
    {
      "message": {
        "pairs": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                  "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD",
                  "IOTAUSD", "ZECUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
        "exchanges": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                      "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
        "exchange_pairs": {
            "BTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETCUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "LTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "DASHUSD": ["Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "BCHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "BTGUSD": ["Bitfinex", "HitBTC"],
            "EOSUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken",
                       "Kucoin", "Poloniex"],
            "TRXUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "XMRUSD": ["Bitfinex", "HitBTC", "Kraken", "Poloniex"],
            "VETUSD": ["Binance", "Bitfinex", "Huobi", "Kucoin"],
            "IOTAUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi"],
            "ZECUSD": ["Bitfinex", "Gemini", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "TUSDUSD": ["Binance"],
            "NEOUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "ADAUSD": ["Binance", "HitBTC", "Huobi", "Kraken"]
        },
        "pairs_exchanges": {
            "Binance": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                        "TRXUSD", "VETUSD", "IOTAUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
            "Bitfinex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                         "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD", "IOTAUSD",
                         "ZECUSD", "NEOUSD"],
            "Bitstamp": ["BTCUSD", "ETHUSD", "LTCUSD", "BCHUSD"],
            "Coinbase": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD"],
            "Gemini": ["BTCUSD", "ETHUSD", "ZECUSD"],
            "HitBTC": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "BTGUSD",  "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD",
                       "ZECUSD", "NEOUSD"],
            "Huobi": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                      "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD", "ZECUSD", "NEOUSD",
                      "ADAUSD"],
            "Kraken": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "EOSUSD", "XMRUSD", "ZECUSD", "NEOUSD", "ADAUSD"],
            "Kucoin": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                       "TRXUSD", "VETUSD", "IOTAUSD", "NEOUSD", "ADAUSD"],
            "Poloniex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD",
                         "BCHUSD", "EOSUSD", "XMRUSD", "ZECUSD"]
        },
        "intervals_twap": [1, 5, 10, 15, 30, 60],
        "max_intervals_twap": {"1": 720, "5": 144, "10": 72,
                               "15": 48, "30": 24, "60": 12}
      }
    }
    
    <?php
    $URL = "https://api.chainrider.io/v1/finance/info/";
    
    $aHTTP['http']['method']  = 'GET';
    
    $aHTTP['http']['header']  = "Content-Type: application/json\r\nAccept: application/json\r\n\r\nChain-Rider: <TOKEN>\r\n";
    
    $context = stream_context_create($aHTTP);
    
    $response = file_get_contents($URL, false, $context);
    
    // Response example
    {
      "message": {
        "pairs": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                  "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD",
                  "IOTAUSD", "ZECUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
        "exchanges": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                      "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
        "exchange_pairs": {
            "BTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETCUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "LTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "DASHUSD": ["Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "BCHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "BTGUSD": ["Bitfinex", "HitBTC"],     
            "EOSUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken",
                       "Kucoin", "Poloniex"],
            "TRXUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "XMRUSD": ["Bitfinex", "HitBTC", "Kraken", "Poloniex"],
            "VETUSD": ["Binance", "Bitfinex", "Huobi", "Kucoin"],
            "IOTAUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi"],
            "ZECUSD": ["Bitfinex", "Gemini", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "TUSDUSD": ["Binance"],
            "NEOUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "ADAUSD": ["Binance", "HitBTC", "Huobi", "Kraken"]
        },
        "pairs_exchanges": {
            "Binance": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                        "TRXUSD", "VETUSD", "IOTAUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
            "Bitfinex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                         "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD", "IOTAUSD",
                         "ZECUSD", "NEOUSD"],
            "Bitstamp": ["BTCUSD", "ETHUSD", "LTCUSD", "BCHUSD"],
            "Coinbase": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD"],
            "Gemini": ["BTCUSD", "ETHUSD", "ZECUSD"],
            "HitBTC": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "BTGUSD",  "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD",
                       "ZECUSD", "NEOUSD"],
            "Huobi": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                      "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD", "ZECUSD", "NEOUSD",
                      "ADAUSD"],
            "Kraken": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "EOSUSD", "XMRUSD", "ZECUSD", "NEOUSD", "ADAUSD"],
            "Kucoin": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                       "TRXUSD", "VETUSD", "IOTAUSD", "NEOUSD", "ADAUSD"],
            "Poloniex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD",
                         "BCHUSD", "EOSUSD", "XMRUSD", "ZECUSD"]
        },
        "intervals_twap": [1, 5, 10, 15, 30, 60],
        "max_intervals_twap": {"1": 720, "5": 144, "10": 72,
                               "15": 48, "30": 24, "60": 12}
      }
    }
    ?>
    
    var headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Chain-Rider': '<TOKEN>'
    };
    
    $.ajax({
      url: 'https://api.chainrider.io/v1/finance/info/',
      method: 'get',
      headers: headers,
      success: function(data) {
        console.log(JSON.stringify(data));
      }
    });
    
    // Response example
    {
      "message": {
        "pairs": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                  "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD",
                  "IOTAUSD", "ZECUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
        "exchanges": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                      "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
        "exchange_pairs": {
            "BTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETCUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "LTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "DASHUSD": ["Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "BCHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "BTGUSD": ["Bitfinex", "HitBTC"],        
            "EOSUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken",
                       "Kucoin", "Poloniex"],
            "TRXUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "XMRUSD": ["Bitfinex", "HitBTC", "Kraken", "Poloniex"],
            "VETUSD": ["Binance", "Bitfinex", "Huobi", "Kucoin"],
            "IOTAUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi"],
            "ZECUSD": ["Bitfinex", "Gemini", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "TUSDUSD": ["Binance"],
            "NEOUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "ADAUSD": ["Binance", "HitBTC", "Huobi", "Kraken"]
        },
        "pairs_exchanges": {
            "Binance": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                        "TRXUSD", "VETUSD", "IOTAUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
            "Bitfinex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                         "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD", "IOTAUSD",
                         "ZECUSD", "NEOUSD"],
            "Bitstamp": ["BTCUSD", "ETHUSD", "LTCUSD", "BCHUSD"],
            "Coinbase": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD"],
            "Gemini": ["BTCUSD", "ETHUSD", "ZECUSD"],
            "HitBTC": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "BTGUSD",  "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD",
                       "ZECUSD", "NEOUSD"],
            "Huobi": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                      "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD", "ZECUSD", "NEOUSD",
                      "ADAUSD"],
            "Kraken": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "EOSUSD", "XMRUSD", "ZECUSD", "NEOUSD", "ADAUSD"],
            "Kucoin": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                       "TRXUSD", "VETUSD", "IOTAUSD", "NEOUSD", "ADAUSD"],
            "Poloniex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD",
                         "BCHUSD", "EOSUSD", "XMRUSD", "ZECUSD"]
        },
        "intervals_twap": [1, 5, 10, 15, 30, 60],
        "max_intervals_twap": {"1": 720, "5": 144, "10": 72,
                               "15": 48, "30": 24, "60": 12}
      }
    }
    
    require 'rest-client'
    require 'json'
    
    headers = {
      'Content-Type'=>'application/json',
      'Accept'=>'application/json',
      'Chain-Rider' => '<TOKEN>'
    }
    
    result = RestClient.get 'https://api.chainrider.io/v1/finance/info/',
             params: {}, headers: headers
    
    p JSON.parse(result)
    
    # Response example
    {
      "message": {
        "pairs": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                  "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD",
                  "IOTAUSD", "ZECUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
        "exchanges": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                      "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
        "exchange_pairs": {
            "BTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETCUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "LTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "DASHUSD": ["Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "BCHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "BTGUSD": ["Bitfinex", "HitBTC"]
            "EOSUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken",
                       "Kucoin", "Poloniex"],
            "TRXUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "XMRUSD": ["Bitfinex", "HitBTC", "Kraken", "Poloniex"],
            "VETUSD": ["Binance", "Bitfinex", "Huobi", "Kucoin"],
            "IOTAUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi"],
            "ZECUSD": ["Bitfinex", "Gemini", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "TUSDUSD": ["Binance"],
            "NEOUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "ADAUSD": ["Binance", "HitBTC", "Huobi", "Kraken"]
        },
        "pairs_exchanges": {
            "Binance": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                        "TRXUSD", "VETUSD", "IOTAUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
            "Bitfinex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                         "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD", "IOTAUSD",
                         "ZECUSD", "NEOUSD"],
            "Bitstamp": ["BTCUSD", "ETHUSD", "LTCUSD", "BCHUSD"],
            "Coinbase": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD"],
            "Gemini": ["BTCUSD", "ETHUSD", "ZECUSD"],
            "HitBTC": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "BTGUSD",  "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD",
                       "ZECUSD", "NEOUSD"],
            "Huobi": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                      "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD", "ZECUSD", "NEOUSD",
                      "ADAUSD"],
            "Kraken": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "EOSUSD", "XMRUSD", "ZECUSD", "NEOUSD", "ADAUSD"],
            "Kucoin": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                       "TRXUSD", "VETUSD", "IOTAUSD", "NEOUSD", "ADAUSD"],
            "Poloniex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD",
                         "BCHUSD", "EOSUSD", "XMRUSD", "ZECUSD"]
        },
        "intervals_twap": [1, 5, 10, 15, 30, 60],
        "max_intervals_twap": {"1": 720, "5": 144, "10": 72,
                               "15": 48, "30": 24, "60": 12}
      }
    }
    
    import requests
    
    headers = {
      'Content-Type':'application/json',
      'Accept':'application/json',
      'Chain-Rider': '<TOKEN>'
    }
    
    r = requests.get('https://api.chainrider.io/v1/finance/info/',
                      params={}, headers = headers)
    
    print r.json()
    
    # Response example
    {
      "message": {
        "pairs": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                  "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD",
                  "IOTAUSD", "ZECUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
        "exchanges": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                      "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
        "exchange_pairs": {
            "BTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETCUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "LTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "DASHUSD": ["Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "BCHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "BTGUSD": ["Bitfinex", "HitBTC"],       
            "EOSUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken",
                       "Kucoin", "Poloniex"],
            "TRXUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "XMRUSD": ["Bitfinex", "HitBTC", "Kraken", "Poloniex"],
            "VETUSD": ["Binance", "Bitfinex", "Huobi", "Kucoin"],
            "IOTAUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi"],
            "ZECUSD": ["Bitfinex", "Gemini", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "TUSDUSD": ["Binance"],
            "NEOUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "ADAUSD": ["Binance", "HitBTC", "Huobi", "Kraken"]
        },
        "pairs_exchanges": {
            "Binance": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                        "TRXUSD", "VETUSD", "IOTAUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
            "Bitfinex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                         "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD", "IOTAUSD",
                         "ZECUSD", "NEOUSD"],
            "Bitstamp": ["BTCUSD", "ETHUSD", "LTCUSD", "BCHUSD"],
            "Coinbase": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD"],
            "Gemini": ["BTCUSD", "ETHUSD", "ZECUSD"],
            "HitBTC": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "BTGUSD",  "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD",
                       "ZECUSD", "NEOUSD"],
            "Huobi": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                      "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD", "ZECUSD", "NEOUSD",
                      "ADAUSD"],
            "Kraken": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "EOSUSD", "XMRUSD", "ZECUSD", "NEOUSD", "ADAUSD"],
            "Kucoin": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                       "TRXUSD", "VETUSD", "IOTAUSD", "NEOUSD", "ADAUSD"],
            "Poloniex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD",
                         "BCHUSD", "EOSUSD", "XMRUSD", "ZECUSD"]
        },
        "intervals_twap": [1, 5, 10, 15, 30, 60],
        "max_intervals_twap": {"1": 720, "5": 144, "10": 72,
                               "15": 48, "30": 24, "60": 12}
      }
    }
    
    URL obj = new URL("https://api.chainrider.io/v1/finance/info/");
    HttpURLConnection con = (HttpURLConnection) obj.openConnection();
    con.setRequestProperty("Accept", "application/json");
    con.setRequestProperty("Content-Type", "application/json");
    con.setRequestProperty("Chain-Rider", "<TOKEN>");
    con.setRequestMethod("GET");
    int responseCode = con.getResponseCode();
    BufferedReader in = new BufferedReader(
        new InputStreamReader(con.getInputStream()));
    String inputLine;
    StringBuffer response = new StringBuffer();
    while ((inputLine = in.readLine()) != null) {
        response.append(inputLine);
    }
    in.close();
    System.out.println(response.toString());
    
    // Response example
    {
      "message": {
        "pairs": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                  "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD",
                  "IOTAUSD", "ZECUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
        "exchanges": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                      "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
        "exchange_pairs": {
            "BTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETCUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "LTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "DASHUSD": ["Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "BCHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "BTGUSD": ["Bitfinex", "HitBTC"],
            "EOSUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken",
                       "Kucoin", "Poloniex"],
            "TRXUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "XMRUSD": ["Bitfinex", "HitBTC", "Kraken", "Poloniex"],
            "VETUSD": ["Binance", "Bitfinex", "Huobi", "Kucoin"],
            "IOTAUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi"],
            "ZECUSD": ["Bitfinex", "Gemini", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "TUSDUSD": ["Binance"],
            "NEOUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "ADAUSD": ["Binance", "HitBTC", "Huobi", "Kraken"]
        },
        "pairs_exchanges": {
            "Binance": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                        "TRXUSD", "VETUSD", "IOTAUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
            "Bitfinex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                         "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD", "IOTAUSD",
                         "ZECUSD", "NEOUSD"],
            "Bitstamp": ["BTCUSD", "ETHUSD", "LTCUSD", "BCHUSD"],
            "Coinbase": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD"],
            "Gemini": ["BTCUSD", "ETHUSD", "ZECUSD"],
            "HitBTC": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "BTGUSD",  "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD",
                       "ZECUSD", "NEOUSD"],
            "Huobi": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                      "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD", "ZECUSD", "NEOUSD",
                      "ADAUSD"],
            "Kraken": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "EOSUSD", "XMRUSD", "ZECUSD", "NEOUSD", "ADAUSD"],
            "Kucoin": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                       "TRXUSD", "VETUSD", "IOTAUSD", "NEOUSD", "ADAUSD"],
            "Poloniex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD",
                         "BCHUSD", "EOSUSD", "XMRUSD", "ZECUSD"]
        },
        "intervals_twap": [1, 5, 10, 15, 30, 60],
        "max_intervals_twap": {"1": 720, "5": 144, "10": 72,
                               "15": 48, "30": 24, "60": 12}
      }
    }
    

    Data Objects

    Token Usage Object

    Name Type Description
    message JSON Message object containing token usage data.
    hour Usage Object Provides info regarding API usage, for the current hour.
    day Usage Object Provides info regarding API usage, for the current day.
    forward Usage Object Provides info regarding payment forward API usage, for the current month.

    Example

    {
      "message":{
          "hour":{
              "usage":2,
              "limit":300,
              "time_left":1857
          },
          "day":{
              "usage":2,
              "limit":3000,
              "time_left":34257
          },
          "forward":{
              "usage":0,
              "limit":3,
              "time_left":1675857
          }
      }
    }
    

    Usage Object

    Name Type Description
    usage Integer Number of API calls within the corresponding time period.
    limit Integer Total number of available API calls within the corresponding time period.
    time_left Integer Seconds until the counter restarts and usage is reset.

    Example

    {
      "usage":2,
      "limit":300,
      "time_left":1857
    }
    

    VWAP Object

    Name Type Description
    pair String The digital asset you requested VWAP for. See Supported Pairs
    upper_unix Integer Upper time range in seconds. See Unix Timestamp
    lower_unix Integer Lower time range in seconds.
    vwap Float Volume weighted average price in USD.
    analytics Analytics Object Includes total number of data points used in the VWAP calculation, and amount for each individual exchange.

    Example

    {
        "message": {
            "pair": "BTCUSD",
            "upper_unix": 1535466227,
            "lower_unix": 1535466002,
            "vwap": 7064.24,
            "analytics": {
                "data_points": 1153,
                "exchange_data": {
                    "Bitfinex": 289,
                    "Kucoin": 12,
                    "Binance": 852
                }
            }
        }
    }
    

    Analytics Object

    Name Type Description
    data_points Integer Total number of data points used for the calculation. A single data point would include the volume of a trade, and the price point for that trade.
    exchange_data JSON All exchanges that were part of the original request will be listed as keys, in which the value indicates the number of distinct trades gathered from that exchange and used accordingly in the calculation.

    Example

    {
      "data_points": 1153,
      "exchange_data": {
          "Bitfinex": 289,
          "Kucoin": 12,
          "Binance": 852
        }
    }
    

    WebSocket Welcome Object

    Name Type Description
    message String Welcome message upon successful connection

    Example

    {
      "message": "Welcome to ChainRider VWAP websockets"
    }
    

    WebSocket VWAP Object

    Name Type Description
    message JSON Message object containing array of VWAP JSON objects for each specified pair in the stream.
    pair String The digital asset you requested VWAP for. See Supported Pairs
    upper_unix Integer Upper time range in seconds. See Unix Timestamp
    lower_unix Integer Lower time range in seconds.
    vwap Float Volume weighted average price in USD.
    difference Float Difference between current VWAP and VWAP for the previous interval expressed in percentage. It could be positive (indicating the price has gone up for X% compared to the same interval) or negative value (indicating that the price has gone down for X% compared to the same interval). Example if we have requested VWAP for BTC for interval of 1h, and we receive difference: 1.53, it means that the price for last hour has gone up for 1.53% compared to an hour before that. In case we request VWAP for interval of 1 minute, difference will indicate compraration between the price for the last minute and one minute before that.

    Example

    {
      "message": [
          {"pair": "BTCUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 6367.78, "difference": 0.21},
          {"pair": "ETHUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 198.48, "difference": 0.01},
          {"pair": "ETCUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 9.05, "difference": 0.11},
          {"pair": "LTCUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 50.02, "difference": -0.02},
          {"pair": "DASHUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 152.92, "difference": 0.03},
          {"pair": "BCHUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 425.62, "difference": 0.03},
          {"pair": "BTGUSD", "lower_unix": 1541066704, "upper_unix": 1541066764, "vwap": 26.51, "difference": 0.0}
      ]
    }
    

    WebSocket Error Object

    Name Type Description
    error String Error message. List of possible error messages is given in the table below.

    Example

    {
      "error": "Unknown user."
    }
    
    Error
    Token missing.
    Token invalid.
    Unknown user.
    Please activate token in order to use ChainRider websockets.
    You have exceeded number of possible connections. Please upgrade current plan
    You have unsupported pairs in request "REQUESTED_PAIRS_ARRAY"

    Volume Exchange Object

    Name Type Description
    exchange String The exchange requested. See Supported Exchanges
    volume_data JSON Keys indicate the pairs on an exchange, while their values represent the volume traded in BTC, ETH, etc.
    upper_unix Integer Upper time range in seconds. See Unix Timestamp
    lower_unix Integer Lower time range in seconds.

    Example

    {
        "message": {
            "exchange": "Bitfinex",
            "volume_data": {
                "BTCUSD": 52.3741,
                "ETHUSD": 683.7672,
                "ETCUSD": 2045.4391,
                "LTCUSD": 413.115,
                "DASHUSD": 22.1823
            },
            "upper_unix": 1535466227,
            "lower_unix": 1535466026
        }
    }
    

    Volume Pair Object

    Name Type Description
    pair String The asset pair you requested volume for. See Supported Pairs
    volume_data JSON Keys indicate an exchange, while their values represent the volume traded for whichever pair you supplied. BTC, ETH, etc.
    upper_unix Integer Upper time range in seconds. See Unix Timestamp
    lower_unix Integer Lower time range in seconds.

    Example

    {
        "message": {
            "pair": "BTCUSD",
            "volume_data": {
                "Binance": 408.6127,
                "Bitfinex": 0,
                "Bitstamp": 0,
                "Coinbase": 0,
                "Gemini": 0.5026,
                "HitBTC": 34.49,
                "Huobi": 300.8407,
                "Kraken": 7.5747,
                "Kucoin": 0.4886,
                "Poloniex": 17.8651
            },
            "upper_unix": 1535989565,
            "lower_unix": 1535988565
        }
    }
    

    TWAP Object

    TWAP object comprises all intervals you have requested where the key of the interval is the start unix_time of the interval. Each interval provides info about typical price and TWAP.

    Name Type Description
    typical_price Float Typical price: (Open + High + Low + Close) / 4
    twap Float TWAP price: (Sum of Typical Price) / (# of Intervals)

    Example

    {
        "message": {
            "1537175340": {
                "typical_price": 11.09,
                "twap": 11.09
            },
            "1537175940": {
                "typical_price": 11.09,
                "twap": 11.09
            },
            "1537176540": {
                "typical_price": 11.15,
                "twap": 11.11
            },
            "1537177140": {
                "typical_price": 11.17,
                "twap": 11.12
            },
            "1537177740": {
                "typical_price": 11.16,
                "twap": 11.13
            }
        }
    }
    

    Info Object

    Name Type Description
    pairs Array of Strings All asset pairs supported by ChainRider.
    exchanges Array of Strings All exchanges supported by ChainRider.
    exchange_pairs JSON Valid exchanges for all supported pairs.
    pairs_exchanges JSON Valid pairs for all supported exchanges.
    intervals_twap JSON Valid intervals for a TWAP calculation, in minutes.
    max_intervals_twap JSON Maximum number of intervals which can be returned, for a given interval duration.

    Example

    {
      "message": {
        "pairs": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                  "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD",
                  "IOTAUSD", "ZECUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
        "exchanges": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                      "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
        "exchange_pairs": {
            "BTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase",
                       "Gemini", "HitBTC", "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "ETCUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "LTCUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "DASHUSD": ["Bitfinex", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "BCHUSD": ["Binance", "Bitfinex", "Bitstamp", "Coinbase", "HitBTC",
                       "Huobi", "Kraken", "Kucoin", "Poloniex"],
            "BTGUSD": ["Bitfinex", "HitBTC"],
    
            "EOSUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kraken",
                       "Kucoin", "Poloniex"],
            "TRXUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "XMRUSD": ["Bitfinex", "HitBTC", "Kraken", "Poloniex"],
            "VETUSD": ["Binance", "Bitfinex", "Huobi", "Kucoin"],
            "IOTAUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi"],
            "ZECUSD": ["Bitfinex", "Gemini", "HitBTC", "Huobi", "Kraken", "Poloniex"],
            "TUSDUSD": ["Binance"],
            "NEOUSD": ["Binance", "Bitfinex", "HitBTC", "Huobi", "Kucoin"],
            "ADAUSD": ["Binance", "HitBTC", "Huobi", "Kraken"]
        },
        "pairs_exchanges": {
            "Binance": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                        "TRXUSD", "VETUSD", "IOTAUSD", "TUSDUSD", "NEOUSD", "ADAUSD"],
            "Bitfinex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                         "BTGUSD", "EOSUSD", "TRXUSD", "XMRUSD", "VETUSD", "IOTAUSD",
                         "ZECUSD", "NEOUSD"],
            "Bitstamp": ["BTCUSD", "ETHUSD", "LTCUSD", "BCHUSD"],
            "Coinbase": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD"],
            "Gemini": ["BTCUSD", "ETHUSD", "ZECUSD"],
            "HitBTC": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "BTGUSD",  "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD",
                       "ZECUSD", "NEOUSD"],
            "Huobi": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                      "EOSUSD", "TRXUSD", "XMRUSD", "IOTAUSD", "ZECUSD", "NEOUSD",
                      "ADAUSD"],
            "Kraken": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD", "BCHUSD",
                       "EOSUSD", "XMRUSD", "ZECUSD", "NEOUSD", "ADAUSD"],
            "Kucoin": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "BCHUSD", "EOSUSD",
                       "TRXUSD", "VETUSD", "IOTAUSD", "NEOUSD", "ADAUSD"],
            "Poloniex": ["BTCUSD", "ETHUSD", "ETCUSD", "LTCUSD", "DASHUSD",
                         "BCHUSD", "EOSUSD", "XMRUSD", "ZECUSD"]
        },
        "intervals_twap": [1, 5, 10, 15, 30, 60],
        "max_intervals_twap": {"1": 720, "5": 144, "10": 72,
                               "15": 48, "30": 24, "60": 12}
      }
    }
    

    Error Object

    Name Type Description
    error JSON Contains a description of the error for certain API parameters, or a general description of the error.

    Example

    {
        "error": {
            "pair": [
                "Bad Request [Invalid pair BTCCUSD provided. Only use ['BTCUSD', 'ETHUSD', 'ETCUSD', 'LTCUSD', 'DASHUSD']]"
            ],
            "exchanges": [
                "Bad Request [Invalid exchange provided {'Bitffinex'} -- valid exchanges for BTCCUSD: {'BTCUSD': ['Binance', 'Bitfinex', 'Bitstamp', 'Coinbase', 'Gemini', 'HitBTC', 'Huobi', 'Kraken', 'Kucoin', 'Poloniex'], 'ETHUSD': ['Binance', 'Bitfinex', 'Bitstamp', 'Coinbase', 'Gemini', 'HitBTC', 'Huobi', 'Kraken', 'Kucoin', 'Poloniex'], 'ETCUSD': ['Binance', 'Bitfinex', 'HitBTC', 'Huobi', 'Kraken', 'Poloniex'], 'LTCUSD': ['Binance', 'Bitfinex', 'Bitstamp', 'Coinbase', 'HitBTC', 'Huobi', 'Kraken', 'Kucoin', 'Poloniex'], 'DASHUSD': ['Bitfinex', 'HitBTC', 'Huobi', 'Kraken', 'Poloniex']}"
            ]
        }
    }
    

    Errors

    ChainRider Finance uses the following error codes:

    Error Code Meaning
    400 Bad Request
    401 Unauthorized -- Your API token is wrong.
    403 Forbidden -- You do not have access to the requested resource, or too many requests.
    404 Not Found -- The specified resource could not be found.
    500 Internal Server Error -- We had a problem with our server. Try again later.
    503 Service Unavailable -- We're temporarily offline for maintenance. Please try again later.

    Support

    In case you have any integration related questions, please contact us at support@vizlore.com. In order to expedite and facilitate the troubleshooting process, please provide us with any relevant information such as your username, code samples, exact API calls, returned response from our API, error messages, API call date and time, etc.