man-c / pycoingecko

Python wrapper for the CoinGecko API
MIT License
1.04k stars 268 forks source link

Pagination #21

Closed Technaut closed 3 years ago

Technaut commented 3 years ago

Hi,

I am trying to use get_exchanges_tickers_by_id() to pull all tickers by exchange. I believe this needs to use pagination, by way of page_integer, to get all of the results. However I cannot seem to get multiple pages to return.

The two lines of code below, produce the same results. same tickers just the volume etc that is slightly different

cg.get_exchanges_tickers_by_id('binance', page_integer = 1)
cg.get_exchanges_tickers_by_id('binance', page_integer = 2)
man-c commented 3 years ago

Hi,

The correct argument for pagination is page and not page_integer.

The code for that should be:

cg.get_exchanges_tickers_by_id('binance', page = 1)
cg.get_exchanges_tickers_by_id('binance', page = 2)

To make sure that your are using properly each endpoint and its arguments you should check the API documentation.

Technaut commented 3 years ago

thanks! Sorry I picked up the wrong argument for that endpoint..