Convert
Converts an amount from one currency to another using current exchange rates. Returns both the original and converted amounts.
Endpoint
POST/v2/currency
Link
Request
Headers
Authorization
Bearer <JWT>
Yes
Content-Type
application/json
Yes
Accept
application/json
Yes
Request Body (JSON)
amount
object
Source amount to convert (see Money Object below).
Yes
-
toCurrencyIso
string
Target currency (ISO 4217 code).
Yes
"EUR"
Money Object
currencyCode
string
Source currency (ISO 4217 code).
"USD"
units
string
Whole units (e.g., dollars).
"100"
nanos
integer
Fractional units (nanos = 10^-9).
500000000 (= $0.50)
Example Request Body:
json
Response (200 OK)
Returns both the original and converted amounts.
Response Fields
sourceAmount
object
Original amount (matches request).
-
convertedAmount
object
Converted amount (see Money Object).
-
Money Object (for both amounts)
currencyCode
string
Currency code.
"EUR"
units
string
Whole units.
"93"
nanos
integer
Fractional units.
250000000 (= €0.25)
Example Response:
json
*Translation: $100.50 USD = €93.25 EUR*
Examples
Request
bash
Response
json
Error Cases
Invalid Currency:
json
Missing Parameters:
json
Rate Unavailable:
json
Notes
Rate Source: Uses real-time exchange rates (updated frequently).
Precision: Conversion maintains high precision (nanos = 10^-9).
Fees: Conversion may include applicable fees (check system configuration).
Real request example
Real response example
200 OK
Last updated

