Skip to main content
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",
  "rail": "PIX",
  "sourceCurrency": "BRL",
  "sourceAmount": "60000.00",
  "targetCurrency": "USDC",
  "partnerFeeId": "123e4567-e89b-12d3-a456-426614174004"
}'
{
"type": "FLOATING",
"rail": "PIX",
"sourceCurrency": "BRL",
"sourceAmount": "59255.50",
"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": "9978.000000",
"finalExchangeRate": "5.9386"
}

Authorizations

Authorization
string
header
required

Bearer authentication header on the format Bearer <API_KEY>.

Body

application/json
  • Floating
  • Locked

Exchange rate's type is floating.

type
enum<string>
required

Exchange rate type.

Available options:
FLOATING
Example:

"FLOATING"

rail
enum<string>
required

Exchange rate payment rail.

Available options:
PIX
Example:

"PIX"

sourceCurrency
enum<string>
required

Exchange rate source currency.

Available options:
BRL,
USD,
EUR,
USDC,
USDT
Example:

"BRL"

sourceAmount
string
required

Exchange rate source amount.

Example:

"60000.00"

targetCurrency
enum<string>
required

Exchange rate target currency.

Available options:
BRL,
USD,
EUR,
USDC,
USDT
Example:

"USDC"

partnerFeeId
string<uuid>

Exchange rate partner fee ID.

Example:

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

Response

200 - application/json

Resource successfully retrieved.

  • Floating
  • Locked

Exchange rate's type is floating.

rate
string

The exchange rate between the currencies.

Example:

"5.9255"

type
enum<string>

Exchange rate type.

Available options:
FLOATING
Example:

"FLOATING"

rail
enum<string>

Exchange rate payment rail.

Available options:
PIX
Example:

"PIX"

sourceCurrency
string

Exchange rate source currency.

Example:

"BRL"

sourceAmount
string

Exchange rate source amount.

Example:

"60000.00"

targetCurrency
string

Exchange rate target currency.

Example:

"USDC"

targetAmount
string

Exchange rate target amount.

Example:

"10125.727780"