Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -50,7 +50,8 @@ def fetch_active_crypto() -> Optional[Dict[str, Any]]:
|
|
50 |
Optional[Dict[str, Any]]: A dictionary containing the top 10 cryptocurrencies by market cap,
|
51 |
or None if an error occurs.
|
52 |
"""
|
53 |
-
url = 'https://sandbox-api.coinmarketcap.com/v1/cryptocurrency/listings/latest'
|
|
|
54 |
parameters = {
|
55 |
'start': '1',
|
56 |
'limit': '5000',
|
@@ -58,7 +59,8 @@ def fetch_active_crypto() -> Optional[Dict[str, Any]]:
|
|
58 |
}
|
59 |
headers = {
|
60 |
'Accepts': 'application/json',
|
61 |
-
'X-CMC_PRO_API_KEY': '
|
|
|
62 |
}
|
63 |
|
64 |
session = requests.Session()
|
|
|
50 |
Optional[Dict[str, Any]]: A dictionary containing the top 10 cryptocurrencies by market cap,
|
51 |
or None if an error occurs.
|
52 |
"""
|
53 |
+
# url = 'https://sandbox-api.coinmarketcap.com/v1/cryptocurrency/listings/latest'
|
54 |
+
url = 'https://pro-api.coinmarketcap.com/v1/cryptocurrency/listings/latest'
|
55 |
parameters = {
|
56 |
'start': '1',
|
57 |
'limit': '5000',
|
|
|
59 |
}
|
60 |
headers = {
|
61 |
'Accepts': 'application/json',
|
62 |
+
'X-CMC_PRO_API_KEY': 'e375c697-e504-464e-b800-2b8cf9c67765',
|
63 |
+
# 'X-CMC_PRO_API_KEY': 'b54bcf4d-1bca-4e8e-9a24-22ff2c3d462c',
|
64 |
}
|
65 |
|
66 |
session = requests.Session()
|