bahibio_hist: Download historical crypto Data from Bahibo.com

Description Usage Arguments Value Author(s) Examples

Description

Download historical crypto data from over the world wide web.

Usage

1
2
3
4
  bahibo.hist(coin="bitcoin",currency="USD",
              start,end,
              quote=c("Open","High","Low","Close","Volume","Market.Cap"))
  

Arguments

coin

a character string. Use bahibo.coins() to see all available coins

currency

Default USD - use EUR for data in EUR, TRY for turkish Lira, DKK, SHF or any other currenzy

start

an R object specifying the date of the start of the period to download. This must be in a form which is recognized by as.POSIXct, which includes R POSIX date/time objects, objects of class "date" (from package date) and "chron" and "dates" (from package chron), and character strings representing dates in ISO 8601 format. Defaults to 1992-01-02.

end

an R object specifying the end of the download period, see above. Defaults is yesterday.

quote

a character string or vector indicating whether to download opening, high, low, or closing quotes, or volume. For the default provider, this can be specified as "Open", "High", "Low", "Close", "Avg", "Volume" and "Market.Cap" respectively.

Value

For more information use Bahibo.com And if you need more for example other Coin then please write me a comment on my website and I will add the coin as soon as possible .

Author(s)

S.Baartz & J.Ehlers

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
# load data
coin<-bahibo.coins()[1]
coin_hist<-bahibo.hist(coin)

# Zoo Package
if (!require("zoo")) install.packages("zoo")

# simple Plot
coin_hist_zoo<-zoo(coin_hist,as.Date(rownames(coin_hist)))
plot.zoo(coin_hist_zoo)

# log date and log plot
coin_hist_zoo_ln<-log(coin_hist_zoo[,c("Open","High","Low","Close")])
plot(coin_hist_zoo_ln)

#calculate returns and plot log returns
r<-diff(coin_hist_zoo_ln)
plot.zoo(r)

  

StephanBahibo/Bahibo documentation built on Feb. 13, 2022, 9:13 a.m.