Double Exponential Moving Average (DEMA)

ta_dema


Results
Calculate Double Exponential Moving Average of a global symbol

Specification
Endpoint
ta_dema?symbol={symbol}&start_data={start_date}&end_date={end_date}&price_field={price_field}&period={period}

Support
Current and Historical values

API Call Counts
20 per API call.

API Plan
bronze


Quick Examples

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


price_field

The price field to use when calculating the technical indicators. Allowed values are;

open_price = Open Price
high_price = High Price
low_price = Low_price
close_price = Close Price
volume = Volume

Example : close_price


period

The Period value for the technical indicator e.g. 14 means 14-day period

Example : 14



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",
  "total_records": 32,
  "page_size": 32,
  "current_page": 1,
  "total_pages": 1,
  "results": {
    "symbol": "BTCUSD",
    "symbol_name": "Bitcoin/US Dollar",
    "exchange": "gemini",
    "symbol_pair": "BTC/USD",
    "technicals": [
      {
        "date": "2022-03-13",
        "dema": 41827.327
      },
      {
        "date": "2022-03-12",
        "dema": 41103.71
      },
      {
        "date": "2022-03-11",
        "dema": 41031.81
      },
      {
        "date": "2022-03-10",
        "dema": 40489.165
      },
      {
        "date": "2022-03-09",
        "dema": 39847.528
      },
      {
        "date": "2022-03-08",
        "dema": 39438.235
      },
      {
        "date": "2022-03-07",
        "dema": 38814.161
      },
      {
        "date": "2022-03-06",
        "dema": 38623.439
      },
      {
        "date": "2022-03-05",
        "dema": 38638.63
      },
      {
        "date": "2022-03-04",
        "dema": 38686.269
      },
      {
        "date": "2022-03-03",
        "dema": 39216.817
      },
      {
        "date": "2022-03-02",
        "dema": 39394.231
      },
      {
        "date": "2022-03-01",
        "dema": 39616.658
      },
      {
        "date": "2022-02-28",
        "dema": 39955.858
      },
      {
        "date": "2022-02-27",
        "dema": 39089.459
      },
      {
        "date": "2022-02-26",
        "dema": 39362.797
      },
      {
        "date": "2022-02-25",
        "dema": 40084.634
      },
      {
        "date": "2022-02-24",
        "dema": 40869.567
      },
      {
        "date": "2022-02-23",
        "dema": 41484.633
      },
      {
        "date": "2022-02-22",
        "dema": 42409.311
      },
      {
        "date": "2022-02-21",
        "dema": 42166.929
      },
      {
        "date": "2022-02-20",
        "dema": 41163.848
      },
      {
        "date": "2022-02-19",
        "dema": 39577.815
      },
      {
        "date": "2022-02-18",
        "dema": 37959.728
      },
      {
        "date": "2022-02-17",
        "dema": 38288.186
      },
      {
        "date": "2022-02-16",
        "dema": 38117.253
      },
      {
        "date": "2022-02-15",
        "dema": 37868.493
      },
      {
        "date": "2022-02-14",
        "dema": 37955.547
      },
      {
        "date": "2022-02-13",
        "dema": 38590.529
      },
      {
        "date": "2022-02-12",
        "dema": 39025.467
      },
      {
        "date": "2022-02-11",
        "dema": 40192.958
      },
      {
        "date": "2022-02-10",
        "dema": 41170.336
      }
    ]
  }
}

REST
GET https://www.cryptoquote.io/analytics/v1/?api=ta_dema&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=ta_dema&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=ta_dema&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=ta_dema&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=ta_dema&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=ta_dema&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=ta_dema&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=ta_dema&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=ta_dema&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);
});