Historical VWAP

symbol_vwap


Results
Get historical VWAP of any global symbol by providing the date range

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

Support
Current and Historical values

API Call Counts
50 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


date

returns date of the return query data

Type: date


typical_price

Typical Price = (open + high + close)/3

Type: number


typical_price_volume

typical_price_volume = typical_price * volume

Type: number


cumulative_price

The cumulative running total sum of typical_price * volume

Type: number


cumulative_volume

The cumulative running total sum of volume

Type: number


vwap

The VWAP (volume-weighted average price) of the instrument

Type: number



Sample Output
{
  "status": "ok",
  "info": {
    "symbol": {
      "symbol": "BTCUSD.gdax",
      "symbol_name": "Bitcoin/US Dollar",
      "exchange": "gdax",
      "symbol_pair": "BTC/USD"
    }
  },
  "total_records": 8,
  "page_size": 10,
  "current_page": 1,
  "total_pages": 1,
  "results": [
    {
      "date": "2022-06-08",
      "open": 31111,
      "high": 31111,
      "low": 31111,
      "close": 31111,
      "volume": 8961.6451557,
      "typical_price": 29950.819999999996,
      "typical_price_volume ": 268408620.96224263,
      "cummulative_price": 3562584945.6168265,
      "cummulative_volume": 118330.81761043,
      "vwap": 30106.99171660934
    },
    {
      "date": "2022-06-07",
      "open": 31349.59,
      "high": 31349.59,
      "low": 31349.59,
      "close": 31349.59,
      "volume": 23128.62321789,
      "typical_price": 29871.49,
      "typical_price_volume ": 690886437.166969,
      "cummulative_price": 3294176324.654584,
      "cummulative_volume": 109369.17245473,
      "vwap": 30119.78833448801
    },
    {
      "date": "2022-06-06",
      "open": 29899.62,
      "high": 29899.62,
      "low": 29899.62,
      "close": 29899.62,
      "volume": 20339.65425158,
      "typical_price": 30363.47,
      "typical_price_volume ": 617582481.6782218,
      "cummulative_price": 2603289887.487615,
      "cummulative_volume": 86240.54923684,
      "vwap": 30186.37880352864
    },
    {
      "date": "2022-06-05",
      "open": 29837.56,
      "high": 29837.56,
      "low": 29837.56,
      "close": 29837.56,
      "volume": 5422.69656593,
      "typical_price": 29645.466666666664,
      "typical_price_volume ": 160758370.2887256,
      "cummulative_price": 1985707405.8093932,
      "cummulative_volume": 65900.89498526,
      "vwap": 30131.721371212556
    },
    {
      "date": "2022-06-04",
      "open": 29672.77,
      "high": 29672.77,
      "low": 29672.77,
      "close": 29672.77,
      "volume": 6389.81247666,
      "typical_price": 29749.773333333334,
      "typical_price_volume ": 190095472.8231403,
      "cummulative_price": 1824949035.5206676,
      "cummulative_volume": 60478.19841933,
      "vwap": 30175.320747275742
    },
    {
      "date": "2022-06-03",
      "open": 30429.11,
      "high": 30429.11,
      "low": 30429.11,
      "close": 30429.11,
      "volume": 8744.12483834,
      "typical_price": 29853.089999999997,
      "typical_price_volume ": 261039145.77019945,
      "cummulative_price": 1634853562.6975272,
      "cummulative_volume": 54088.38594267,
      "vwap": 30225.593428326007
    },
    {
      "date": "2022-06-02",
      "open": 29789.19,
      "high": 29789.19,
      "low": 29789.19,
      "close": 29789.19,
      "volume": 18518.9216749,
      "typical_price": 30215.786666666667,
      "typical_price_volume ": 559563786.6254878,
      "cummulative_price": 1373814416.9273276,
      "cummulative_volume": 45344.26110433,
      "vwap": 30297.4264762281
    },
    {
      "date": "2022-06-01",
      "open": 31784.18,
      "high": 31784.18,
      "low": 31784.18,
      "close": 31784.18,
      "volume": 26825.33942943,
      "typical_price": 30353.786666666667,
      "typical_price_volume ": 814250630.30184,
      "cummulative_price": 814250630.30184,
      "cummulative_volume": 26825.33942943,
      "vwap": 30353.786666666667
    }
  ]
}

REST
GET https://www.cryptoquote.io/analytics/v1/?api=symbol_vwap&symbol=BTCUSD&start_date=2022-04-01&end_date=2022-06-01&key=your_api_key
Python
import requests 
r = requests.get("https://www.cryptoquote.io/analytics/v1/?api=symbol_vwap&symbol=BTCUSD&start_date=2022-04-01&end_date=2022-06-01&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_vwap&symbol=BTCUSD&start_date=2022-04-01&end_date=2022-06-01&key=your_api_key',
	port: 80,
	path: 'https://www.cryptoquote.io/analytics/v1/?api=symbol_vwap&symbol=BTCUSD&start_date=2022-04-01&end_date=2022-06-01&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_vwap&symbol=BTCUSD&start_date=2022-04-01&end_date=2022-06-01&key=your_api_key");
	if (response.IsSuccessStatusCode)
	{
		//Your custom response parser code
	}
}
Java
String uri = "https://www.cryptoquote.io/analytics/v1/?api=symbol_vwap&symbol=BTCUSD&start_date=2022-04-01&end_date=2022-06-01&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_vwap&symbol=BTCUSD&start_date=2022-04-01&end_date=2022-06-01&key=your_api_key'))
obj <- fromJSON(json)
PHP
$url = 'https://www.cryptoquote.io/analytics/v1/?api=symbol_vwap&symbol=BTCUSD&start_date=2022-04-01&end_date=2022-06-01&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_vwap&symbol=BTCUSD&start_date=2022-04-01&end_date=2022-06-01&key=your_api_key';
$.ajax({
		url: url,
		type: "GET",
		dataType: 'json'
}).done(function (data) {
	console.log(data);
});