Get you own node endpoint todayStart for free and get your app to production levels immediately. No credit card required.You can sign up with your GitHub, X, Google, or Microsoft account.
Parameters
owner_address— the address performing the token swap (base58 withvisible: true, or hex withvisible: false).exchange_id— unique identifier of the exchange pair to trade on.token_id— token ID being sold; use_to denote TRX.quant— integer amount being sold (token base units; if TRX, specify in sun).expected— integer minimum to receive (token base units; if TRX, sun). Protects against slippage.permission_id— optional permission ID for multi‑signature accounts.
Response
Returns a transaction object containing:txID— unique transaction identifierraw_data— raw transaction data including contract detailsraw_data_hex— hexadecimal representation of raw transaction data
Use case
Thewallet/exchangetransaction method is used for:
- Swapping tokens directly on the TRON decentralized exchange
 - Converting between TRX and TRC20 tokens at current market rates
 - Building arbitrage bots and automated trading strategies
 - Implementing token exchange functionality in decentralized applications
 
curl example
Shell
- amounts must be integers (do not quote numbers). If TRX is involved (token_id is ”_” on either side of the pair), express TRX values in sun (1 TRX = 1,000,000 sun).
 - the call returns an unsigned transaction; sign and broadcast it. On mainnet, the exchange must exist and you must have sufficient balance; slippage protection may reject if market has moved.
 
Body
application/json
The address performing the token swap transaction
Unique identifier of the exchange pair to trade on
Token ID being sold. Use '_' to denote TRX.
Amount being sold as an integer (token base units; if TRX, specify in sun)
Minimum amount to receive as an integer (token base units; if TRX, sun). Protects against slippage.
Optional permission ID for multi-signature accounts
Whether to return human-readable addresses