Skip to main content

Sell Crypto

To sell, the company sends USDT or USDC to a fixed address provided by XGate. Each confirmed transfer on the network becomes a sale, and the amount in BRL is credited to the company's BRL balance or sent via Pix to an approved beneficiary, according to the company's configuration in the panel.


How it works​

  • There is no sale order or POST. XGate provides the company with one fixed address per asset and network. The company sends USDT or USDC from any wallet to this address, and each transfer confirmed on the network becomes a sale, at market rate, without minimum price reservation and without on-chain refunds. Ten transfers equal ten sales.
  • The price is locked at settlement, with commercial spread already included. The credited BRL amount is netAmount = cryptoAmount × rate (rounded down, 2 decimal places).
  • Reconcile using the txHash of your transfer. The sourceAddress helps when provided by the network.
Attention when sending

Send only the designated asset and network for the address. Sending any other token, or the right token via the wrong network, results in permanent loss without refund. There is no USDC on TRON.


Sale addresses​

Addresses are retrieved in GET /crypto/options, inside the sale block:

{
"sale": {
"enabled": true,
"status": "READY",
"minAmount": { "USDT": "10.000000", "USDC": "10.000000" },
"depositAddresses": [
{ "asset": "USDT", "network": "TRON", "address": "TXYZopYRdj2D9XRtbG411XZZ3kM5VkAeBf" },
{ "asset": "USDC", "network": "SOLANA", "address": "7mQe1…" }
]
}
}
FieldTypeDescription
enabledbooleanSale enabled for the company.
statusstringDISABLED · PROVISIONING · READY. The first query by an enabled company triggers address generation: stays in PROVISIONING for a few minutes and moves to READY.
minAmountobjectMinimum sale amount per asset (USDT, USDC). Transfers below minimum remain under review (review.reason = BELOW_MINIMUM).
depositAddresses[]arrayFixed address for each pair: asset, network, address.

Where the BRL goes​

The method for receiving BRL from sales is configured once in the XGate panel (Buy/Sell › Settings):

  • BRL balance of the company; or
  • Pix payout to an approved beneficiary.

The API does not alter this setting: it reflects the result in the settlement field of each sale. If Pix payout cannot be completed (unapproved beneficiary, rejected payout, or failure), the funds fall back to the BRL balance and the sale ends with status SETTLED_TO_BALANCE, with the explanation in settlement.fallbackReason. Sales are never stuck.


Sale statuses​

RECEIVED ──► SETTLING ──► SETTLED
└──► SETTLED_TO_BALANCE
StatusMeaning
RECEIVEDCrypto received and confirmed, awaiting rate. Suspended sales under review appear here, with review.reason.
SETTLINGRate locked, credit in progress.
SETTLEDSettled according to configured method. Final.
SETTLED_TO_BALANCEConfigured method was Pix, but funds fell back to balance. settlement.fallbackReason explains why. Final.

Tracking​

Track each sale via Get Sale or via Sale Webhooks (sale.*), under Webhooks › Crypto Sale Webhooks. The complete field description is documented in Sale Object.