- Traverse through the project directory
cd currency_conversion
- Start the project in docker
docker-compose up -d --build
- Stop the project in docker
docker-compose down
A migration script is present in the app/migrations 0001_intial.py, that helps in creating data after intialising the model.
-
Api to convert currency
http://localhost:8000/api/v1/convert_currency?source={source-currency-code}&target={source-currency-code}&amount={amount}
example: http://localhost:8000/api/v1/convert_currency?source=USD&target=INR&amount=1000 source-currrency-code refers to code of the source currency target-currrency-code refers to code of the target currency amount refers to the amount that needs to be calculated
-
Api to get last updated date of a currency
http://localhost:8000/api/v1/last_updated/{currency-code}
example: http://localhost:8000/api/v1/last_updated/{currency-code} currrency-code refers to code of the source currency
-
Api to update the exchange rates
http://localhost:8000/api/v1/update_exchange_rates