WDK logoWDK documentation

Send TRX

Send native TRX and estimate transaction fees on Tron.

This guide explains how to send native TRX, estimate transaction fees, 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')

Estimate Transaction Fees

You can get a fee estimate before sending using account.quoteSendTransaction():

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

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