-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
crypto_history not working #49
Comments
wrote my own function: |
same issue: same issue, slightly different funciton call:
|
Yep, came here for the same issue. Augur2 great function! Thank you! Can anyone suggest another package with similar functionality? |
Thanks KyleBenzle! I went to 'Inspect element' in my browser and searched for some numbers that I saw in the table... Maybe this is an alternative / more elegant approach: https://stackoverflow.com/questions/64761914/scraping-historical-data-from-coinmarketcap |
Thanks augur2! Noting for others that the input for currency is the symbol not the actual name anymore (ex: "Bitcoin" is now "BTC" using this function. |
updated the function: |
See also here for a similar solution ... and much more 👍 |
Sorry guys been sidelined with work priorities and havent really given this package the time I should have.. This is pretty much the godsend for working out the classes you need to extract https://selectorgadget.com/... I'll try have a look at whats happening |
I just pushed a change that pretty much just aligns it to what you were doing @augur2 so thanks for that - please test it out by installing latest version Thanks |
Not working again... Getting the following error: histeth <- crypto_history(c("ETH"), start_date = 20201129) ERC-20: 0x375923Bf82F0b728d23A5704261a6e16341fd860
Error in table$props$initialState$cryptocurrency$ohlcvHistorical[[1]] : seems like CMP changed their website again |
As I wrote on my Github page for the R package bitcoinFinance, unfortunately, it is clear that coinmarketcap wants to monetize their historical data and they are pushing people to subscribe to their commercial API. This is the third (!!!) change of their website for historical data in less than 1 year. Currently, I have no time to deal with it. If someone can find a solution, please post it here, or on the Github page of my package bitcoinFinance. Thanks! |
Hey all, I was able to come up with a solution to the discussed problem. Long story short: I used coingecko.com instead of coinmarketcap.com. I'll try to open a PR to see if @JesseVent will incorporate my changes. In the meantime, feel free to use the code chunk below. You'll need the following packages to make it work:
|
Thanks realauggieheschmeyer. To make your solution work, you'll need also the packages "timetk" and "janitor". I don't know if Coingecko is the right source, because they only have "open" and "close" but not "high" and "low"... |
Found this: https://stackoverflow.com/questions/65514076/getting-no-data-when-scraping-a-table you can scrape the cmc data for free without registration via their API. Maybe this can be implemented in the crypto_history function... |
I corrected the "download_coinmarketcap_daily" function in my package bitcoinFinannce + I added another function named "bitcoincharts_download_large" which is specifically suited for large files from bitcoincharts: |
Hello, I'm facing a related issue with crypto_history in the crypto library. From its example code, R> library(crypto) R> will_i_get_rich <- crypto_history(limit=10) ERC-20: 0x375923Bf82F0b728d23A5704261a6e16341fd860 ❯ Scraping historical crypto data Error in table$props$initialState$cryptocurrency : Could anyone shed light regarding how to solve this problem, please? TIA |
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]
The text was updated successfully, but these errors were encountered: