For the complete documentation index, see llms.txt. This page is also available as Markdown.

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

Key
Value
Required

Authorization

Bearer <JWT>

Yes

Content-Type

application/json

Yes

Accept

application/json

Yes

Request Body (JSON)

Field
Type
Description
Required
Example

amount

object

Source amount to convert (see Money Object below).

Yes

-

toCurrencyIso

string

Target currency (ISO 4217 code).

Yes

"EUR"

Money Object

Field
Type
Description
Example

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

Field
Type
Description
Example

sourceAmount

object

Original amount (matches request).

-

convertedAmount

object

Converted amount (see Money Object).

-

Money Object (for both amounts)

Field
Type
Description
Example

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

  1. Invalid Currency:

    json

  2. Missing Parameters:

    json

  3. 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