Skip to content

Latest commit

 

History

History
34 lines (29 loc) · 787 Bytes

README.md

File metadata and controls

34 lines (29 loc) · 787 Bytes

simplex_interview

Create an API to get a quote for exchange rate between USD, ILS and EUR

API

HTTP URL Request Parameters Response Parameters
GET /api/quote/ from_currency_code - one of USD|ILS|EUR
to_currency_code - one of USD|ILS|EUR
amount - number of cents to convert
exchange_rate
currency_code
amount
provider_name

Setup (once)

docker-compose build

Run

docker-compose up

Test

API request for quote for USD to EUR exchange rate

Request:

curl http://127.0.0.1:5000/api/quote?from_currency_code=USD&to_currency_code=EUR&amount=100

Response:

{
  "amount": 86.1,
  "currency_code": "EUR",
  "exchange_rate": 0.861,
  "provider_name": "Exchange Rate API"
}