Skip to content

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

Notifications You must be signed in to change notification settings

adamshai/simplex_interview

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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"
}

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published