Skip to content

Instantly share code, notes, and snippets.

@simonvc
Created November 3, 2020 17:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save simonvc/9820fefa7b33050d999441e1d99a0cc8 to your computer and use it in GitHub Desktop.
Save simonvc/9820fefa7b33050d999441e1d99a0cc8 to your computer and use it in GitHub Desktop.
import requests
from pyfiglet import Figlet
# {"0x44ea84a85616f8e9cd719fc843de31d852ad7240":{"usd":0.628788}}
import requests
r = requests.get(
url="https://api.coingecko.com/api/v3/simple/token_price/ethereum?contract_addresses=0x44ea84a85616f8e9cd719fc843de31d852ad7240&vs_currencies=USD"
)
contract = "0x44ea84a85616f8e9cd719fc843de31d852ad7240"
f = Figlet(font="banner")
value = r.json()[contract]["usd"]
value=value*100
value=int(value)
print(f.renderText(str(value) + "% Biden Win"))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment