SMA indicators and signals

sma


Results
Current SMA indicators with signals

Specification
Endpoint
sma?symbol={symbol}

Support
Current and Historical values

API Call Counts
50 per API call.

API Plan
gold



Input Parameters
symbol

The common/local symbol/ticker of the symbol

Example : BTCUSD



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


sma5

Simple Moving Average (5)

Type: number


sma7

Simple Moving Average (7)

Type: number


sma10

Simple Moving Average (10)

Type: number


sma13

Simple Moving Average (13)

Type: number


sma20

Simple Moving Average (20)

Type: number


sma26

Simple Moving Average (26)

Type: number


sma50

Simple Moving Average (50)

Type: number


sma100

Simple Moving Average (100)

Type: number


sma200

Simple Moving Average (200)

Type: number


sma5_signal

Simple Moving Average (5) buy/sell signal

Type: string


sma7_signal

Simple Moving Average (5) buy/sell signal

Type: string


sma10_signal

Simple Moving Average (5) buy/sell signal

Type: string


sma13_signal

Simple Moving Average (13) buy/sell signal

Type: string


sma20_signal

Simple Moving Average (20) buy/sell signal

Type: string


sma26_signal

Simple Moving Average (26) buy/sell signal

Type: string


sma50_signal

Simple Moving Average (50) buy/sell signal

Type: string


sma100_signal

Simple Moving Average (100) buy/sell signal

Type: string


sma200_signal

Simple Moving Average (200) buy/sell signal

Type: string


total_ma_buy_signals

Total Moving Average BUY signals

Type: number


total_ma_sell_signals

Total Moving Average SELL signals

Type: number



Sample Output
{
  "status": "ok",
  "total_records": 1,
  "page_size": 10,
  "current_page": 1,
  "total_pages": 1,
  "results": [
    {
      "symbol": "BTCUSD",
      "symbol_name": "Bitcoin/US Dollar",
      "exchange": "gemini",
      "symbol_pair": "BTC/USD",
      "sma5": 38755.83,
      "sma7": 40835.22,
      "sma10": 40561.55,
      "sma13": 40178.52,
      "sma20": 39693.14,
      "sma26": 40445.5,
      "sma50": 39969.85,
      "sma100": 43837.85,
      "sma200": 48981.24,
      "sma5_signal": "BUY",
      "sma7_signal": "SELL",
      "sma10_signal": "SELL",
      "sma13_signal": "SELL",
      "sma20_signal": "SELL",
      "sma26_signal": "SELL",
      "sma50_signal": "SELL",
      "sma100_signal": "SELL",
      "sma200_signal": "SELL",
      "total_ma_buy_signals": 1,
      "total_ma_sell_signals": 8
    }
  ]
}

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