Skip to main content

BRL ⇄ USDT conversion

A conversion has two steps: you request a firm quote, which locks the price for about 15 seconds, and then you execute it.

1. Check trading hours (optional)​

GET /v1/conversions/time-window tells whether conversions are open right now. For a reference price without locking anything, use GET /v1/conversions/rate (indicative quote, already including your spread).

2. Create the firm quote​

curl -X POST https://api-sandbox.rivusfinance.com/v1/conversions/quotes \
-H "Authorization: Bearer $RIVUS_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "side": "buy_usdt", "amount": 10000, "amount_currency": "brl" }'
FieldValues
sidebuy_usdt: pays BRL and receives USDT. sell_usdt: pays USDT and receives BRL.
amountAmount, in the amount_currency currency.
amount_currencybrl or usdt.
{
"id": "6a4f0d1e-8c1b-4f7a-9d42-0c5e3b2a1f90",
"side": "buy_usdt",
"rate": 5.6123,
"brl_amount": 10000,
"usdt_amount": 1781.79,
"expires_at": "2026-12-02T14:03:26.000Z",
"ttl_seconds": 14
}

The quote is valid for about 15 seconds (expires_at). If there is no price at the moment, the API responds 502 quote_unavailable: try again shortly.

3. Execute​

curl -X POST https://api-sandbox.rivusfinance.com/v1/conversions \
-H "Authorization: Bearer $RIVUS_API_KEY" \
-H "Idempotency-Key: $(uuidgen)" \
-H "Content-Type: application/json" \
-d '{ "quote_id": "6a4f0d1e-8c1b-4f7a-9d42-0c5e3b2a1f90" }'
  • status: "concluido": the balance has already been debited and credited.
  • status: "pendente": settlement is being confirmed. Follow it via GET /v1/conversions/{id} or the conversion.completed webhook.

A quote executes only once. Repeating with the same Idempotency-Key returns the same conversion (see Idempotency).

:::danger 502 execution_uncertain: DO NOT retry the conversion The result could not be confirmed with the counterparty. Check GET /v1/conversions?quote_id=<id> to see whether the conversion exists. The Rivus team resolves the case. :::

Account rules​

Your account rules apply exactly as in the Portal: spread, per-transaction limit, daily limit, USDT minimum, trading hours and balance. They are listed in GET /v1/account.