Function Resource

CryptocurrencyData

Retrieve data about different cryptocurrencies

ResourceFunction["CryptocurrencyData"][name]

gives daily closing price data for the cryptocurrency name.

ResourceFunction["CryptocurrencyData"][name,start]

gives daily closing price data for the cryptocurrency name from start to current date.

ResourceFunction["CryptocurrencyData"][name,{start,end}]

gives daily closing price data for the cryptocurrency name from start to end.

ResourceFunction["CryptocurrencyData"][name,prop,{start,end}]

gives value of the specified property for the cryptocurrency name from start to end.

ResourceFunction["CryptocurrencyData"][name,prop,{start,end}]

gives value of the specified property for the cryptocurrency name from start to end.

ResourceFunction["CryptocurrencyData"][name,prop,{start,end}, resultType]

gives results with in the specified resultType.

Details and Options

Generally speaking, ResourceFunction["CryptocurrencyData"] adheres to the signatures design of FinancialData, but there are a number of differences.
ResourceFunction["CryptocurrencyData"] utilizes two data sources: Yahoo Finance and Bitcoinity.org.
ResourceFunction["CryptocurrencyData"] caches the source-retrived-and-processed data in order to provide results faster.
The result type argument is expected to be Automatic, Dataset, or TimeSeries. Automatic is the same as TimeSeries.
ResourceFunction["CryptocurrencyData"] accepts the following options:
"Currency""USD"unit of currency
"LedgerStart"DateObject[{2009,1,3}]ledger start date
"Quantities"Falsewhether quantity units should be used
"ResultType"TimeSeriestype of the result
"Source""YahooFinance"source for cryptocurrency data
The option "Source" specifies the data source. It is expected to be Automatic, "YahooFinance", "YF", "DataBitcoinityOrg", or "DBO". The abbreviations "YF" and "DBO" correspond to the "YahooFinance" and "DataBitcoinityOrg" respectively. Here is a corresponding interpretation table:
Automatic"YahooFinance"
"YF"“YahooFinance”
"DBO""DataBitcoinityOrg"
If the option "Source" is given the value "YahooFinance" then data from the page https://finance.yahoo.com/cryptocurrencies is used.
If the option "Source" is given the value "DataBitcoinityOrg" then data from https://data.bitcoinity.org is used.
The cryptocurrency data is retrieved from source sites using certain ad-hoc derived assumptions of how the data is organized. Hence if the data organization changes, ResourceFunction["CryptocurrencyData"] will fail.
The data sources used (Yahoo Finance and data.bitcoinity.org) provide different properties, with different time granularities. Hence, switching sources (with option “Source”) might produce differently structured (or empty) results.
For optimization purposes data retrieved from the sources is stored in a dedicated data structure. If the computational session is “too long” that stored data might not be recent enough. In those situations the argument “ClearCachedData” can be used.

Examples

Basic Examples (3) 

Here is time series for Bitcoin (BTC):

In[1]:=
ResourceFunction[
 "https://www.wolframcloud.com/obj/antononcube/DeployedResources/\
Function/CryptocurrencyData"]["BTC"]
Out[1]=
In[2]:=
DateListPlot[%, PlotRange -> All]
Out[2]=

Here is trading volume time series for BTC since 2018:

In[3]:=
DateListPlot[
 ResourceFunction[
  "https://www.wolframcloud.com/obj/antononcube/DeployedResources/\
Function/CryptocurrencyData"]["BTC", "Volume", "Jan 1 2018"], PlotRange -> All]
Out[3]=

Get trading volume data for Bitcoin (BTC) and Ether (ETH) since January 1st 2021:

In[4]:=
ResourceFunction[
 "https://www.wolframcloud.com/obj/antononcube/DeployedResources/\
Function/CryptocurrencyData"][{"BTC", "ETH"}, "Volume", "Jan 2021"]
Out[4]=

Here is the corresponding plot:

In[5]:=
DateListPlot[%]
Out[5]=

Scope (10) 

Here are time series of different properties for Bitcoin (BTC) and Ether (ETH):

In[6]:=
ResourceFunction[
 "https://www.wolframcloud.com/obj/antononcube/DeployedResources/\
Function/CryptocurrencyData"][{"BTC", "ETH"}, {"Open", "Volume"}]
Out[6]=

Instead of time series we can get Dataset objects instead:

In[7]:=
ResourceFunction[
 "https://www.wolframcloud.com/obj/antononcube/DeployedResources/\
Function/CryptocurrencyData"][{"BTC", "ETH"}, {"Open", "Volume"}, "Jan 2021", "ResultType" -> Dataset]
Out[7]=

Get the cryptocurrency summary data from Yahoo Finance:

In[8]:=
ResourceFunction[
 "https://www.wolframcloud.com/obj/antononcube/DeployedResources/\
Function/CryptocurrencyData"][All, "Summary"]
Out[8]=