Created
October 5, 2017 08:53
-
-
Save danyashorokh/0cf0be6e49864fb83222512a439ad213 to your computer and use it in GitHub Desktop.
[Python] Get actual currency rates (api)
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
# https://www.exchangerate-api.com | |
import requests | |
proxies = { | |
"https": "https://User:Password@fx-proxy:8080", | |
} | |
api_key = 'pifpaf' | |
# Where USD is the base currency you want to use | |
url = 'https://v3.exchangerate-api.com/bulk/' + api_key + '/USD' | |
# Making our request | |
response = requests.get(url, proxies=proxies) | |
data = response.json() | |
# Your JSON object | |
print(data['rates']['RUB']) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment