Extract Bitcoin Price Index from Coindesk API

get_current_price(currency = "USD", only_price = FALSE)

Arguments

currency

a valid ISO 4217 currency code supported by coindesk - verify with get_currency_list(), default is USD

only_price

a TRUE/FALSE flag to force-return only the bitcoin price filtering other associated info

Value

dataframe containing Bitcoin Price and other associated info returned from the API call if only_price is FALSE, if TRUE, returns only the numeric value of Bitcoin price in the given currency

Examples

get_current_price()
#> time.updated time.updatedISO time.updateduk #> 1 Jan 5, 2018 14:21:00 UTC 2018-01-05T14:21:00+00:00 Jan 5, 2018 at 14:21 GMT #> disclaimer #> 1 This data was produced from the CoinDesk Bitcoin Price Index (USD). Non-USD currency data converted using hourly conversion rate from openexchangerates.org #> bpi.USD.code bpi.USD.rate bpi.USD.description bpi.USD.rate_float #> 1 USD 16,010.5900 United States Dollar 16010.59