business-science / alphavantager

A lightweight R interface to the Alpha Vantage API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Retrieving Digital Currency Data

GeraldMorrison opened this issue · comments

Hi,
I am trying to use your package to get Digital Currency data. You don't specifically show support but I was able to make it work - sort of. I get the data but the OHLC columns are duplicated. Digital Currencies need a specified market to quote them in a specified currency. So it's not a bug per se but a feature request to support Digital Currencies.
Thanks!
-Gerald
PS: There is a possibility that the data from the source is duplicated.
###################################################

Below is the output from the console.
I also get the same result using:
av_get("BTC", av_fun = "DIGITAL_CURRENCY_DAILY", market = "USD", outputsize = "full")

###################################################

BTCb <- av_get(symbol = "BTC",
av_fun = "DIGITAL_CURRENCY_DAILY",
market = "USD",
outputsize = "full")
Warning message:
Duplicated column names deduplicated: 'open (USD)' => 'open (USD)_1' [6], 'high (USD)' => 'high (USD)_1' [7], 'low (USD)' => 'low (USD)_1' [8], 'close (USD)' => 'close (USD)_1' [9]

head(BTCb)

A tibble: 6 x 11

timestamp open..usd. high..usd. low..usd. close..usd. open..usd._1 high..usd._1 low..usd._1 close..usd._1 volume

1 2017-09-19 4060 4090. 3831. 3910. 4060 4090. 3831. 3910. 902.
2 2017-09-20 3910. 4046. 3820 3900 3910. 4046. 3820 3900 721.
3 2017-09-21 3890. 3910 3567 3610. 3890. 3910 3567 3610. 1002.
4 2017-09-22 3593. 3750 3506. 3596. 3593. 3750 3506. 3596. 839.
5 2017-09-23 3596. 3817. 3543. 3780 3596. 3817. 3543. 3780 753.
6 2017-09-24 3780. 3790. 3623. 3660. 3780. 3790. 3623. 3660. 662.

... with 1 more variable: market.cap..usd.