RapidAPI logo

Bitcoin Historical Price Data

FREEMIUM
By bitcoinaverage
Updated 6 months ago
Finance
2.8/10
Popularity Score
884ms
Latency
100%
Success Rate

Bitcoin Historical Price Data API Documentation

BitcoinAverage.com is proud of the fact that we were the first global price index in the cryptocurrency and blockchain industry, and have proven over the years to also be one of the most reliable. It is considered by most as the de facto standard bitcoin price index.

It is trusted by thousands of users across hundreds the world’s leading websites, apps, services and businesses. With our historical bitcoin price data stretching back to 2010, this index is perfect for a multitude of uses from reporting, invoicing, payment processing, analysis and accounting, as well as a plethora of integrations with different types of software.

Pull our Historical Bitcoin exchange rate data in JSON or CSV format, stretching back 6 years, with 3 levels of granularity.

View API Details
GETHistorical Data
GETData Since Timestamp
GETPrice at Timestamp
GETHistorical Data

Return historical ticker data for ‘symbol’. Optional ‘format’ parameter with value csv/json

Header Parameters
X-RapidAPI-HostSTRING
REQUIRED
X-RapidAPI-KeySTRING
REQUIRED
Required Parameters
marketSTRING
REQUIREDPossible values: global, local
symbolSTRING
REQUIRED6 uppercase letters describing the crypto-fiat pair (ex. BTCUSD)
Optional Parameters
periodSTRING
OPTIONALPossible values: alltime, monthly, daily
Code Snippet
unirest.get("https://bitcoinaverage-bitcoin-historical-data-v1.p.rapidapi.com/indices/local/history/BTCGBP?period=monthly")
.header("X-RapidAPI-Host", "bitcoinaverage-bitcoin-historical-data-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
Sample Response
General
Request URL: https://bitcoinaverage-bitcoin-historical-data-v1.p.rapidapi.com/indices/{market}/history/{symbol}
Request Method: GET
Response Headers
Response Body

Install SDK for NodeJS

Installing

To utilize unirest for node.js install the the npm module:

$ npm install unirest

After installing the npm package you can now start simplifying requests like so:

var unirest = require('unirest');

Creating Request

unirest.get("https://bitcoinaverage-bitcoin-historical-data-v1.p.rapidapi.com/indices/local/history/BTCGBP?period=monthly")
.header("X-RapidAPI-Host", "bitcoinaverage-bitcoin-historical-data-v1.p.rapidapi.com")
.header("X-RapidAPI-Key", "SIGN-UP-FOR-KEY")
.end(function (result) {
  console.log(result.status, result.headers, result.body);
});
OAuth2 Authentication
Client ID
Client Secret
OAuth2 Authentication