Ethereum: Anyone know of an API I can get historical price time series for multiple coins

Retrieving Historical Ethereum Price Data Using API

As a cryptocurrency enthusiast and developer, you’re probably looking for ways to build a reliable wallet tracking app. One of the key aspects is access to historical price data for several coins. In this article, we will look at the possibilities of obtaining historical price data for various Ethereum-based assets via API.

Historical Price Data Requirements

To create highly accurate historical price charts using HighCharts js, you need a reliable API that provides accurate and up-to-date price data. Here are some basic requirements:

  • Data Frequency: Look for APIs that offer data at intervals of at least 1-2 minutes to ensure a smooth visualization of the time series.

  • Asset Coverage: Make sure the API covers the Ethereum-based assets you’re interested in, such as Bitcoin (BTC), Ethereum (ETH), and others.

  • Data Format: The API must return price data in a standard format such as CSV or JSON.

API for historical price data

Ethereum: Anyone know of an API I can get historical price time series for multiple coins

Here are some popular APIs that offer historical price data for several Ethereum-based assets:

  • [CoinGecko API](

* Provides prices, volumes and market capitalization of more than 10,000 cryptocurrencies, including Ethereum.

  • [Cryptocompare API](

* Offers historical price data for various cryptocurrency assets, including Ethereum.

  • [CoinMarketCap API](

* Provides historical price data for more than 12,000 cryptocurrencies, including Ethereum.

  • [Binance API](

* Provides access to cryptocurrency market data, including prices and volumes.

Example Code

Here is an example of a code snippet that uses the CoinGecko API to retrieve historical Bitcoin (BTC) and Ethereum (ETH) price data:

const axios = require('axios');

async function getHistoricalPriceData() {

const apiEndpoint = '

ask {

const answer = await axios.get(apiEndpoint);

constant data = response.data;

console.log(data);

// Use historical Bitcoin and Ethereum price data

const bitcoinData = data[0];

const ethData = date[1];

// Create a HighCharts chart object

const chart = new Highcharts.Chart({

chart: {

type: "line",

header: {

text: `Historical price of ${bitcoinData.name} and ${ethData.name}

}

},

xAxis: {

tick: {

included: true

Step: 1

}

},

row: [

{

name: bitcoinData.name,

type: "line",

data: bitcoinData.price

},

{

name: ethData.name,

type: "line",

data: ethData.price

}

]

});

} catch (error) {

console.error(error);

}

}

getHistoricalPriceData();

Conclusion

With these APIs and a sample code snippet, you’ll be able to retrieve historical price data for several Ethereum-based assets. This will allow you to create robust portfolio tracking applications using HighCharts js. Be sure to review the documentation and pricing plans for each API to ensure seamless integration.

METAMASK SAVE METAMASK


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *