curl --request POST \
--url https://api.lbpay.example.com/v1/fx/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"fromCurrency": "USD",
"toCurrency": "BRL",
"sourceAmount": "1000.00"
}
'{
"quoteId": "qt_01J9Z3",
"status": "AVAILABLE",
"fromCurrency": "USD",
"toCurrency": "BRL",
"source": {
"currency": "USD",
"amount": "1000.00"
},
"destination": {
"currency": "BRL",
"amount": "5383.20"
},
"referenceRate": "5.44000000",
"rate": "5.39920000",
"spread": {
"percentage": "0.75",
"amount": {
"currency": "USD",
"amount": "7.50"
}
},
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"remittanceId": "<string>",
"externalId": "<string>",
"usage": "REMITTANCE",
"inventoryId": "<string>",
"inventoryExpiresAt": "2023-11-07T05:31:56Z"
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Solicitar cotação
Retorna o preço para o cliente: valores, taxa de referência, taxa aplicada e spread em %. A cotação não é vinculada a remetente nem a operação. Não valida remetente, não reserva limite, não contrata câmbio e não cria remessa. Elegibilidade do remetente, limites, habilitação de funding, limite de crédito e saldo PREFUNDED são verificados na criação da remessa (POST /v1/remittances/withdrawals). Uma cotação pode ser usada por uma única remessa.
Com usage = INVENTORY a cotação é usada uma única vez para criar um Inventory Lot (POST /v1/inventories) e não pode ser usada em withdrawal; a resposta informa inventoryExpiresAt, a validade que o lote terá se for criado. Cotações sem usage são REMITTANCE e mantêm o comportamento atual.
curl --request POST \
--url https://api.lbpay.example.com/v1/fx/quotes \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--header 'Idempotency-Key: <idempotency-key>' \
--data '
{
"fromCurrency": "USD",
"toCurrency": "BRL",
"sourceAmount": "1000.00"
}
'{
"quoteId": "qt_01J9Z3",
"status": "AVAILABLE",
"fromCurrency": "USD",
"toCurrency": "BRL",
"source": {
"currency": "USD",
"amount": "1000.00"
},
"destination": {
"currency": "BRL",
"amount": "5383.20"
},
"referenceRate": "5.44000000",
"rate": "5.39920000",
"spread": {
"percentage": "0.75",
"amount": {
"currency": "USD",
"amount": "7.50"
}
},
"expiresAt": "2023-11-07T05:31:56Z",
"createdAt": "2023-11-07T05:31:56Z",
"remittanceId": "<string>",
"externalId": "<string>",
"usage": "REMITTANCE",
"inventoryId": "<string>",
"inventoryExpiresAt": "2023-11-07T05:31:56Z"
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}{
"code": "QUOTE_EXPIRED",
"message": "<string>",
"requestId": "<string>",
"retryable": true,
"details": [
{
"field": "<string>",
"reason": "<string>"
}
]
}Autorizações
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Cabeçalhos
Unique key to prevent duplicate creation or execution.
8 - 128Corpo
- Option 1
- Option 2
Informe exatamente um entre sourceAmount (valor fixo em fromCurrency, enviado pela MSB) e destinationAmount (valor fixo em toCurrency, recebido pelo beneficiário).
v1: apenas USD.
USD v1: apenas BRL.
BRL Decimal como string, estritamente maior que zero.
^(0\.(0[1-9]|[1-9][0-9]?)|[1-9][0-9]*(\.[0-9]{1,2})?)$"1000.00"
Decimal como string, estritamente maior que zero.
^(0\.(0[1-9]|[1-9][0-9]?)|[1-9][0-9]*(\.[0-9]{1,2})?)$"1000.00"
Uso da cotação. REMITTANCE (padrão): usada por um withdrawal. INVENTORY: usada para criar um Inventory Lot (POST /v1/inventories). Usar a cotação na operação errada retorna QUOTE_USAGE_MISMATCH. Enum extensível.
REMITTANCE, INVENTORY Resposta
Quote created
Preço único para a remessa, igual para PREFUNDED e CREDIT. O valor recebido pelo beneficiário (destination) não depende da modalidade de funding. A única tarifa é o spread: rate = referenceRate × (1 − spread.percentage / 100).
"qt_01J9Z3"
AVAILABLE: pode ser usada até expiresAt. USED: consumida por uma remessa (REMITTANCE) ou por um Inventory Lot (INVENTORY). EXPIRED: venceu sem uso.
AVAILABLE, USED, EXPIRED USD BRL Valor em USD enviado pela MSB.
Show child attributes
Show child attributes
{ "currency": "USD", "amount": "1000.00" }
Valor exato em BRL que o beneficiário recebe.
Show child attributes
Show child attributes
{ "currency": "BRL", "amount": "5383.20" }
Taxa de referência de mercado sobre a qual o spread é calculado.
^[0-9]+(\.[0-9]{1,8})?$"5.44000000"
Taxa aplicada à remessa, já com o spread.
^[0-9]+(\.[0-9]{1,8})?$"5.39920000"
Spread de câmbio: única tarifa da remessa.
Show child attributes
Show child attributes
Remessa que usou a cotação; preenchido quando status = USED.
externalId da remessa ou do Inventory que usou a cotação.
Uso da cotação. REMITTANCE (padrão): usada por um withdrawal. INVENTORY: usada para criar um Inventory Lot (POST /v1/inventories). Usar a cotação na operação errada retorna QUOTE_USAGE_MISMATCH. Enum extensível.
REMITTANCE, INVENTORY Inventory Lot criado a partir da cotação; preenchido quando usage = INVENTORY e status = USED.
Somente usage = INVENTORY. Validade que o Inventory Lot terá se for criado com esta cotação. Não confundir com expiresAt, que é a validade da própria cotação.

