Overview
Gasless transactions allow users to execute swaps without paying gas fees directly. Whengasless=true is passed to getAction, the API returns a set of signing steps (executions) instead of a raw transaction. The user signs each step and submits them to POST /submitTx, which handles relay and broadcast.
Supported Chains: Tron same-chain swaps only (cross-chain and EVM chains coming soon)
Requesting Gasless Execution
Add the optionalgasless query parameter to your getAction request:
Note: Omitgaslessor set it tofalsefor standard transactions.
Understanding the Response
Whengasless=true is requested and a relay provider is available for the source chain, the response includes:
executionsType is "DEFAULT" (relay unavailable or gasless not set), broadcast tx directly as a standard transaction — see the swap guide.
Executing Gasless Transactions
1
Check executionsType
Always check the response before proceeding:
2
Sign each execution in order
Iterate
executions and sign each step with the appropriate wallet method:Order matters. Fee approval steps (if present) must be signed and submitted before the swap step. The array is already in the correct order.
3
Submit to POST /submitTx
Send the signed executions along with the
txId from the getAction response:Complete Example
Notes
- Standard fallback: Always check
executionsType— if"DEFAULT", broadcasttxdirectly (see swap guide). - Error handling:
POST /submitTxvalidates signatures and simulates transactions before broadcasting. A400response indicates a bad signature or expiredtxId. - Relayer fee: The
relayerFeefield shows the fee deducted fromamountInto pay the relay. Display it to users alongside the swap quote.