NAV Navbar
shell python C# php ruby java
  • Introduction
  • General
  • Trades
  • Quotes
  • OHLCV
  • Errors
  • Introduction

    Authorization

    There are 2 methods for passing the API key to us, you only need to use one:

    Authorization header

    curl http://api.bitdataset.com/v1/exchanges
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/exchanges'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/exchanges");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/exchanges');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/exchanges")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/exchanges")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    You can authorize by providing additional custom header named apikey and API key as its value.

    curl http://api.bitdataset.com/v1/exchanges -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"

    The above command returns JSON structured like this:

    ["poloniex","bitfinex","coinbasepro","bitstamp","hitbtc","okex","okex_f","bitmex","binance"]
    

    Query string authorization parameter

    Also you can authorize by providing an additional parameter named apikey with a value equal to your API key in the query string of your HTTP request.

    GET http://api.bitdataset.com/v1/exchanges?apikey=11034021-DDDD-AAAA-8A00-E0F138111F22

    Request limits

    X-RateLimit-Limit: 100
    X-RateLimit-Remaining: 49
    X-RateLimit-Request-Cost: 2
    X-RateLimit-Reset: 2018-08-03 00:00:00
    

    Any authenticated endpoint will provide (in HTTP response headers) informations about the request limits associated with API Key.

    HTTP Header Type Description
    X-RateLimit-Limit int Request limit allocated in the time window.
    X-RateLimit-Remaining int The number of requests left for the time window.
    X-RateLimit-Request-Cost int The number of requests used to generate current HTTP response.
    X-RateLimit-Reset timestring The remaining window before the rate limit resets

    Output format

    By default, the response comes in json format, time have ISO 8601 format (e.g. 2018-05-05T10:00:00.336), and response ascending ordered by time. But you can change the output format via the following parameters:

    Parameter Description
    output_format csv or json (json by default)
    output_time_format About time format here (yyyy-MM-ddTHH:mm:ss.SSSX by default)
    output_sort_order asc or desc (asc by default)
    csv_set_delimiter If choosed the CSV format, you can specify a delimiter. (; by default)
    csv_include_header If choosed the CSV format, you can specify include a header in the output or not. true or false (true by default)
    csv_set_newline If choosed the CSV format, you can specify newline format. win (\r\n) or unix (\n) (unix by default)

    Output time format

    Format Example
    yyyy-MM-ddTHH:mm:ss.SSSX 2018-05-07T23:45:00.000Z (default)
    yyyy-MM-dd HH:mm:ss.SSS 2018-05-07 23:45:00.000
    yyyy/MM/dd HH:mm:ss.SSS 2018/05/07 23:45:00.000
    epoch_timestamp 1525736700000

    General

    Exchanges

    curl http://api.bitdataset.com/v1/exchanges
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/exchangess'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/exchanges");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/exchanges');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/exchanges")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/exchanges")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    You can authorize by providing additional custom header named apikey and API key as its value.

    curl http://api.bitdataset.com/v1/exchanges -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"

    Query string authorization parameter

    The above command returns JSON structured like this:

    ["poloniex","bitfinex","coinbasepro","bitstamp","hitbtc","okex","okex_f","bitmex","binance"]
    

    GET http://api.bitdataset.com/v1/exchanges

    Return list of all exchanges

    Symbols

    curl http://api.bitdataset.com/v1/symbols?exchange=bitfinex&filter=CBTC
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/symbols?exchange=bitfinex&filter=CBTC'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/symbols?exchange=bitfinex&filter=CBTC");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/symbols?exchange=bitfinex&filter=CBTC');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/symbols?exchange=bitfinex&filter=CBTC")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/symbols?exchange=bitfinex&filter=CBTC")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    The above command returns JSON structured like this:

    ["bitfinex:LTCBTC","bitfinex:ETCBTC","bitfinex:RLCBTC","bitfinex:ZECBTC"]
    

    Return paits {symbol}

    GET http://api.bitdataset.com/v1/symbols

    URL Parameters

    Parameter Description
    exchange Our exchange identifier (optional, all exchanges avialable here)
    filter Instrument filter. If parameter is specified, returns instruments only contains this text (optional)

    Trades

    This section describes calls related to executed transactions data, also known as matched orders data or active data

    Trades Historical Data

    curl http://api.bitdataset.com/v1/trades/history/BITFINEX:BTCUSD?start=2018-05-05T10:00:00.336&limit=3
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/trades/history/BITFINEX:BTCUSD?start=2018-05-05T10:00:00.336&limit=3'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/trades/history/BITFINEX:BTCUSD?start=2018-05-05T10:00:00.336&limit=3");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/trades/history/BITFINEX:BTCUSD?start=2018-05-05T10:00:00.336&limit=3');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/trades/history/BITFINEX:BTCUSD?start=2018-05-05T10:00:00.336&limit=3")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/trades/history/BITFINEX:BTCUSD?start=2018-05-05T10:00:00.336&limit=3")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    The above command returns JSON structured like this:

    [
    {"time":"2018-05-05T10:00:00.370Z","price":9853.7,"size":0.05,"side":"S","tradeId":"239539434","localTime":"2018-05-05T10:00:00.412Z"},
    {"time":"2018-05-05T10:00:00.375Z","price":9853.6,"size":0.05,"side":"S","tradeId":"239539435","localTime":"2018-05-05T10:00:00.413Z"},
    {"time":"2018-05-05T10:00:00.936Z","price":9853.7,"size":0.0676,"side":"S","tradeId":"239539439","localTime":"2018-05-05T10:00:00.996Z"}
    ]
    

    Get Trades

    GET http://api.bitdataset.com/v1/trades/history/{symbol}?start={start}&end={end}&limit={limit}

    URL Parameters

    Parameter Description
    symbols Our symbols identifier (all symbols avialable here)
    start Starting time in ISO 8601 (e.g. 2018-05-05T10:00:00.336) or Timestamp in milliseconds (e.g. 1525514400336) (required)
    end Ending time in ISO 8601. e.g. 2018-05-05T10:00:00.336 (optional)
    limit Amount of items to return. 100 by default. (optional, if the parameter is used then every 100 output items are counted as one request)

    output variables

    Parameter Description
    time Time of trade reported by exchange in ISO 8601. e.g. 2018-05-05T10:00:00.336 (or other format specified by the parameter output_time_format)
    localTime Local BitDataset time when trade received from exchange
    price Price of the transaction
    size Base asset amount traded in the transaction
    side Aggressor side of the transaction ("B" - buy / "S" - sell / "BE" - buy estimated / "SE" - sell estimated / "U" - unknown)
    tradeId Identifier of trade

    Trades Latest Data

    curl http://api.bitdataset.com/v1/trades/latest/BITFINEX:BTCUSD?from=2018-05-08T22:00:00&limit=3
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/trades/latest/BITFINEX:BTCUSD?from=2018-05-08T22:00:00&limit=3'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/trades/latest/BITFINEX:BTCUSD?from=2018-05-08T22:00:00&limit=3");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/trades/latest/BITFINEX:BTCUSD?from=2018-05-08T22:00:00&limit=3');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/trades/latest/BITFINEX:BTCUSD?from=2018-05-08T22:00:00&limit=3")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/trades/latest/BITFINEX:BTCUSD?from=2018-05-08T22:00:00&limit=3")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    The above command returns JSON structured like this:

    [
    {"time":"2018-05-08T21:59:58.738Z","price":9185.5,"size":0.062803,"side":"B","tradeId":"241613218","localTime":"2018-05-08T21:59:58.812Z"},
    {"time":"2018-05-08T21:59:58.739Z","price":9185.5,"size":0.1310018,"side":"B","tradeId":"241613219","localTime":"2018-05-08T21:59:58.812Z"},
    {"time":"2018-05-08T21:59:58.741Z","price":9185.5,"size":0.08811186,"side":"B","tradeId":"241613220","localTime":"2018-05-08T21:59:58.812Z"}
    ]
    

    Get latest trades

    GET http://api.bitdataset.com/v1/trades/latest/{symbol}?from={from}&limit={limit}

    URL Parameters

    Parameter Description
    symbols Our symbols identifier (all symbols avialable here)
    from Get latest trades from this time in ISO 8601 (e.g. 2018-05-05T10:00:00.336) or timestamp in milliseconds (e.g. 1525514400336) (optional)
    limit Amount of items to return. 100 by default. (optional, if the parameter is used then every 100 output items are counted as one request)

    output variables

    Parameter Description
    time Time of trade reported by exchange in ISO 8601. e.g. 2018-05-05T10:00:00.336 (or other format specified by the parameter output_time_format)
    localTime Local BitDataset time when trade received from exchange
    price Price of the transaction
    size Base asset amount traded in the transaction
    side Aggressor side of the transaction ("B" - buy / "S" - sell / "BE" - buy estimated / "SE" - sell estimated / "U" - unknown)
    tradeId Identifier of trade

    Quotes

    This section describes calls related to quotes data, also known as quotes or passive level 1 data.

    Quotes Current Data

    curl http://api.bitdataset.com/v1/quotes/current/?symbols=okex:BTCUSDT
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/quotes/current/?symbols=okex:BTCUSDT'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/quotes/current/?symbols=okex:BTCUSDT");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/quotes/current/?symbols=okex:BTCUSDT');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/quotes/current/?symbols=okex:BTCUSDT")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/quotes/current/?symbols=okex:BTCUSDT")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    The above command returns JSON structured like this:

    [
      {"quote":{
        "time":"2018-12-12T14:36:53.441Z",
        "localTime":"2018-12-12T14:36:53.581Z",
        "bid":3432.3603,
        "ask":3433.8521,
        "bidSize":0.01002168,
        "askSize":0.459
        },
      "lastTrade":{
        "time":"2018-12-12T14:36:52.592Z",
        "price":3432.3601,
        "size":0.00766012,
        "side":"S",
        "tradeId":"720276636",
        "localTime":"2018-12-12T14:36:52.592Z"
        },
      "symbol":"okex:BTCUSDT"}
    ]
    

    Get current data for specified symbols

    1. GET http://api.bitdataset.com/v1/quotes/current/?symbols={symbol}
    2. GET http://api.bitdataset.com/v1/quotes/current/{symbol}

    URL Parameters

    Parameter Description
    symbols Comma delimited symbols identifiers (all symbols avialable here)

    output variables

    Parameter Description
    time Time of trade reported by exchange in ISO 8601. e.g. 2018-05-05T10:00:00.336 (or other format specified by the parameter output_time_format)
    localTime Local BitDataset time when quote received from exchange
    bid Best bidding price
    ask Best asking price
    bidSize Volume resting on best bid
    askSize Volume resting on best ask
    price Price of the transaction
    size Base asset amount traded in the transaction
    side Aggressor side of the transaction ("B" - buy / "S" - sell / "BE" - buy estimated / "SE" - sell estimated / "U" - unknown)
    tradeId Identifier of trade
    symbol Our symbol identifier

    Quotes Historical Data

    curl http://api.bitdataset.com/v1/quotes/history/BITFINEX:BTCUSD?start=2018-06-08&end=2018-06-09&limit=3
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/quotes/history/BITFINEX:BTCUSD?start=2018-06-08&end=2018-06-09&limit=3'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/quotes/history/BITFINEX:BTCUSD?start=2018-06-08&end=2018-06-09&limit=3");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/quotes/history/BITFINEX:BTCUSD?start=2018-06-08&end=2018-06-09&limit=3');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/quotes/history/BITFINEX:BTCUSD?start=2018-06-08&end=2018-06-09&limit=3")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/quotes/history/BITFINEX:BTCUSD?start=2018-06-08&end=2018-06-09&limit=3")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    The above command returns JSON structured like this:

    [
    {"time":"2018-06-08T00:00:02.920Z","localTime":"2018-06-08T00:00:02.920Z","bid":7688.9,"ask":7689.0,"bidSize":0.101204,"askSize":1.34363176},
    {"time":"2018-06-08T00:00:04.413Z","localTime":"2018-06-08T00:00:04.413Z","bid":7688.9,"ask":7689.0,"bidSize":0.101204,"askSize":2.14363175},
    {"time":"2018-06-08T00:00:04.766Z","localTime":"2018-06-08T00:00:04.766Z","bid":7688.9,"ask":7689.0,"bidSize":0.101204,"askSize":5.14363175}
    ]
    

    Get Quotes

    GET http://api.bitdataset.com/v1/quotes/history/{symbol}?start={start}&end={end}&limit={limit}

    URL Parameters

    Parameter Description
    symbols Our symbols identifier (all symbols avialable here)
    start Starting time in in ISO 8601 (e.g. 2018-05-05T10:00:00.336) or timestamp in milliseconds (e.g. 1525514400336) (required)
    end Ending time in ISO 8601 (e.g. 2018-05-05T10:00:00.336) or timestamp in milliseconds (e.g. 1525514400336) (optional)
    limit Amount of items to return. 100 by default. (optional, if the parameter is used then every 100 output items are counted as one request)

    output variables

    Parameter Description
    time Time of trade reported by exchange in ISO 8601. e.g. 2018-05-05T10:00:00.336 (or other format specified by the parameter output_time_format)
    localTime Local BitDataset time when quote received from exchange
    bid Best bidding price
    ask Best asking price
    bidSize Volume resting on best bid
    askSize Volume resting on best ask

    Trades Latest Data

    curl http://api.bitdataset.com/v1/quotes/latest/BITFINEX:BTCUSD?from=2018-06-08T22:00:00&limit=3
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/quotes/latest/BITFINEX:BTCUSD?from=2018-06-08T22:00:00&limit=3'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/quotes/latest/BITFINEX:BTCUSD?from=2018-06-08T22:00:00&limit=3");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/quotes/latest/BITFINEX:BTCUSD?from=2018-06-08T22:00:00&limit=3');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/quotes/latest/BITFINEX:BTCUSD?from=2018-06-08T22:00:00&limit=3")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/quotes/latest/BITFINEX:BTCUSD?from=2018-06-08T22:00:00&limit=3")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    The above command returns JSON structured like this:

    [
    {"time":"2018-06-08T21:59:59.825Z","localTime":"2018-06-08T21:59:59.825Z","bid":7654.3,"ask":7656.9,"bidSize":0.673,"askSize":0.2},
    {"time":"2018-06-08T21:59:59.825Z","localTime":"2018-06-08T21:59:59.825Z","bid":7654.6,"ask":7656.9,"bidSize":0.8520758,"askSize":0.2},
    {"time":"2018-06-08T21:59:59.825Z","localTime":"2018-06-08T21:59:59.825Z","bid":7654.6,"ask":7656.1,"bidSize":0.8520758,"askSize":0.01}
    ]
    

    Get latest quotes

    GET http://api.bitdataset.com/v1/quotes/latest/{symbol}?from={from}&limit={limit}

    URL Parameters

    Parameter Description
    symbols Our symbols identifier (all symbols avialable here)
    from Get latest trades from this time in in ISO 8601 (e.g. 2018-05-05T10:00:00.336) or timestamp in milliseconds (e.g. 1525514400336) (optional)
    limit Amount of items to return. 100 by default. (optional, if the parameter is used then every 100 output items are counted as one request)

    output variables

    Parameter Description
    time Time of trade reported by exchange in ISO 8601. e.g. 2018-05-05T10:00:00.336 (or other format specified by the parameter output_time_format)
    localTime Local BitDataset time when quote received from exchange
    bid Best bidding price
    ask Best asking price
    bidSize Volume resting on best bid
    askSize Volume resting on best ask

    OHLCV

    API calls described in this section are related to downloading OHLCV (Open, High, Low, Close, Volume) timeseries data.

    OHLCV Periods

    curl http://api.bitdataset.com/v1/ohlcv/periods
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/ohlcv/periods'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/ohlcv/periods");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/ohlcv/periods');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/ohlcv/periods")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/ohlcv/periods")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    The above command returns JSON structured like this:

    [
        "S5",
        "M5",
        "M6",
        "M10",
        "M15",
        "H1",
        "H12",
        "D1"
    ]
    

    Get available OHLCV periods

    GET http://api.bitdataset.com/v1/ohlcv/periods

    Return list of all OHLCV periods

    OHLCV Historical Data

    curl http://api.bitdataset.com/v1/ohlcv/history/BITFINEX:BTCUSD?period=m5&start=2018-05-08&end=2018-05-09&limit=3
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/ohlcv/history/BITFINEX:BTCUSD?period=m5&start=2018-05-08&end=2018-05-09&limit=3'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/ohlcv/history/BITFINEX:BTCUSD?period=m5&start=2018-05-08&end=2018-05-09&limit=3");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/ohlcv/history/BITFINEX:BTCUSD?period=m5&start=2018-05-08&end=2018-05-09&limit=3');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/ohlcv/history/BITFINEX:BTCUSD?period=m5&start=2018-05-08&end=2018-05-09&limit=3")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/ohlcv/history/BITFINEX:BTCUSD?period=m5&start=2018-05-08&end=2018-05-09&limit=3")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    The above command returns JSON structured like this:

    [
    {"time":"2018-05-08T00:00:00.000Z","open":9370.0,"high":9378.0,"low":9353.3,"close":9378.0,"volume":70.67701577},
    {"time":"2018-05-08T00:05:00.000Z","open":9378.0,"high":9391.2,"low":9376.6,"close":9376.7,"volume":57.07987059000003},
    {"time":"2018-05-08T00:10:00.000Z","open":9376.7,"high":9376.7,"low":9371.1,"close":9371.2,"volume":24.082443409999996}
    ]
    

    Get OHLCV

    GET http://api.bitdataset.com/v1/ohlcv/history/{symbol}?period={period}&start={start}&end={end}&limit={limit}

    URL Parameters

    Parameter Description
    symbols Our symbols identifier (all symbols avialable here)
    period Identifier of requested period (all periods avialable here (required)
    start Starting time in in ISO 8601 (e.g. 2018-05-05T10:00:00.336) or timestamp in milliseconds (e.g. 1525514400336) (required)
    end Ending time in in ISO 8601 (e.g. 2018-05-05T10:00:00.336) or timestamp in milliseconds (e.g. 1525514400336) (optional)
    limit Amount of items to return. 100 by default. (optional, if the parameter is used then every 100 output items are counted as one request)

    output variables

    Parameter Description
    time Time of bar in ISO 8601. e.g. 2018-05-05T10:00:00.336 (or other format specified by the parameter output_time_format)
    open First trade price inside period range
    high Highest traded price inside period range
    low Lowest traded price inside period range
    close Last trade price inside period range
    volume Cumulative base amount traded inside period range

    OHLCV Latest Data

    curl http://api.bitdataset.com/v1/ohlcv/latest/BITFINEX:BTCUSD?period=m5&from=2018-05-08&limit=3
      -H "apikey: 11034021-DDDD-AAAA-8A00-E0F138111F22"
    
    import requests
    url = 'http://api.bitdataset.com/v1/ohlcv/latest/BITFINEX:BTCUSD?period=m5&from=2018-05-08&limit=3'
    headers = {'apikey' : '11034021-DDDD-AAAA-8A00-E0F138111F22'}
    response = requests.get(url, headers=headers)
    
    
    var client = new RestClient("http://api.bitdataset.com/v1/ohlcv/latest/BITFINEX:BTCUSD?period=m5&from=2018-05-08&limit=3");
    var request = new RestRequest(Method.GET);
    request.AddHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22");
    IRestResponse response = client.Execute(request);
    
    
    <?php
    $request = new HttpRequest();
    $request->setUrl('http://api.bitdataset.com/v1/ohlcv/latest/BITFINEX:BTCUSD?period=m5&from=2018-05-08&limit=3');
    $request->setMethod(HTTP_METH_GET);
    $request->setHeaders(array(
      'apikey' => '11034021-DDDD-AAAA-8A00-E0F138111F22'
    ));
    
    try {
      $response = $request->send();
      echo $response->getBody();
    } catch (HttpException $ex) {
      echo $ex;
    }
    ?>
    
    
    require 'uri'
    require 'net/http'
    
    url = URI("http://api.bitdataset.com/v1/ohlcv/latest/BITFINEX:BTCUSD?period=m5&from=2018-05-08&limit=3")
    http = Net::HTTP.new(url.host, url.port)
    request = Net::HTTP::Get.new(url)
    request["apikey"] = '11034021-DDDD-AAAA-8A00-E0F138111F22'
    response = http.request(request)
    puts response.read_body
    
    
    
    OkHttpClient client = new OkHttpClient();
    
    Request request = new Request.Builder()
      .url("http://api.bitdataset.com/v1/ohlcv/latest/BITFINEX:BTCUSD?period=m5&from=2018-05-08&limit=3")
      .post(body)
      .addHeader("apikey", "11034021-DDDD-AAAA-8A00-E0F138111F22")
      .build();
    
    Response response = client.newCall(request).execute();
    
    

    The above command returns JSON structured like this:

    [
    {"time":"2018-05-07T23:45:00.000Z","open":9358.0,"high":9358.0,"low":9344.0,"close":9344.3,"volume":14.132118489999991},
    {"time":"2018-05-07T23:50:00.000Z","open":9344.2,"high":9355.5,"low":9344.2,"close":9355.5,"volume":67.17007481000003},
    {"time":"2018-05-07T23:55:00.000Z","open":9355.5,"high":9373.9,"low":9355.4,"close":9370.0,"volume":38.46649460000004}
    ]
    

    Get latest OHLCV

    GET http://api.bitdataset.com/v1/ohlcv/latest/{symbol}?period={period}&from={from}&limit={limit}

    URL Parameters

    Parameter Description
    symbols Our symbols identifier (all symbols avialable here)
    period Identifier of requested period (all periods avialable here (required)
    from Get latest trades from this time in in ISO 8601 (e.g. 2018-05-05T10:00:00.336) or timestamp in milliseconds (e.g. 1525514400336) (optional)
    limit Amount of items to return. 100 by default. (optional, if the parameter is used then every 100 output items are counted as one request)

    output variables

    Parameter Description
    time Time of bar in ISO 8601. e.g. 2018-05-05T10:00:00.336 (or other format specified by the parameter output_time_format)
    open First trade price inside period range
    high Highest traded price inside period range
    low Lowest traded price inside period range
    close Last trade price inside period range
    volume Cumulative base amount traded inside period range

    Errors

    BitDataset API uses the following error codes:

    Error Code Meaning
    400 Bad Request -- Your request is invalid.
    401 Unauthorized -- Your API key is wrong.
    403 Forbidden -- Your API key doesnt’t have enough privileges to access this resource.
    404 Not Found -- The specified request path could not be found.
    429 Too Many Requests -- You have exceeded your API key rate limits.
    550 No data -- You requested specific single item that we don’t have.