Skip to content

Commit

Permalink
Merge branch 'release/2.1.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
man-c committed Jun 3, 2021
2 parents 0259453 + cc06543 commit 07484c5
Show file tree
Hide file tree
Showing 4 changed files with 49 additions and 1 deletion.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

2.1.0 / 2021-06-03
==================

* Added asset_platforms (/asset_platforms) and categories (/coins/categories/list, coins/categories) endpoints

2.0.0 / 2021-04-23
==================

Expand Down
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,20 @@ https://www.coingecko.com/api/docs/v3
```python
cg.get_coin_market_chart_range_from_contract_address_by_id()
```
- *asset_platforms*
- **/asset_platforms** (List all asset platforms (Blockchain networks))
```python
cg.get_asset_platforms()
```
- *categories*
- **/coins/categories/list** (List all categories)
```python
cg.get_coins_categories_list()
```
- **coins/categories** (List all categories with market data)
```python
cg.get_coins_categories()
```
- *exchanges (beta)*
- **/exchanges** (List all exchanges)
```python
Expand Down
29 changes: 29 additions & 0 deletions pycoingecko/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,35 @@ def get_coin_market_chart_range_from_contract_address_by_id(self, id, contract_a

return self.__request(api_url)

# ---------- ASSET PLATFORMS ----------#
@func_args_preprocessing
def get_asset_platforms(self, **kwargs):
"""List all asset platforms (Blockchain networks)"""

api_url = '{0}asset_platforms'.format(self.api_base_url)
api_url = self.__api_url_params(api_url, kwargs)

return self.__request(api_url)

# ---------- CATEGORIES ----------#
@func_args_preprocessing
def get_coins_categories_list(self, **kwargs):
"""List all categories"""

api_url = '{0}coins/categories/list'.format(self.api_base_url)
api_url = self.__api_url_params(api_url, kwargs)

return self.__request(api_url)

@func_args_preprocessing
def get_coins_categories(self, **kwargs):
"""List all categories with market data"""

api_url = '{0}coins/categories'.format(self.api_base_url)
api_url = self.__api_url_params(api_url, kwargs)

return self.__request(api_url)

# ---------- EXCHANGES ----------#
@func_args_preprocessing
def get_exchanges_list(self, **kwargs):
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

setuptools.setup(
name='pycoingecko',
version='2.0.0',
version='2.1.0',
packages=['pycoingecko',],
license='MIT',
description = 'Python wrapper around the CoinGecko API',
Expand Down

0 comments on commit 07484c5

Please sign in to comment.