Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -51,11 +51,8 @@ def crypto_analysis(crypto_name: str) -> str:
|
|
| 51 |
A JSON-formatted string containing the crypto analysis if successful,
|
| 52 |
otherwise an error message
|
| 53 |
"""
|
| 54 |
-
import os
|
| 55 |
-
import json
|
| 56 |
-
import requests
|
| 57 |
|
| 58 |
-
url = f"https://rest.coincap.io/v3/assets/{crypto_name}?apiKey={os.getenv(key='
|
| 59 |
try:
|
| 60 |
response = requests.get(url)
|
| 61 |
response.raise_for_status() # Raise exception for bad status codes
|
|
|
|
| 51 |
A JSON-formatted string containing the crypto analysis if successful,
|
| 52 |
otherwise an error message
|
| 53 |
"""
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
+
url = f"https://rest.coincap.io/v3/assets/{crypto_name}?apiKey={os.getenv(key='coincap_api')}"
|
| 56 |
try:
|
| 57 |
response = requests.get(url)
|
| 58 |
response.raise_for_status() # Raise exception for bad status codes
|