Skip to content

Instantly share code, notes, and snippets.

@tecsify
Created May 18, 2021 23:16
Show Gist options
  • Save tecsify/ecbe2f7dcb5dc797a0c2926e5b993397 to your computer and use it in GitHub Desktop.
Save tecsify/ecbe2f7dcb5dc797a0c2926e5b993397 to your computer and use it in GitHub Desktop.
"""Obten el precio de criptomonedas con Python por #Tecsify
¡Tecnología que empodera!"""
import cryptocompare as cc
import datetime
coin = cc.get_price('DOGE', currency='USD')
print(coin)
coin = cc.get_price('SHIB', currency='COL')
print(coin)
coin = cc.get_price(['BTC', 'ETH'], ['MXN', 'GTQ'])
print(coin)
fecha = datetime.datetime(2013,5,6)
coin = cc.get_historical_price('BTC','USD', timestamp=fecha)
print(coin,fecha)
#www.Tecsify.com/blog
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment