Get Currency Conversion
GET/api/currency/convert
Get a currency conversion estimate based on present conversion rates.
Request
Query Parameters
The currency alpha code to convert from
The amount of currency
to convert to destination currency, an integer in the smallest denomination for the given currency
The target currency alpha code for the conversion. Defaults to USD
Responses
- 200
- 400
- application/json
- Schema
- Example (from schema)
- Example
Schema
The currency to convert from.
The currency converted to.
The amount of currency to convert to destination currency denominated in the major unit. An integer in the smallest denomination for the given currency.
The resulting amount of the conversion from currency
into convertedCurrency
denominated in the smallest denomination for the given currency.
The conversion rate applied to arrive at the convertedAmount
of the convertedCurrency
from the amount
of currency
.
{
"currency": "string",
"convertedCurrency": "string",
"amount": "string",
"convertedAmount": "string",
"rate": "string"
}
{
"currency": "NZD",
"convertedCurrency": "USD",
"amount": 1000,
"convertedAmount": 696.2285,
"rate": 0.6962285
}
Request fields are invalid
- application/json
- Schema
- Example (from schema)
Schema
{
"statusCode": 400,
"statusName": "Bad Request",
"errorCode": "BAD_REQUEST",
"errors": [
"Expected string, received number"
]
}