Percentile Stats

symbol_percentile


Results
View percentile, standard deviation stats, maximum and minimum values for a given data range for a global symbol

Specification
Endpoint
symbol_percentile?symbol={symbol}&start_date={start_date}&end_date={end_date}

Support
Current and Historical values

API Call Counts
20 per API call.

API Plan
silver



Input Parameters
symbol

The common/local symbol/ticker of the symbol

Example : BTCUSD


start_date

Start Date

Example : 2019-01-01


end_date

End Date

Example : 2019-01-01



Output Descriptions
symbol

The common/local symbol/ticker of the symbol

Type: string


symbol_name

The name of the symbol

Type: string


exchange

the exchange code e.g. gemini

Type: string


symbol_pair

the exchange symbol pairs

Type: string



Sample Output
{
  "status": "ok",
  "info": {
    "symbol": {
      "symbol": "BTCUSD",
      "symbol_name": "Bitcoin/US Dollar",
      "exchange": "gemini",
      "symbol_pair": "BTC/USD"
    },
    "results": {
      "open_price": {
        "count": 59,
        "mean": 40262.0427118644,
        "std": 2390.0723821992,
        "min": 36698.46,
        "25%": 38309.69,
        "50%": 39662.51,
        "75%": 42305.89,
        "max": 44563.07
      },
      "high_price": {
        "count": 59,
        "mean": 41265.3406779661,
        "std": 2373.2803207316,
        "min": 37238.91,
        "25%": 39304.565,
        "50%": 40967.99,
        "75%": 42950.06,
        "max": 45861.85
      },
      "low_price": {
        "count": 59,
        "mean": 39281.0349152542,
        "std": 2407.443777769,
        "min": 34337.91,
        "25%": 37357.77,
        "50%": 38675.08,
        "75%": 41639.365,
        "max": 43359.61
      },
      "close_price": {
        "count": 59,
        "mean": 40297.4238983051,
        "std": 2370.9150184243,
        "min": 36826.46,
        "25%": 38365.16,
        "50%": 39429.94,
        "75%": 42321.82,
        "max": 44564.44
      },
      "volume": {
        "count": 59,
        "mean": 1067.9345159946,
        "std": 757.9629188353,
        "min": 61.78574462,
        "25%": 471.641758085,
        "50%": 1004.29314617,
        "75%": 1436.396604765,
        "max": 3969.93274556
      }
    }
  },
  "total_records": null,
  "page_size": null,
  "current_page": 1,
  "total_pages": 1,
  "results": null
}

REST
GET https://www.cryptoquote.io/analytics/v1/?api=symbol_percentile&symbol=BTCUSD.gdax&start_date=2019-12-01&end_date=2020-01-27&price_field=close_price&period=14&key=your_api_key
Python
import requests 
r = requests.get("https://www.cryptoquote.io/analytics/v1/?api=symbol_percentile&symbol=BTCUSD.gdax&start_date=2019-12-01&end_date=2020-01-27&price_field=close_price&period=14&key=your_api_key")
data = r.json()
print(data)
Node.js
var http = require('http');
var buffer = '';
var options = {
	host: 'https://www.cryptoquote.io/analytics/v1/?api=symbol_percentile&symbol=BTCUSD.gdax&start_date=2019-12-01&end_date=2020-01-27&price_field=close_price&period=14&key=your_api_key',
	port: 80,
	path: 'https://www.cryptoquote.io/analytics/v1/?api=symbol_percentile&symbol=BTCUSD.gdax&start_date=2019-12-01&end_date=2020-01-27&price_field=close_price&period=14&key=your_api_key',
	headers: headers
};
callback = function(response) {
	response.on('data', function (chunk) {
	buffer += chunk;
});
response.on('end', function () {
	// your code here if you want to use the results !
});
}

var req = http.get(options, callback).end();
C#
using (var client = new HttpClient())
{
	client.BaseAddress = new Uri("{$api_host}");
	client.DefaultRequestHeaders.Clear();
	//ADD Acept Header to tell the server what data type you want
	client.DefaultRequestHeaders.Accept.Add(new MediaTypeWithQualityHeaderValue("application/json"));
	//SET Parameters
	HttpResponseMessage response = await client.GetAsync("https://www.cryptoquote.io/analytics/v1/?api=symbol_percentile&symbol=BTCUSD.gdax&start_date=2019-12-01&end_date=2020-01-27&price_field=close_price&period=14&key=your_api_key");
	if (response.IsSuccessStatusCode)
	{
		//Your custom response parser code
	}
}
Java
String uri = "https://www.cryptoquote.io/analytics/v1/?api=symbol_percentile&symbol=BTCUSD.gdax&start_date=2019-12-01&end_date=2020-01-27&price_field=close_price&period=14&key=your_api_key";
URL url = new URL(uri);
HttpURLConnection connection = (HttpURLConnection) url.openConnection();
	connection.setRequestMethod("GET");
	connection.setRequestProperty("Accept", "application/json");
InputStream xml = connection.getInputStream();
R
1 - Install package
install.packages("RCurl")
install.packages("jsonlite")
2 - Request the data:
library('RCurl')
require('jsonlite')
json <- getURL(URLencode('https://www.cryptoquote.io/analytics/v1/?api=symbol_percentile&symbol=BTCUSD.gdax&start_date=2019-12-01&end_date=2020-01-27&price_field=close_price&period=14&key=your_api_key'))
obj <- fromJSON(json)
PHP
$url = 'https://www.cryptoquote.io/analytics/v1/?api=symbol_percentile&symbol=BTCUSD.gdax&start_date=2019-12-01&end_date=2020-01-27&price_field=close_price&period=14&key=your_api_key';
$handle = curl_init(); 
	curl_setopt($handle, CURLOPT_URL, $url);
	curl_setopt($handle, CURLOPT_RETURNTRANSFER, true);

	$data = curl_exec($handle);
curl_close($handle);
//parse your data as per your needs....
Javascript
var url = 'https://www.cryptoquote.io/analytics/v1/?api=symbol_percentile&symbol=BTCUSD.gdax&start_date=2019-12-01&end_date=2020-01-27&price_field=close_price&period=14&key=your_api_key';
$.ajax({
		url: url,
		type: "GET",
		dataType: 'json'
}).done(function (data) {
	console.log(data);
});