Currency conversion
Convert a source currency to a target currency.
Query Parameters
- currency string required
The currency alpha code to convert from
- amount string required
The amount of
currency
to convert to destination currency, an integer in the smallest denomination for the given currency - targetCurrency string
The target currency alpha code for the conversion. Defaults to
USD
- 200
- 400
- application/json
- Schema
- Example (from schema)
- Example
Schema
- currency string
The currency to convert from.
- convertedCurrency string
The currency converted to.
- amount string
The amount of currency to convert to destination currency denominated in the major unit. An integer in the smallest denomination for the given currency.
- convertedAmount string
The resulting amount of the conversion from
currency
intoconvertedCurrency
denominated in the smallest denomination for the given currency. - rate string
The conversion rate applied to arrive at the
convertedAmount
of theconvertedCurrency
from theamount
ofcurrency
.
{
"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 integer required
- statusName string required
- errorCode string required
- errors string[]
{
"statusCode": 400,
"statusName": "Bad Request",
"errorCode": "BAD_REQUEST",
"errors": [
"Expected string, received number"
]
}