diff --git a/README.md b/README.md index 48f9108..292be73 100644 --- a/README.md +++ b/README.md @@ -125,6 +125,10 @@ https://www.coingecko.com/api/docs/v3 ```python cg.get_exchanges_status_updates_by_id() ``` + - /exchanges/{id}/volume_chart (Get volume_chart data for a given exchange (beta)) + ```python + cg.get_exchanges_volume_chart_by_id() + ``` - status_updates (beta) - /status_updates (List all status_updates with data (description, category, created_at, user, user_title and pin)) ```python diff --git a/pycoingecko/api.py b/pycoingecko/api.py index f603c29..196d7a2 100644 --- a/pycoingecko/api.py +++ b/pycoingecko/api.py @@ -226,6 +226,18 @@ def get_exchanges_status_updates_by_id(self, id, **kwargs): return self.__request(api_url) + @list_args_to_comma_separated + def get_exchanges_volume_chart_by_id(self, id, days, **kwargs): + """Get volume chart data for a given exchange""" + + kwargs['days'] = days + + api_url = '{0}exchanges/{1}/volume_chart'.format(self.api_base_url, id) + api_url = self.__api_url_params(api_url, kwargs) + + return self.__request(api_url) + + #---------- STATUS UPDATES ----------# @list_args_to_comma_separated def get_status_updates(self, **kwargs): diff --git a/setup.py b/setup.py index 7acf0fc..3973705 100644 --- a/setup.py +++ b/setup.py @@ -3,7 +3,7 @@ setuptools.setup( name='pycoingecko', - version='0.3.0', + version='0.4.0', packages=['pycoingecko',], license='MIT', description = 'Python wrapper around the CoinGecko API',