Skip to content

Commit

Permalink
Added /companies/public_treasury/{coin_id} endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
man-c committed Jun 6, 2021
1 parent f78aed4 commit dff4e0e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 5 deletions.
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ https://www.coingecko.com/api/docs/v3
```python
cg.get_coins_categories()
```
- *exchanges (beta)*
- *exchanges*
- **/exchanges** (List all exchanges)
```python
cg.get_exchanges_list()
Expand All @@ -169,7 +169,7 @@ https://www.coingecko.com/api/docs/v3
```python
cg.get_exchanges_volume_chart_by_id()
```
- *finance (beta)*
- *finance*
- **/finance_platforms** (List all finance platforms)
```python
cg.get_finance_platforms()
Expand All @@ -178,7 +178,7 @@ https://www.coingecko.com/api/docs/v3
```python
cg.get_finance_products()
```
- *indexes (beta)*
- *indexes*
- **/indexes** (List all market indexes)
```python
cg.get_indexes()
Expand All @@ -187,7 +187,7 @@ https://www.coingecko.com/api/docs/v3
```python
cg.get_indexes_list()
```
- *derivatives (beta)*
- *derivatives*
- **/derivatives** (List all derivative tickers)
```python
cg.get_derivatives()
Expand All @@ -204,7 +204,7 @@ https://www.coingecko.com/api/docs/v3
```python
cg.get_derivatives_exchanges_list()
```
- status_updates (beta)
- *status_updates*
- **/status_updates** (List all status_updates with data (description, category, created_at, user, user_title and pin))
```python
cg.get_status_updates()
Expand Down Expand Up @@ -241,6 +241,11 @@ https://www.coingecko.com/api/docs/v3
```python
cg.get_global_decentralized_finance_defi()
```
- *companies (beta)*
- **/companies/public_treasury/{coin_id}** (Get public companies data)
```python
cg.get_companies_public_treasury_by_coin_id()
```

### Test

Expand Down
10 changes: 10 additions & 0 deletions pycoingecko/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,3 +476,13 @@ def get_global_decentralized_finance_defi(self, **kwargs):

return self.__request(api_url)['data']

# ---------- COMPANIES ----------#
@func_args_preprocessing
def get_companies_public_treasury_by_coin_id(self, coin_id, **kwargs):
"""Get public companies data"""

api_url = '{0}companies/public_treasury/{1}'.format(self.api_base_url, coin_id)
api_url = self.__api_url_params(api_url, kwargs)

return self.__request(api_url)

0 comments on commit dff4e0e

Please sign in to comment.