WDK logoWDK documentation
TRONStandard TRONGuides

Send TRX

Send native TRX and estimate transaction fees on Tron.

This guide explains how to send native TRX, estimate transaction fees, cap transaction fees, sign without broadcasting, and use dynamic fee rates.

On Tron, values are expressed in sun (1 TRX = 1,000,000 sun).

Send Native TRX

You can transfer TRX to a recipient address using account.sendTransaction():

Send TRX
const result = await account.sendTransaction({
  to: 'TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH',
  value: 1000000 // 1 TRX in sun
})
console.log('Transaction hash:', result.hash)
console.log('Transaction fee:', result.fee, 'sun')
console.log('Activation fee:', result.activationFee, 'sun')

Estimate Transaction Fees

You can get a fee estimate before sending using account.quoteSendTransaction(). The quote includes activationFee, which is non-zero when the recipient account must be activated:

Quote Transaction Fee
const quote = await account.quoteSendTransaction({
  to: 'TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH',
  value: 1000000
})
console.log('Estimated fee:', quote.fee, 'sun')
console.log('Activation fee:', quote.activationFee, 'sun')

Cap Transaction Fees

Set transactionMaxFee when you create the wallet to stop native sendTransaction() and signTransaction() calls if the estimated fee exceeds your limit.

Cap Native TRX Fees
const wallet = new WalletManagerTron(seedPhrase, {
  provider: 'https://api.trongrid.io',
  transactionMaxFee: 10000000n
})

Sign Without Broadcasting

Use account.signTransaction() when you need a signed TRX transaction but do not want WDK to broadcast it.

Sign TRX Transaction
const signedTransaction = await account.signTransaction({
  to: 'TLyqzVGLV1srkB7dToTAEqgDSfPtXRJZYH',
  value: 1000000
})

console.log('Signed transaction:', signedTransaction)

Use Dynamic Fee Rates

You can retrieve current fee rates from the wallet manager using wallet.getFeeRates():

Get Fee Rates
const feeRates = await wallet.getFeeRates()
console.log('Normal fee rate:', feeRates.normal, 'sun')
console.log('Fast fee rate:', feeRates.fast, 'sun')

Next Steps

To transfer TRC20 tokens instead of native TRX, see Transfer TRC20 Tokens.

On this page