Giter Site home page Giter Site logo

jessevent / crypto Goto Github PK

View Code? Open in Web Editor NEW
143.0 16.0 34.0 23.6 MB

Cryptocurrency Historical Market Data R Package

Home Page: https://CRAN.R-project.org/package=crypto

License: Other

R 100.00%
coinmarketcap cryptocurrencies kaggle crypto dataset cryptocurrency webscraper rpackage financial open-data

crypto's Introduction

alt text Cran Cran Cran Cran Rdoc

Historical Cryptocurrency Prices For ALL Tokens!

Now providing support for the CMC professional API Easily interact with the professional API for CoinMarketCap through use of the keychain and rstudioapi packages.

Additional information on setup and usage can be found here. R-Studio and using Keyring

Retrieves all the open, high, low, close values for all cryptocurrencies. This retrieves data from CoinMarketCap's historical prices, exchange details and current prices API.

  • Retrieves historical crypto currency data crypto_history()
  • Retrieves current crypto currency prices crypto_prices()
  • Retrieves list of all crypto currencies crypto_list()
  • Retrieves all crypto exchanges and their listings crypto_exchanges()
  • Converts/summarises historical data into xts objects crypto_xts()
  • Individual crypto currency time series data crypto_timeseries()
  • Global markets time series data crypto_global_markets()

Prerequisites

Below are the high level dependencies for the package to install correctly.

R (>= 3.4.0), rvest, xml2

# Ubuntu 
sudo apt install libxml2-dev libcurl4-openssl-dev libssl-dev

Installing

The crypto R-package is installable through CRAN or through github.

# Installing via CRAN
install.packages("crypto", dependencies = TRUE)

# Installing via Github
devtools::install_github("jessevent/crypto")

Package Usage

These are the main functions that are added so far and a brief summary of what they do. Additional parameters are viewable in the documentation for each function.

Please note that CoinMarketCap have recently introduced a rate limiter on their service of 30 calls per minute, this package will now run slower to accomodate for the rate limit.

Please give this package a star if you find it helpful

library(crypto)

# Retrieve crypto market history for all-to-n coins
?getCoins
will_i_get_rich <- crypto_history(limit=50)

# Retrieve crypto market history for specific coin
?getCoins
will_i_get_rich_from <- crypto_history("kin")

# Get list of coins and rank
?listCoins
rich_list <- crypto_list()

# Retrieve current crypto market details
?getPrices
am_i_rich_now <- crypto_prices()

# Convert and/or summarise market history into xts object
?crypto2xts
when_will_i_get_rich <- crypto_xts(will_i_get_rich, "week")

# Get timeseries market data for token for displaying in charts
?daily_market
show_me_getting_rich <- crypto_timeseries('bitcoin')

# Get timeseries global market data for all coins or alt coins for displaying in charts
?global_market
show_me_everyone_getting_rich <- crypto_global_market()

Package Issues

Please run the below before raising an issue, then include the output from sessionInfo()

crypto::repair_dependencies()

print(sessionInfo())

Built With 😻 R

  • Kaggle - Get this dataset on kaggle!
  • CoinSpot - Invest $AUD into Crypto today!
  • CoinMarketCap - Providing amazing data @CoinMarketCap
  • CRAN - The CRAN repository for crypto

Author/License

This project is licensed under the MIT License - see the <license.md> file for details</license.md>

Acknowledgments

  • Thanks to the team at https://coinmarketcap.com for the great work they do and to the team at CoinTelegraph where the images were sourced.

  • Please star this if you find it useful, and remember the crypto currency market is volatile by nature, please be responsible if trading.

  • If by chance you do manage to make your fortune through some game-changing model, I'd appreciate your consideration in the below :)

    ERC-20: 0x375923Bf82F0b728d23A5704261a6e16341fd860
    XRP: rK59semLsuJZEWftxBFhWuNE6uhznjz2bK
    LTC: LWpiZMd2cEyqCdrZrs9TjsouTLWbFFxwCj
    

crypto's People

Contributors

amrrs avatar jessevent avatar jnwarp avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crypto's Issues

Could not find function "daily_market"

I get the following error now:

Error in daily_market(coin = "XRP") : 
  could not find function "daily_market"

Is there a free workaround, or are we stuck with cryptodatadownload?

No package called 'plyr' issue

When trying to run crypto_history(), I was getting the "bind_rows" error.
I loaded manually dplyr as suggested, and now getting a new error: "No package called 'plyr' issue"

`

print(sessionInfo())
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows 7 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252 LC_CTYPE=English_United States.1252 LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C LC_TIME=English_United States.1252

attached base packages:
[1] stats graphics grDevices utils datasets methods base

other attached packages:
[1] dplyr_0.7.7 crypto_1.0.3 rvest_0.3.2 xml2_1.2.0 foreach_1.4.4

loaded via a namespace (and not attached):
[1] Rcpp_0.12.19 rstudioapi_0.8 bindr_0.1.1 magrittr_1.5 tidyselect_0.2.5
[6] lattice_0.20-35 R6_2.3.0 rlang_0.2.2 stringr_1.3.1 httr_1.3.1
[11] xts_0.11-1 tools_3.5.1 grid_3.5.1 iterators_1.0.10 assertthat_0.2.0
[16] tibble_1.4.2 crayon_1.3.4 bindrcpp_0.2.2 purrr_0.2.5 tidyr_0.8.1
[21] codetools_0.2-15 glue_1.3.0 stringi_1.1.7 compiler_3.5.1 pillar_1.3.0
[26] jsonlite_1.5 lubridate_1.7.4 zoo_1.8-4 pkgconfig_2.0.2

library("crypto")
Loading required package: foreach
Loading required package: rvest
Loading required package: xml2
library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from package:stats:

filter, lag

The following objects are masked from package:base:

intersect, setdiff, setequal, union

df <- crypto_history(limit = 50)
| 0% If this helps you become rich please consider donating
ERC-20: 0x375923Bf82F0b728d23A5704261a6e16341fd860
XRP: rK59semLsuJZEWftxBFhWuNE6uhznjz2bK
LTC: LWpiZMd2cEyqCdrZrs9TjsouTLWbFFxwCj
Error in e$fun(obj, substitute(ex), parent.frame(), e$data) :
worker initialization failed: there is no package called 'plyr'

crypto_history skipping coins again

Similar problem as before. It has been off and on the past couple days (my internet is slower right now so maybe that is the problem?).

If I try to get a history of all the coins.. for example like this....

crypto_history(start_date = 20190220, limit = 200)

I'll get the first 20 ranked coins, then it'll skip a handful, then I'll get the next 10 or so, then it may skip some more...

If I recall it had something to do with the rate limiter

Also I want to again thank you for this package. It is amazing and you've done a tremendous job. Once crypto goes bull again you'll be getting a BIG tip from me!

Error in get(as.character(FUN), mode = "function", envir = envir) : object 'bind_rows' of mode 'function' was not found

Basically when trying the crypto_history function in R-Studio I'm getting this error

Detailed Description

Here's the code I've used

library(crypto)
library(foreach)
library(rvest)
library(xml2)

will_i_get_rich <- crypto_history(limit=50)

And here's the output:

 |                                                                                    |   0%   If this helps you become rich please consider donating
ERC-20: 0x375923Bf82F0b728d23A5704261a6e16341fd860
XRP: rK59semLsuJZEWftxBFhWuNE6uhznjz2bK
LTC: LWpiZMd2cEyqCdrZrs9TjsouTLWbFFxwCj
Error in get(as.character(FUN), mode = "function", envir = envir) : 
  object 'bind_rows' of mode 'function' was not found

Since I'm rather a rookie user I'd be glad if you could help me understanding what's wrong

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4): RStudio Version 1.1.456
  • Operating System and version (desktop or mobile): OsX 10.14 Mojave

Data inconsistency

Detailed Description

First of all, thanks for the great open source tool!
I have been using it for crypto market analysis for almost three months now. However, there are inconsistencies in the data. Because of them, I cannot use the full potential of the data.
There are two types of inconsistencies:
(1) Some data entries are simply missing (i.e. first half of January 2018 and April 2018);
(2) The 20th day of each month (both past and future) are repeated multiple times (1 entry is correct and the other 1-2 rows are just random numbers)

Context

I believe this change is very important not only to me, but also to all crypto analysts. This would allow to analyse ant interpret the data correctly.

Possible Implementation

I am sorry, but I am not a developer, thus cannot really suggest ideas for fixes...

Your Environment

  • Version used: 1.6
  • Environment name and version (e.g. Chrome 39, node.js 5.4): Rstudio
  • Operating System and version (desktop or mobile): Windows 8
  • Link to your project:

Trouble with crypto_exchanges function

I am having issues with the crypto_exchanges function on my Mac running 10.11.6. I simply want to retrieve the exchange information for all ETH markets. The code I used was

library(crypto)
coin <- "eth"
ETH_Exchanges <- crypto_exchanges(coin)

and I get an output of 21 obs. of 11 variables:
image

I must be doing something wrong, no? Thank you for developing such a useful library, I love it.

Additional Package Dependencies - snow, doSNOW

The current Prerequisites section lists foreach, rvest, xml2 as high level dependencies.

I just did a fresh install of R 3.4.3 and noticed that the getCoins() function fails to execute unless 'snow' and 'doSNOW' are loaded. Suggest updating the README to include these dependencies.

Thanks for your work on this package!

Bind_rows issue

When trying to run crypto_history(), I am getting the following error:

Error in get(as.character(FUN), mode = "function", envir = envir) :
object 'bind_rows' of mode 'function' was not found

print(sessionInfo()) 
R version 3.5.1 (2018-07-02)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows >= 8 x64 (build 9200)

Matrix products: default

locale:
[1] LC_COLLATE=English_United States.1252  LC_CTYPE=English_United States.1252    LC_MONETARY=English_United States.1252
[4] LC_NUMERIC=C                           LC_TIME=English_United States.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] crypto_1.0.3  rvest_0.3.2   xml2_1.2.0    foreach_1.4.4

loaded via a namespace (and not attached):
[1] Rcpp_0.12.19     rstudioapi_0.8   bindr_0.1.1      magrittr_1.5     tidyselect_0.2.4 lattice_0.20-35  R6_2.3.0         rlang_0.2.2     
[9] stringr_1.3.1    httr_1.3.1       dplyr_0.7.6      xts_0.11-1       tools_3.5.1      parallel_3.5.1   grid_3.5.1       snow_0.4-3      
[17] iterators_1.0.10 yaml_2.2.0       assertthat_0.2.0 tibble_1.4.2     crayon_1.3.4     doSNOW_1.0.16    bindrcpp_0.2.2   purrr_0.2.5     
[25] tidyr_0.8.1      codetools_0.2-15 glue_1.3.0       stringi_1.1.7    compiler_3.5.1   pillar_1.3.0     lubridate_1.7.4  jsonlite_1.5    
[33] zoo_1.8-4        pkgconfig_2.0.2 

Crypto History Error


crypto_history(start_date = 20190101, limit = 5, sleep = 7.1)
♥ If this helps you become rich please consider donating

ERC-20: 0x375923Bf82F0b728d23A5704261a6e16341fd860
XRP: rK59semLsuJZEWftxBFhWuNE6uhznjz2bK

Scraping historical crypto data

/ [5 / 5] [===========================================================================================================================] 100% in 00:00:30 ETA: 0s
Warning messages:
1: 1 failed to parse.
2: In function_list[k] : NAs introduced by coercion
3: In function_list[k] : NAs introduced by coercion
4: In FUN(newX[, i], ...) : NAs introduced by coercion
5: In FUN(newX[, i], ...) : NAs introduced by coercion
6: In FUN(newX[, i], ...) : NAs introduced by coercion
7: In FUN(newX[, i], ...) : NAs introduced by coercion


I ran the same thing a few days ago and it worked like a charm. Last night and today I received this error. In this case it SHOULD be getting the info from the top 5 ranks (Bitcoin, Ethereum, etc.). When I look at the data it is pulling from no-name coins that are way down the ranks. It says Orbitcoin is rank 3 (market cap $800,000), Publica rank 4, Sequence rank 5. That is obviously not right.

Previous issue not closed

Hi Jesse,
Many thanks for your feedback on my previous ticket however the issue is still there and nothing is loaded (downloaded).
I have attached the session info and a screenshot in the previous ticket.
Best regards,
G

Pull data for currencies or tokens marked inactive

Right now it is not possible to pull data from inactive currencies/tokens using the R package, but this data is still visible on coinmarketcap (you just have to google coinmarketcap+the token name and it comes up). Would it be possible to be able to pull this data as well?

Error in Sys.setlocale("LC_TIME", locale)

I am getting the following errors

Error in Sys.setlocale("LC_TIME", locale) : 
  (converted from warning) OS reports request to set locale to "en_US.UTF-8" cannot be honored
In addition: Warning message:
In Sys.setlocale("LC_TIME", locale) :
  OS reports request to set locale to "en_US.UTF-8" cannot be honored

I think it has something to do with the OS and the fact I am using windows

Inconsistent and incomplete results from getCoins() and crypto_history()

getCoins() and crypto_history() are not working as they used to.

  1. The basic getCoins() or crypto_history() ARE NOT pulling all coins for their entire history
    --It is only pulling anywhere between 10-50 coins at a time, and the particular coins are not consistent
    --As in I can run getCoins() now and in 15 minutes I can run it again and get a totally different result

  2. The same problem in #1 occurs whether I set a particular start date. I simply am only getting 10-50 coins at a time, but this time with less history.

  3. The limit functionality is also not working as intended. I'm getting similar results as #1 and #2 issues above.

  4. As mentioned previously I can run the exact same code and get totally different results...but I am also getting a result of "Error: No data currently exists for this cryptocurrency that can be scraped."

  5. However if I identify the particular coin I want it to return getCoins('PRL') as an example, it still works 100% as intended. Beautiful. Same with crypto_history('PRL')

Attached is the basic run of:

all_coins <- getCoins()

As you can see I am not getting anywhere near all the coins at this point.

all_coins_forJV.txt

  1. Last semi related ?....with CMC going to their professional API. How is that going to impact this package?

Detailed Description

Context

Possible Implementation

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

Column names meaning

I use the crypto pakcage to retrieve historical crypto data. I am not sure about the column names meaning. Specifically, is the column 'volume' in shares or dollars? The values are all integers, so I am guessing it is in shares. Also, what does the column 'market' and 'close ratio' mean?

CMC "paid" plan and API key

This isn't a code issue but it is something that will be a clear issue soon.

Are we just going to have a place to enter our API key?

Although with CMC going to paid it will severely hurt the usage of this package... have you thought about switching to a different provider of data with free API access? Some of these actually have more data (such as Github data) than CMC.

Here are a couple:

https://p.nomics.com/cryptocurrency-bitcoin-api

https://www.coingecko.com/api/docs/v3

If I ever make money I'll be sure to tip! (seems like we are going to the opposite way right now)

Either way this is great work and I truly appreciate it.

Error when running getCoins

When I run a generic "getCoins()" command, I return the following error:

image

Error in fix.by(by.x, x) : 'by' must specify a uniquely valid column

Your Environment

  • Version used:
    R Version 3.5.0
    MacOS Sierra 10.12.6

Subscript out of bounds error

In the last few days, I've been intermittently getting an error when I run crypto_history.

crypto_history("ABBC")
♥ If this helps you become rich please consider donating

ERC-20: 0x375923Bf82F0b728d23A5704261a6e16341fd860
XRP: rK59semLsuJZEWftxBFhWuNE6uhznjz2bK


❯ Scraping historical crypto data

Error in value[[jvseq[[jjj]]]] : subscript out of bounds

I thought it might have been the workflow I was using this function within (a series of map functions), but as can be seen in the above code, it is within the function itself.

Any ideas what's going on here and what might have changed recently?

Problem With getPrices()

So, i was trying to get the price in a particular currency but the currency parameter is just ignored

INR

> getPrices(coin="bitcoin", currency="INR")
       id    name symbol rank price_usd price_btc 24h_volume_usd market_cap_usd
1 bitcoin Bitcoin    BTC    1   10775.7         1     6615640000   182157551258
  available_supply total_supply max_supply percent_change_1h percent_change_24h
1         16904475     16904475   21000000             -0.68              -4.77
  percent_change_7d        last_updated
1             -0.34 2018-03-07 09:29:25
> 

EUR

> getPrices(coin="bitcoin", currency="EUR")
       id    name symbol rank price_usd price_btc 24h_volume_usd market_cap_usd
1 bitcoin Bitcoin    BTC    1   10775.7         1     6615640000   182157551258
  available_supply total_supply max_supply percent_change_1h percent_change_24h
1         16904475     16904475   21000000             -0.68              -4.77
  percent_change_7d        last_updated
1             -0.34 2018-03-07 09:29:25
> 

Just checked for two only and the problem was there.
I checked the api of coinmarketcap directly from the examples -
https://api.coinmarketcap.com/v1/ticker/?convert=EUR&limit=10
This seems to work fine!

Please look into it!

Coin name is mislabeled in dataset for duplicate-symbols

Thanks for doing this work, greatly appreciated.

Was going to do some analysis of it on my own, and got confused by the presence of duplicates on some coins.

For example, up until 12-12, we have one datapoint per date, whereas after that shows two datapoints per date:

...
"PRO",2017-12-08,0.350132,0.35717,0.323824,0.353445,70668,4921880,"Propy",385
"PRO",2017-12-09,0.357165,0.391303,0.341962,0.368005,129489,5020740,"Propy",385
"PRO",2017-12-10,0.368921,0.368921,0.336974,0.34417,61321,5186000,"Propy",385
"PRO",2017-12-11,0.343705,0.398727,0.337944,0.398727,65037,4831540,"Propy",385
"PRO",2017-12-12,0.397612,0.529153,0.385998,0.488748,206352,5589310,"Propy",385
"PRO",2017-12-13,0.386384,0.483263,0.382225,0.428319,2150570,0,"Propy",385
"PRO",2017-12-13,0.490256,0.606039,0.489343,0.569292,190018,6891630,"Propy",385
"PRO",2017-12-14,0.428882,0.428882,0.363489,0.411705,2015520,0,"Propy",385
"PRO",2017-12-14,0.568401,0.60429,0.533319,0.575479,110802,7990140,"Propy",385
"PRO",2017-12-15,0.41248,0.427116,0.375678,0.413479,1403610,0,"Propy",385
"PRO",2017-12-15,0.576018,0.582851,0.554633,0.572736,108230,8097210,"Propy",385
"PRO",2017-12-16,0.414505,0.489333,0.401455,0.456695,3102170,0,"Propy",385
"PRO",2017-12-16,0.573556,0.805846,0.573556,0.671252,184437,8062590,"Propy",385
"PRO",2017-12-17,0.462755,0.520551,0.440206,0.454255,1461940,0,"Propy",385
"PRO",2017-12-17,0.672319,0.697868,0.607462,0.689788,145157,9450930,"Propy",385
"PRO",2017-12-18,0.453932,0.477431,0.423593,0.473935,1583290,0,"Propy",385
"PRO",2017-12-18,0.701731,0.701731,0.575447,0.644326,177428,9864380,"Propy",385

Only one has a non-empty market value...so I'm going to go with that. (I assume market refers to market-cap? I thought at first it might be showing data from two different market exchanges or something.)

Not available (for R version 3.4.4)

In Readme.md said R version is >= 3.4 but when I install with 3.4.4 it informed "package ‘crypto’ is not available (for R version 3.4.4) ". Because I cannot install R version 3.5 on ubuntu. any idea?
P/s: I've followed instruction by install packages foreach, rvest....

Some missing tokens

Thanks, this package has been amazing to help me get historical data from CoinMarketCap

Is there a list of all the available tokens?

I have been successfully running:
Tokens <- c("DAI","ETH","USDT","BTC")
HD<-crypto_history(coin = Tokens)

Yet it fails when I add "WBTC","SAI" or "ENJ"

Thanks,
Alex
PS. Watch out, looks like the package was removed from https://cran.r-project.org/web/packages/crypto/crypto.pdf

Data not downloaded anymore

Hi Jesse,
Second time that I contact you concerning this tool, again, first thing, thank you very much.
I have just updated R, Rstudio and the various packages, and I cannot load data anymore.
I have attached a screenshot below with the session infos and also the message I receive when I launch Crypto History. I understand that you have automatized the encoding mode, I don’t know if it is related to that but now data are not downloaded anymore.
My R stays as it is on screenshot with the blinking cursor and no info about the download.
Many thanks again, and I hope it is just a small glitch.
G

Your Environment

My Print Session is included on the attached screenshot.

j

error when loading library(crypto),

when I use library(crypto) i get an error.

Detailed Description

This error is as follows:

Error: package or namespace load failed for ‘crypto’:
object ‘askForSecret’ is not exported by 'namespace:rstudioapi'

any idea how to fix this?

I apologize is this isn't the right place to ask such a question.

Context

Possible Implementation

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

Error in today() : could not find function "today"

Today function is missing from the crypto function

Detailed Description

after loading the crypto library I run the following and receive

will_i_get_rich <- getCoins()
Error in today() : could not find function "today"

Context

Possible Implementation

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

Error in UseMethod("replace_na")

Hi and thanks for a great package.

When I try to execute the following code:
cryptoData <- getCoins()

I get the following result: |=============================================================================================================================================================================| 100%
user system elapsed
34.748 0.748 615.073
Error in UseMethod("replace_na"):
no applicable method for 'replace_na' applied to an object of class "character"

my session Info is:

sessionInfo()
R version 3.4.3 (2017-11-30)
Platform: x86_64-pc-linux-gnu (64-bit)
Running under: Ubuntu 16.04.4 LTS

Matrix products: default
BLAS: /usr/lib/libblas/libblas.so.3.6.0
LAPACK: /usr/lib/lapack/liblapack.so.3.6.0

locale:
[1] LC_CTYPE=en_US.UTF-8 LC_NUMERIC=C LC_TIME=sv_SE.UTF-8 LC_COLLATE=en_US.UTF-8 LC_MONETARY=sv_SE.UTF-8 LC_MESSAGES=en_US.UTF-8
[7] LC_PAPER=sv_SE.UTF-8 LC_NAME=C LC_ADDRESS=C LC_TELEPHONE=C LC_MEASUREMENT=sv_SE.UTF-8 LC_IDENTIFICATION=C

attached base packages:
[1] parallel stats graphics grDevices utils datasets methods base

other attached packages:
[1] doSNOW_1.0.16 snow_0.4-2 iterators_1.0.8 curl_2.6 lubridate_1.7.3 dplyr_0.5.0 jsonlite_1.4 magrittr_1.5 tidyr_0.6.1 Rcpp_0.12.16 crypto_0.1.5
[12] rvest_0.3.2 xml2_1.1.1 foreach_1.4.3

loaded via a namespace (and not attached):
[1] codetools_0.2-15 assertthat_0.2.0 R6_2.2.0 DBI_0.6-1 httr_1.2.1 stringi_1.1.5 lazyeval_0.2.0 tools_3.4.3 stringr_1.2.0 compiler_3.4.3
[11] tibble_1.3.0

I would love some help with this error message since I really want to use your package.

best regards,
Haakan

[Feature Request] ability to download data between start and end dates

Found this to be immensely powerful in the analysis of crypto data. I've been trying to find a good API but stumbled across your package.

My aim is to have all my data in a sql database. Right now I can easily import the resulting dataframe into the database (using sqldf). The analysis can then be conducted in Power BI

An extremely useful feature would be to able to specify start and end dates for downloading the data. In this case, I would read my sql database, check for the last downloaded date, pass this into getCoins and append the result into my sql database table. This will be much more efficient then reading the entire dataset daily.

Cheers

crypto_history not working

The function crypto_history is not working anymore

I think the problem is, that coinmarketcap changed their website and now the scraper function inside the crypto_history function reads the wrong table on the website:

library(crypto)
crypto_history(c("ETH"), start_date = 20201005)

Error in names(x) <- value :
'names' attribute [11] must be the same length as the vector [6]

1000,000

Detailed Description

Context

Possible Implementation

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

1.5 Version crypto2xts cran

Using the install.packages("crypto", dependencies = TRUE) resulted in getting the older version of crypto and therefore I got the error could not find function "crypto2xts".

Context

I did a couple things but obviously using devtools::install_github("jessevent/crypto") and then also restarting R seemed to fix it.

R script error 404 task 206 failed

Hi,
First, many thanks for this great development.
Until a few days ago I was scraping coinmarketcap historical data for all coins thanks to Excel and Power Query. It was working fine, but it was taking a long time.
When I have discovered your project a few days ago I have decided to give it a go. It took me some time to get everything set up as it was the first time for me to use R.
Finally, after a few hours everything was working fine.
I managed to used it for a few days, but now I have an error.

When I try to load the historical data with the standard command “will_i_get_rich <- getCoins()” the process goes to 100% but then I have an error message:

100%Error in scraper(attributes[i], slug[i]) :
task 206 failed - "HTTP error 404."

I tried another time and in addition I get this message:

In addition: Warning messages:
1: closing unused connection 10 (<-www.bitsumactivationserver.com:11972)
2: closing unused connection 9 (<-www.bitsumactivationserver.com:11972)
3: closing unused connection 8 (<-www.bitsumactivationserver.com:11972)
4: closing unused connection 7 (<-www.bitsumactivationserver.com:11972)
5: closing unused connection 6 (<-www.bitsumactivationserver.com:11972)
6: closing unused connection 5 (<-www.bitsumactivationserver.com:11972)
7: closing unused connection 4 (<-www.bitsumactivationserver.com:11972)
8: closing unused connection 3 (<-www.bitsumactivationserver.com:11972)

From what I understand, coinmarketcap is (now) using a kind of firewall to avoid DDoD attack or server overload. Do you think it could be the reason for the HTTP error and do you think there is way to avoid this error.

Many thanks again for your tool ;-)
Regards,
G

Symbols coming in Repeated

I've tried getCoins() twice tonight and the symbol column seems messed up. For example Bitcoins symbol both times I pulled it is 'BTCBITCOINBTC', Ethereum is 'ETHETHEREUMETH'. It looks like something I could filter out but I assume this is not the desired behavior. Just a heads up. Using R 3.4.3, crypto at current CRAN version.

Let user set # of cores

Looking in [getCoins()](https://github.com/JesseVent/crypto/blob/master/R/getCoins.R#L72) it seems like you always take the maximum number of cores available. It may be nice to let the user set that with an argument.

daily_market('BTG') bug

Detailed Description

<! daily_market('BTG') returns an error -->

Context

Possible Implementation

Your Environment

  • Version used:
  • Environment name and version (e.g. Chrome 39, node.js 5.4):
  • Operating System and version (desktop or mobile):
  • Link to your project:

Crypto Package - Historical Data - Error: HTTP status was '403 Forbidden'

Dear Users,

Since 1 day I get the following error when I try to download historical data via the 'crypto' Package:

Error in open.connection(con, "rb") : cannot open the connection
In addition: Warning message:
In open.connection(con, "rb") :
cannot open URL 'https://files.coinmarketcap.com/generated/search/quick_search.json': HTTP status was '403 Forbidden'

I also tried this via a different IP address, but it is unfortunately also not working. Is there anything we could do?

Best regards,
Patrick

No package called 'plyr' issue

When trying to run crypto_history(), I was getting the "bind_rows" error.
I loaded manually dplyr as suggested, and now getting a new error: "No package called 'plyr' issue"

`

library("crypto")
Loading required package: foreach
Loading required package: rvest
Loading required package: xml2
library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from package:stats:

filter, lag

The following objects are masked from package:base:

intersect, setdiff, setequal, union

df <- crypto_history(limit = 50)
| | 0% If this helps you become rich please consider donating
ERC-20: 0x375923Bf82F0b728d23A5704261a6e16341fd860
XRP: rK59semLsuJZEWftxBFhWuNE6uhznjz2bK
LTC: LWpiZMd2cEyqCdrZrs9TjsouTLWbFFxwCj
Error in e$fun(obj, substitute(ex), parent.frame(), e$data) :
worker initialization failed: there is no package called 'plyr'

contact with JesseVent

Dear Jesse,

I am writting because I am a student that is currently involved in R studio for an empirical papper at my University. The papper name is "Portfolio Management and Investment Strategies for Crypto-Assets". We are also using your tools from: https://github.com/JesseVent/crypto/.

Will you be so kind and would you like to have a small conversation with me because I have some questions to the code regarding my papper and I am stuck in the coding process.

kind regards
mprekr

Coinmarketcap changed table layout

Seems like coinmarketcap has changed the layout of the markets page so there are several new columns in the table available. It affects the way function crypto_exchanges() works.

Possible Implementation

the only snippet that needs to be updated is the list of columns headers -->colnames
here is the working code

colnames(exchangedata) <-
c(
"slug",
"exchange_rank",
"exchange_name",
"trading_pair",
"exchange_volume",
"exchange_price",
"exchange_share",
"category",
"fee_type",
"last_updated",
"symbol",
"name",
"coin_rank"
)
PS thanks a lot for buiding such a usefull lib

Include historic data as .rda file

I think it would be nice to have an initial dataset of all (or top 100) coins until a recent day, saved as dataset of this package, as the download of all coin histories can take quite some time.
Then it would only be necessary to fill up that time gap, which should be much faster.

I have an .rda file of 40 different coins until the 24.06.2019 and thats about 1.2 MB and took several hours to download with crypto_history(). It might also be possible to upload that file on a public Dropbox account or similar, if the size of the data is too too big to include in a package.

I am not sure how many coins are available in total for historical data. Is it 2210 as the result of crypto_list() suggests?

no package called 'plyr' issue

#When trying to run crypto_history(), I was getting the "bind_rows" error.
I loaded manually dplyr as suggested, and now getting a new error: "No package called 'plyr' issue"
`

library("crypto")
Loading required package: foreach
Loading required package: rvest
Loading required package: xml2
library(dplyr)

Attaching package: ‘dplyr’

The following objects are masked from package:stats:

filter, lag

The following objects are masked from package:base:

intersect, setdiff, setequal, union

df <- crypto_history(limit = 50)
| 0% If this helps you become rich please consider donating
ERC-20: 0x375923Bf82F0b728d23A5704261a6e16341fd860
XRP: rK59semLsuJZEWftxBFhWuNE6uhznjz2bK
LTC: LWpiZMd2cEyqCdrZrs9TjsouTLWbFFxwCj
Error in e$fun(obj, substitute(ex), parent.frame(), e$data) :
worker initialization failed: there is no package called 'plyr'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.