tiaanduplessis / coinmarketcap-api

CoinMarketCap API wrapper for node
MIT License
121 stars 37 forks source link

Add return all tickers support ?. #16

Closed CruiseMan closed 6 years ago

CruiseMan commented 6 years ago

Do you guys have plans to add support for returning all ticker as it was in v1 ?

client.getTicker({limit: 0})
abhinavk99 commented 6 years ago

According to https://coinmarketcap.com/api/, the default and max number of tickers returned is 100, so if you don't supply a limit it will automatically give you 100 tickers.

CruiseMan commented 6 years ago

I asked a different question, do you plan to add functionality to return all tickers when supply limit: 0. We can make it, currently CM allows 30 rps, so we can query 100 ticker per request. Total tickers 1647.

abhinavk99 commented 6 years ago

The API doesn't support that anymore, I guess we could add a method to paginate through 100 results at a time and return all the tickers. I'll attempt to add that sometime soon, or you could make a PR if you'd like.