Skip to content

Commit

Permalink
Merge branch 'release/0.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
man-c committed Dec 13, 2019
2 parents 60b3022 + d61f26e commit 60b54f1
Show file tree
Hide file tree
Showing 4 changed files with 53 additions and 12 deletions.
27 changes: 16 additions & 11 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@

1.2.0 / 2019-12-13
==================

* added indexes endpoints (/indexes, /indexes/{id}, /indexes/list)

1.1.0 / 2019-12-06
==================

Expand All @@ -7,17 +12,17 @@
1.0.0 / 2019-11-17
==================

* update tests
* include more contract endpoints
* include /coins/{id}/market_chart/range endpoint
* updated tests
* included more contract endpoints
* included /coins/{id}/market_chart/range endpoint
* basic methods for finance endpoints with tests
* updated error handling
* added check for json format in __request; coingecko returns a html string when something goes wrong in the request, which results in an error when json.loads is called on the html string.

0.4.0 / 2019-08-20
==================

* include /exchanges/{id}/volume_chart endpoint
* included /exchanges/{id}/volume_chart endpoint

0.3.0 / 2019-05-31
==================
Expand All @@ -37,17 +42,17 @@
==================

* README incude examples
* include /exchanges/list endpoint
* included /exchanges/list endpoint

0.1.0 / 2019-01-02
==================

* add /coins/{id}/tickers endpoint
* include events endpoints
* include status_updates endpoints
* update exchanges endpoints
* update coins endpoints
* include simple endpoints
* added /coins/{id}/tickers endpoint
* included events endpoints
* included status_updates endpoints
* updated exchanges endpoints
* updated coins endpoints
* included simple endpoints

0.0.2 / 2018-11-20
==================
Expand Down
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -151,6 +151,19 @@ https://www.coingecko.com/api/docs/v3
```python
cg.get_finance_products()
```
- *indexes (beta)*
- **/indexes** (List all market indexes)
```python
cg.get_indexes()
```
- **/indexes/{id}** (Get market index by id)
```python
cg.get_indexes_by_id()
```
- **/indexes/list** (List market indexes id and name)
```python
cg.get_indexes_list()
```
- *derivatives (beta)*
- **/derivatives** (List all derivative tickers)
```python
Expand Down
23 changes: 23 additions & 0 deletions pycoingecko/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -267,6 +267,29 @@ def get_finance_products(self):

return self.__request(api_url)

# ---------- INDEXES ----------#
def get_indexes(self, **kwargs):
"""List all market indexes"""

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

return self.__request(api_url)

def get_indexes_by_id(self, id):
"""Get market index by id"""

api_url = '{0}indexes/{1}'.format(self.api_base_url, id)

return self.__request(api_url)

def get_indexes_list(self):
"""List market indexes id and name"""

api_url = '{0}indexes/list'.format(self.api_base_url)

return self.__request(api_url)

# ---------- DERIVATIVES ----------#
def get_derivatives(self):
"""List all derivative tickers"""
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='1.1.0',
version='1.2.0',
packages=['pycoingecko',],
license='MIT',
description = 'Python wrapper around the CoinGecko API',
Expand Down

0 comments on commit 60b54f1

Please sign in to comment.