Features
- Get exchange rate data for a given base and target currency.
- Receive data in JSON format through the API.
- View exchange rates via a web interface.
Requirements
- Python 3.x
- Flask
- Requests
- BeautifulSoup4
Usage
Navigate to the homepage to view exchange rates visually at https://currency.osmanbeyhan.com/api.
API
You can retrieve exchange rate data by using the following endpoint:
GET /api
Parameters
-
base: Base currency (default:
EUR) -
target: Target currency (default:
TRY)
Example Request
GET /api?base=USD&target=TRY
Example Response
{
"base_currency": "USD",
"target_currency": "TRY",
"exchange_rate": "18.456"
}
Error Response
{
"error": "Could not fetch exchange rate"
}
Development
This project is developed using Flask. Feel free to fork the repository and make any changes you like.
License
This project is licensed under the MIT License.