Quote a conversion (exchange)
preview_conversionStep 1 of converting assets held on the account into USDT. The balance is kept in USDT (every payment is credited in USDT), so this matters only for an account that still holds another asset; to exchange USDT into another coin, send a payout in that coin (preview_payout, e.g. to your own address). mode "single": convert amount of from_asset_id (to USDT, or to to_asset_id); mode "all_to_usdt": convert every non-USDT holding to USDT. Returns preview_id with the amounts and expires_at; nothing moves yet. Then create_conversion.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | "single" — one asset; "all_to_usdt" — everything to USDT. | |
| amount | No | Amount of from_asset_id (mode "single"). | |
| external_id | No | Your own reference (order id); unique per account. | |
| to_asset_id | No | Target asset (default USDT). Public asset code from list_assets (its asset_id field), e.g. "usdt" (USDT TRC20), "btc", "eth", "xmr", "usdc_eth". | |
| amount_atomic | No | Amount in the smallest units of the asset (alternative to amount). Give exactly one of amount and amount_atomic. | |
| from_asset_id | No | Required for mode "single". Public asset code from list_assets (its asset_id field), e.g. "usdt" (USDT TRC20), "btc", "eth", "xmr", "usdc_eth". | |
| idempotency_key | No | Optional. The same key returns the same result instead of a duplicate (safe retries); generated when omitted. |