Latest refrence prices

markets/prices


Results

While the snapshot endpoint will give you what's currently in our Market State, it's possible that it will exclude illiquid markets (e.g. markets that have not traded in several days).
To obtain the latest reference price data for all markets in our ecosystem, you can use the prices API.

Notes:

  • The timestamp field will reflect the last time the market has traded (aggregated to a 1-minute interval).
  • The data is updated every 30-minutes.

Specification
Endpoint
markets/prices

Support
Current values

API Call Counts
100 per API call.

API Plan
gold


Quick Examples

Get latest refrence price data for all supported crypto currencies

https://api.cryptoquote.io/v1/markets/prices?key=

Input Parameters
loopBack

number of days to look back for data (default is 24 hours)

Example : 7


format

Output format e.g. CSV or JSON output (default is JSON)

Example : JSON



Output Descriptions
symbol

The common/local symbol/ticker of the symbol

Type: string


exchange

the exchange code e.g. gemini

Type: string


price

Price of the symbol

Type: number


base

Base cryptocurrency symbol

Type: string


quote

Quote currency

Type: string



Sample Output
{
    "id": 62,
    "market_id": "86",
    "updated_at": "2022-01-16T00:30:14.628Z",
    "timestamp": "2022-01-16T00:30:00.000Z",
    "price": "7.71000000",
    "base": "FLOW",
    "quote": "USDT",
    "symbol": "FLOWUSDT",
    "exchange": "binance",
    "name": "FLOW/Tether"
}, {
    "id": 3640,
    "market_id": "4333",
    "updated_at": "2022-01-16T00:30:17.170Z",
    "timestamp": "2022-01-16T00:30:00.000Z",
    "price": "0.77780000",
    "base": "XRP",
    "quote": "USD",
    "symbol": "XRPUSD",
    "exchange": "binance",
    "name": "Ripple/US Dollar"
}, {
    "id": 1187,
    "market_id": "1633",
    "updated_at": "2022-01-16T00:30:15.435Z",
    "timestamp": "2022-01-16T00:30:00.000Z",
    "price": "492.40000000",
    "base": "BNB",
    "quote": "USD",
    "symbol": "BNBUSD",
    "exchange": "binance",
    "name": "Binance Coin/US Dollar"
}, {
    "id": 3996,
    "market_id": "4636",
    "updated_at": "2022-01-16T00:30:17.446Z",
    "timestamp": "2022-01-16T00:30:00.000Z",
    "price": "0.00003002",
    "base": "ADA",
    "quote": "BTC",
    "symbol": "ADABTC",
    "exchange": "binance",
    "name": "Cardano/Bitcoin"
}

Examples

Get latest refrence price data for all supported crypto currencies

https://api.cryptoquote.io/v1/markets/prices?key=
REST
GET https://api.cryptoquote.io/v1/markets/prices&https://api.cryptoquote.io/v1/markets/prices?key=&key=your_api_key
Python
import requests 
r = requests.get("https://api.cryptoquote.io/v1/markets/prices&https://api.cryptoquote.io/v1/markets/prices?key=&key=your_api_key")
data = r.json()
print(data)
Node.js
var http = require('http');
var buffer = '';
var options = {
	host: 'https://api.cryptoquote.io/v1/markets/prices&https://api.cryptoquote.io/v1/markets/prices?key=&key=your_api_key',
	port: 80,
	path: 'https://api.cryptoquote.io/v1/markets/prices&https://api.cryptoquote.io/v1/markets/prices?key=&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://api.cryptoquote.io/v1/markets/prices&https://api.cryptoquote.io/v1/markets/prices?key=&key=your_api_key");
	if (response.IsSuccessStatusCode)
	{
		//Your custom response parser code
	}
}
Java
String uri = "https://api.cryptoquote.io/v1/markets/prices&https://api.cryptoquote.io/v1/markets/prices?key=&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://api.cryptoquote.io/v1/markets/prices&https://api.cryptoquote.io/v1/markets/prices?key=&key=your_api_key'))
obj <- fromJSON(json)
PHP
$url = 'https://api.cryptoquote.io/v1/markets/prices&https://api.cryptoquote.io/v1/markets/prices?key=&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://api.cryptoquote.io/v1/markets/prices&https://api.cryptoquote.io/v1/markets/prices?key=&key=your_api_key';
$.ajax({
		url: url,
		type: "GET",
		dataType: 'json'
}).done(function (data) {
	console.log(data);
});