mirror of
https://github.com/OpenBB-finance/OpenBB.git
synced 2026-10-29 05:21:48 +00:00
* 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>
955 B
Vendored
955 B
Vendored
Update list of coins
Coingecko
-
File:
/data/coingecko_coins.json -
File:
/data/coingecko_categories.json -
Code:
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
Defillama
- File:
/data/defillama_dapps.json - Endpoint: https://api.llama.fi/protocols
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']