POST
/
exchange-rates
Get an exchange rate
curl --request POST \
  --url https://api.lumx.io/exchange-rates \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "type": "FLOATING",
  "sourceCurrency": "BRL",
  "sourceAmount": "60000.00",
  "targetCurrency": "USDC",
  "partnerFeeId": "123e4567-e89b-12d3-a456-426614174004"
}'
{
"type": "FLOATING",
"sourceCurrency": "BRL",
"sourceAmount": "5925.55",
"targetCurrency": "USDC",
"baseTargetAmount": "10000.000000",
"baseExchangeRate": "5.9255",
"fees": {
"lumx": {
"rate": "10",
"flatAmount": "1",
"totalAmount": "11",
"currency": "USDC"
},
"partner": {
"rate": "10",
"flatAmount": "1",
"totalAmount": "11",
"currency": "USDC"
}
},
"finalTargetAmount": "10000.000000",
"finalExchangeRate": "5.9255"
}

Authorizations

Authorization
string
header
required

Bearer authentication header on the format Bearer <API_KEY>.

Body

application/json

Exchange rate type is floating.

type
enum<string>
required

Exchange rate's type.

Available options:
FLOATING
Example:

"FLOATING"

sourceCurrency
enum<string>
required

Exchange rate's source currency.

Available options:
BRL,
USDC,
USDT
Example:

"BRL"

sourceAmount
string
required

Exchange rate's source amount.

Example:

"60000.00"

targetCurrency
enum<string>
required

Exchange rate's target currency.

Available options:
BRL,
USDC,
USDT
Example:

"USDC"

partnerFeeId
string<uuid>

Partner fee id to be used for this exchange rate.

Example:

"123e4567-e89b-12d3-a456-426614174004"

Response

200 - application/json

Resource successfully retrieved.

Exchange rate type is floating.

rate
string

The exchange rate between the currencies.

Example:

"5.9255"

type
enum<string>

Exchange rate's type.

Available options:
FLOATING
Example:

"FLOATING"

sourceCurrency
string

Exchange rate's source currency.

Example:

"BRL"

sourceAmount
string

Exchange rate's source amount.

Example:

"60000.00"

targetCurrency
string

Exchange rate's target currency.

Example:

"USDC"

targetAmount
string

Exchange rate's target amount.

Example:

"10125.727780"