What is the best way to plot the price AND volume of Bitcoin (or any other currency) in USD for the past week/month/year? Is it a good idea to use CurrencyConvert
? Or should I download the data from somewhere else? If so, is there a source that you recommend that updates the prices at least a few times a day?
-
1$\begingroup$ Have you checked out this reference from the Wolfram site: Historical Currency Conversion $\endgroup$– kickertCommented Jul 24, 2018 at 0:20
-
1$\begingroup$ As per the third question: bitcoincharts.com/charts $\endgroup$– corey979Commented Jul 24, 2018 at 0:21
-
$\begingroup$ Thank you kickert and @corey979, I have concluded that for financial analysis bitcoincharts.com and data.bitcoinity.org are the way to go and using the WolframAlpha computable data is very helpful for a quick price analysis. Very helpful. Thank you both. $\endgroup$– MiladioussCommented Jul 24, 2018 at 1:49
-
$\begingroup$ Did any of the answers satisfied your need? If you have your own, can you share it? There are things to do after your question is answered. While it's a good idea to wait some time as better approaches may come later improving over previous replies and experienced users may point alternatives, caveats or limitations, one weeks is enough wait. Participation is essential for the site, please do your part. $\endgroup$– rhermansCommented Jul 31, 2018 at 20:17
-
$\begingroup$ Sure @rhermans. I used the two comments to answer my own question. But I wasn't able to accept my own answer immediately. Thanks for reminding me. $\endgroup$– MiladioussCommented Jul 31, 2018 at 23:04
2 Answers
Using WolframAlpha
AS @kickert has mentioned in the comments, one can download the data from WolframAlpha:
endDate = Now;
startDate = DatePlus[endDate, -7];
endDateString =
DateString[endDate, {"MonthName", " ", "Day", ", ", "Year"}];
startDateString =
DateString[startDate, {"MonthName", " ", "Day", ", ", "Year"}];
rates = TimeSeries[
First[WolframAlpha[
"exchange rate of bitcoin to dollar from" <> startDateString <>
" to " <> endDateString, {{"Result", 1}, "ComputableData"}]]];
DateListPlot[{rates}, FrameLabel -> Automatic,
PlotTheme -> "Detailed", TargetUnits -> "$"]
Using External APIs
However, this method doesn't give the user a lot of freedom over the granularity and doesn't provide other financial markers such as volume. To overcome this, (as mentioned by @corey979 go to:
https://data.bitcoinity.org/markets/price/7d/USD?c=e&t=l
and adjust the plots as you desire, then download the corresponding data for that plot as a CSV. For instance, The bitcoin price for the past 7 days can be downloaded as such:
Import @ "https://data.bitcoinity.org/export_data.csv?c=e¤cy=USD&data_type=price&t=l×pan=7d"
== BitCoin
will plot the price, so long as you have web access.
-
$\begingroup$ Thank you David, I was trying to create a pretty bitcoin price plot and needed the data and I was wondering what was the easiest way to get it. As discussed in the comments above, I was able to find my answer. $\endgroup$ Commented Jul 24, 2018 at 1:51