Skip to content

Commit

Permalink
Switch to api.frankfurter.app for rates
Browse files Browse the repository at this point in the history
  • Loading branch information
tarioch committed Oct 3, 2023
1 parent 2122268 commit e055d16
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions beanprice/sources/ratesapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@
Valid tickers are in the form "XXX-YYY", such as "EUR-CHF".
Here is the API documentation:
https://exchangerate.host/
https://api.frankfurter.app/
For example:
https://api.exchangerate.host/api/latest?base=EUR&symbols=CHF
https://api.frankfurter.app/latest?base=EUR&symbols=CHF
Timezone information: Input and output datetimes are specified via UTC
Expand Down Expand Up @@ -48,7 +48,7 @@ def _get_quote(ticker, date):
'base': base,
'symbol': symbol,
}
response = requests.get(url='https://api.exchangerate.host/' + date, params=params)
response = requests.get(url='https://api.frankfurter.app/' + date, params=params)

if response.status_code != requests.codes.ok:
raise RatesApiError("Invalid response ({}): {}".format(response.status_code,
Expand Down

0 comments on commit e055d16

Please sign in to comment.