Bitcoin Forum

Bitcoin => Bitcoin Discussion => Topic started by: Jhony sins on December 10, 2018, 11:13:10 AM



Title: how to get history of bitcoin price data
Post by: Jhony sins on December 10, 2018, 11:13:10 AM
I want to do my own bitcoin chart.

Would you know any reliable way to retrieve bitcoins historical price data? Is there any way to retrieve it using REST? I saw Bitfloor, which supports REST, but it is not returning any useful value, it has a "internal server error".

I saw also Bitcoincharts, but I think it's limited to 2000 data values.

Would you suggest me any framework or system to work about it?


Title: Re: how to get history of bitcoin price data
Post by: Ronnie colman on December 10, 2018, 12:07:40 PM
Bitstamp has live bitcoin data that are publicly available in JSON at this link. Do not try to access it more than 600 times in ten minutes or else they'll block your IP (plus, it's unnecessary anyway; read more here). The below is a C# approach to getting live data:

using (var WebClient = new System.Net.WebClient())
{
     var json = WebClient.DownloadString("https://www.bitstamp.net/api/ticker/");
     string value = Convert.ToString(json);
     // Parse/use from here
}
From here, you can parse the JSON and store it in a database (or with MongoDB insert it directly) and then access it.

For historic data (depending on the database - if that's how you approach it), do an insert from a flat file, which most databases allow you to use (for instance, with SQL Server you can do a BULK INSERT from a CSV file).


Title: Re: how to get history of bitcoin price data
Post by: incomefromcoins on December 10, 2018, 02:49:05 PM
coin.dance this website store most of the information of bitcoin and daily volume transactions and past history as well


Title: Re: how to get history of bitcoin price data
Post by: Tnt1971 on December 10, 2018, 03:21:55 PM
One can easily get anual chart price of bitcoin from Bitstamp, especially one can get easily from coinbase anual price chart. Find here: https://www.bitstamp.net/api/ticker/


Title: Re: how to get history of bitcoin price data
Post by: pooya87 on December 11, 2018, 03:44:05 AM
have you checked out TradingView.com yet?
it has good chart functionalities and supports data from multiple exchanges. and the charts are very good for everything you want to do specially TA.

of course it really depends on what you are trying to do. for example if it is a bot you are designing then go with the exchange APIs directly by visiting their website and reading how their API works.