Skip to main content

POST broadcasttransaction

/wallet/broadcasttransaction

This is a standard Tron Protocol endpoint. This RPC call is used to broadcast transaction into Tron blockchain. The structure is generally unchanged.

When transaction is broadcasted with a Coupon (see Coupons for details), a coupon code needs to be provided by adding parameter into a root JSON object of this call. Example:

{
....
"coupon":"<COUPON_ID>"
....
}

Generally, Transatron expects a signed transaction object with raw_data_hex parameter. Having no such parameter in the call may result in excessive fee charges.

Response The response object structure corresponds to the Tron Protocol with an additional nested object named transatron similarly to /wallet/triggersmartcontract. The list of parameters is the same as in triggersmartcontract with the following meaning:

  1. code and message → same meaning as in /triggersmartcontract call.
  2. tx_fee_rtrx_account, tx_fee_rusdt_account → actual amounts charged, not estimations.
  3. user_account_balance_rtrx, user_account_balance_rusdt → balances after the transaction fee is deducted.
  4. tx_fee_rtrx_account or tx_fee_rusdt_account → exact amount of TFN (former RTRX) or TFU (former RUSDT) deducted from the internal account for this transaction (or 0 if no deduction was made).
  5. Extra code for Instant Payments: INSTANT_PAYMENT_UNDERPRICED
    • Returned if the amount in the instant payment transaction is insufficient to cover the main transaction.
    • In this case, the main transaction is not broadcast to the TRON node.

Example:

{
"result": true,
"txid": "02.........fb",
"transatron":
{
"code": "CHARGED",
"message": "",
"tx_fee_rusdt_account": 1696360,
"tx_fee_rtrx_account": 4998000,
"tx_fee_rusdt_instant": 0,
"tx_fee_rtrx_instant": 0,
"tx_fee_burn_trx": 13373400,
"user_account_balance_rtrx": 0,
"user_account_balance_rusdt": 397576449
}
}