Created
July 26, 2021 13:12
-
-
Save KolevDarko/63819e0c31ffef3e61a9a6adf7428d90 to your computer and use it in GitHub Desktop.
Get Dogecoin price
This file contains hidden or 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 | |
BA_API_KEY = 'your api key here' | |
def get_dogecoin_price(): | |
price_url = 'https://apiv2.bitcoinaverage.com/indices/crypto/ticker/DOGEUSD' | |
response = requests.get(price_url, headers={'x-ba-key': BA_API_KEY}) | |
return response.json() | |
result = get_dogecoin_price() | |
print(result) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment