man-c / pycoingecko

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

get_coins_markets() no sparkline #35

Closed trevisanj closed 3 years ago

trevisanj commented 3 years ago
cg = pycoingecko.CoinGeckoAPI()

m = cg.get_coins_markets(vs_currency="USD", per_page=1, order="market_cap_desc", page=1, sparkline=True, price_change_percentage="1h,24h,7d,14d,30d,200d,1y")
print(m)

You've got to do it as sparkline='true' otherwise the sparkline does not come

Boolean conversion to a string that CoinGecko can understand would be nice

trevisanj commented 3 years ago

I just created a pull request having this.

man-c commented 3 years ago

Great! Thanks for contributing. I was already planning to include this behavior!