Files
OpenBB/gamestonk_terminal/cryptocurrency/data/README.md
jose-donato 4501dfd442 Crypto features: Replace coingecko scrapping (#1156)
* replaced cgcategories with api

* added coingecko categories

* refactoring commands to use api, added coins to cryptocontroller and merged find and coins

* autocompletion for coins

* removed unused vars

* added dappradar features

* refactoring commands position

* refactoring commands position

* adding visual commands and fixed report

* skipped tests for now

* lint notebook

* correct report

* black formatter keeps crying because notebook

* removed unused imports

* Fixed black

* Keep kernel metadata 'cause it's required by papermill

* Change jupyter cleanup hook to one based on nbconvert

* Try fix the hook I just broke

* Fix trailing commas in the crypto notebook

* Change the jupyter hook to a one that's featured on pre-commit's page

* Format report notebook and test new notebook hook

* Black the notebook

* Remove deleted functions from the crypto discovery API

* Remove deleted functions from the crypto overview API

* replaced print for console print and removed print from table

* replaced print for console print and removed print from table

* auto completion + sort for all discovery commands

* replacing help messages

* fix linting

* added docs and removed unused commands

* added todos and fixed help messages

* lint

* pr issues fixed

* updated tests

* tests merge

* replaced with new rich table function

Co-authored-by: Colin Delahunty <colin99delahunty@gmail.com>
Co-authored-by: Theodore Aptekarev <aptekarev@gmail.com>
2022-01-25 14:05:00 +00:00

38 lines
955 B
Markdown
Vendored

## Update list of coins
### Coingecko
- File: `/data/coingecko_coins.json`
- Endpoint: [https://api.coingecko.com/api/v3/coins/list](https://api.coingecko.com/api/v3/coins/list)
- File: `/data/coingecko_categories.json`
- Endpoint: [https://api.coingecko.com/api/v3/coins/list](https://api.coingecko.com/api/v3/coins/list)
- Code:
```python
new_categories = {}
for category in categories:
new_categories[category['category_id']] = category['name']
```
### Coinpaprika
- File: `/data/coinpaprika_coins.json`
- Endpoint: [https://api.coinpaprika.com/v1/coins](https://api.coinpaprika.com/v1/coins)
### Defillama
- File: `/data/defillama_dapps.json`
- Endpoint: [https://api.llama.fi/protocols](https://api.llama.fi/protocols)
```python
import requests
API_URL = "https://api.llama.fi"
url = f"{API_URL}/protocols"
r = requests.get(url)
data = r.json()
protocols = {}
for protocol in data:
protocols[protocol['slug']] = protocol['name']
```