Created
December 1, 2021 08:39
-
-
Save makzan/0fff74313b6a3b6d5b192afb5984586d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import requests | |
url = "https://api.coingecko.com/api/v3/simple/price?ids=osmosis,likecoin&vs_currencies=usd" | |
res = requests.get(url) | |
data = res.json() | |
like_usd = data["likecoin"]["usd"] | |
osmo_usd = data["osmosis"]["usd"] | |
result = f"現時 LIKE 兌美元為 {like_usd},OSMO 兌美元為 {osmo_usd}。" | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment