Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python - exchange rate API

import requests

APP_ID = "**********************"
ENDPOINT = "https://openxchangerates.org/latest.json"
response = requests.get(f"{ENDPOINT}?app_id={APP:ID}")
exchange_rate = response.json()["rates"]
usd_amount = 1000
gbp_amount = usd_amount * exchange_rate["GBP"]
print(f"USD{usd_amount} is GBP{gbp_amount}")				
Source by www.exchangerate-api.com #
 
PREVIOUS NEXT
Tagged: #python #exchange #rate #API
ADD COMMENT
Topic
Name
1+4 =