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 of the last 7 and 14 days #12

Closed vanlooverenkoen closed 7 years ago

vanlooverenkoen commented 7 years ago

Is there a way we can get a history endpoint that gives you all the data of the last 7 and 14 days, (with data of every hour)

mess110 commented 7 years ago

Don't have data every hour, only have it at daily intervals or "now".

If you are interested, I can add a param for last x days.

vanlooverenkoen commented 7 years ago

That would be awesome as well. But what I realy wanted to do is to show a more detailed version of every hour. Is this possible to add this in a future update. You only need to keep the info for 14 days the rest can be deleted

mess110 commented 7 years ago

http://coinmarketcap.northpole.ro/history.json?coin=BTC&period=14days&version=v7

vanlooverenkoen commented 7 years ago

the format of the date is wrong

"date":"02-26-06-2017" "date":"00-26-06-2017" "date":"06-26-06-2017" ...

mess110 commented 7 years ago

That is somewhat debatable. It could need improving, depending on what we discuss now.

The format is: HH-dd-MM-YYYY.

HH - Hour of the day, 24-hour clock, zero-padded (00..23) dd - Day of the month, zero-padded (01..31) MM - Month of the year, zero-padded YYYY - Year with century (can be negative, 4 digits at least)