mess110 / coinmarketcap.northpole.ro

A straightforward JSON API for all the currencies and assets found on coinmarketcap.com crawled every 5 minutes
MIT License
41 stars 11 forks source link

History.json #22

Closed jupiter50 closed 7 years ago

jupiter50 commented 7 years ago

I was wondering where the history.json is in Github? When installing it on my on my own server there is no file so I can't pull history correctly:

http://coinmarketcap.northpole.ro/history.json?coin=bitcoin&period=2017&format=array

mess110 commented 7 years ago

The history is gathered with the help of a cron job every day. It takes a snapshot every day and writes it to disk. The only way you can get it is by downloading the files the API provides.

If you like to get your hands dirty, maybe you can write it as a command line option. See https://github.com/mess110/coinmarketcap.northpole.ro/blob/master/script.rb#L491

That way many people can download the whole history which is found on coinmarketcap.northpole.ro to their own server. That way we can also improve on distributing the data around so it is not lost.

If you do decided to try this, pls say so, I can guide you.

jupiter50 commented 7 years ago

I've got a copy of your script running locally and it works fine but I can't find the history.json that redirects and pulls the right data? All I have is like bitcoin_2017.json

mess110 commented 7 years ago

Not sure I know what you mean.

Use this request to get 2016 data. It is served through the ki app

jupiter50 commented 7 years ago

Hi

I'm talking about the actual code/file called "history.json" which takes the parameters and pulls the right data. In your code base, I can't find this and "coins.json". I installed and pulled all the files from git but on my local server and setup a cron job, but it still doesn't have these files.

Thanks

Sent from Outlookhttp://aka.ms/weboutlook


From: Cristian Mircea Messel notifications@github.com Sent: 30 July 2017 20:41 To: mess110/coinmarketcap.northpole.ro Cc: jupiter50; Author Subject: Re: [mess110/coinmarketcap.northpole.ro] History.json (#22)

Not sure I know what you mean.

Use thishttp://coinmarketcap.northpole.ro/history.json?coin=bitcoin&year=2016 request to get 2016 data. It is served through the ki app

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/mess110/coinmarketcap.northpole.ro/issues/22#issuecomment-318924440, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AcjvYHTB3nXDSlFhJ9DHvhvecXy5Ruioks5sTNxXgaJpZM4OiFVh.

mess110 commented 7 years ago

Ok, for that you need to run the ki webapp. You can read about it here: https://github.com/mess110/ki

You basically need to run ki server

They are not files per say, they are requests handled by ki