Ensure the amount is provided in minor units, and the from and to fields are valid ISO currency codes. Handle cases where the input parameters are missing or invalid to return a 400 - Bad Request response.

POST /exchange/convert

Sample Request

{
  "amount": 75000,
  "from": "USD",
  "to": "NGN"
}

Responses

200 - Conversion Result

Sample Response

{
  "data": {
    "converted_amount": 100
  }
}

400 - Bad Request

Indicates a problem with the request (e.g., missing or invalid parameters).