Skip to main content

Transatron Extension Objects

When one of the following API methods is called — /wallet/triggersmartcontract, /wallet/broadcasttransaction, or /wallet/broadcasthex — Transatron injects a transatron object into the standard TRON node response. This object contains important data for managing transaction fees. The structure of the object is:

transatron: {
"code": "<code>",
"message": "<hex_message>",
"user_account_balance_rtrx": <Number>,
"user_account_balance_rusdt": <Number>,
"tx_fee_rtrx_account": <Number>,
"tx_fee_rusdt_account": <Number>,
"tx_fee_rtrx_instant": <Number>,
"tx_fee_rusdt_instant": <Number>,
"tx_fee_burn_trx": <Number>
}

Field Reference

  • code → Decision code (see Codes).
  • message → Hex-encoded string with extra info (error reason, etc.).
    info

    Message is UTF-8 text converted to a byte array, then hex-encoded — the same way TRON encodes text responses.

  • user_account_balance_rtrx, user_account_balance_rusdt → User balances in TFN (former RTRX) and TFU (former RUSDT) (includes decimals, e.g. 1000000 = 1 TFN).
  • tx_fee_rtrx_account, tx_fee_rusdt_account → Fee when paying from an internal account.
    • If TFN is available → tx_fee_rtrx_account is returned.
    • If only TFU is available → tx_fee_rusdt_account is returned.
  • tx_fee_rtrx_instant, tx_fee_rusdt_instant → Fees when paying via instant transactions (both always provided).
  • tx_fee_burn_trx → Fee when TRX is burned because no coverage was applied. Provided for reference only.

Codes

  • CHARGED (Success) → Transaction covered with resources (energy + bandwidth).
  • FREE (Success) → Transaction covered for free (e.g., coupon or daily free quota).
  • PENDING (Success) → Delayed transaction accepted, cached, and bundled later.
  • LIMIT_EXCEED (Error) → No free transactions left and no internal balance. Transaction bypassed.
  • NOT_ENOUGH_FUNDS (Error) → Internal account balance is positive but insufficient. Transaction bypassed.
  • INSTANT_PAYMENT_UNDERPRICED (Error) → Instant payment provided, but insufficient to cover transaction. Not broadcast.
  • ERROR (Error) → Generic error. See message for details.

Examples

  • Example 1
  transatron: {
"code": "CHARGED",
"message": "",
"tx_fee_burn_trx": 27359850,
"tx_fee_rtrx_account": 13028500,
"tx_fee_rusdt_account": 0,
"tx_fee_rtrx_instant": 13296500,
"tx_fee_rusdt_instant": 4187933,
"user_account_balance_rusdt": 13916666,
"user_account_balance_rtrx": 139000000
}

In this response, the user has balances in both TFN and TFU.

  • TFN will be used for the fee.

  • The transaction costs 13.02 TFN.

  • The fee is charged from the internal account if no coupon or instant payment is applied.

  • Example 2

transatron: {
"code": "CHARGED",
"message": "",
"user_balance_rusdt": 20000000,
"user_balance_rtrx": 0,
"tx_fee_rtrx": 6773500,
"tx_fee_burn_trx": 13844850
}

In this response, the user only has TFU available.

  • TFU is used for the fee.

  • The transaction is covered successfully from the internal account.

  • Example 3

transatron: {
"code": "LIMIT_EXCEED",
"message": "4461696c79206c696d697420657863656564656420666f722061646472657373205441366341793954427964616b4c467a3551537962414875583158764274443936472e",
"tx_fee_rtrx_account": 0,
"tx_fee_rusdt_account": 0,
"tx_fee_rtrx_instant": 13296500,
"tx_fee_rusdt_instant": 4187933,
"user_account_balance_rusdt": 0,
"user_account_balance_rtrx": 0
}

In this response, the user has no internal funds and no free quota.

  • The transaction is not covered.
  • The user must use an instant payment to succeed.