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:
codeandmessage→ same meaning as in /triggersmartcontract call.tx_fee_rtrx_account,tx_fee_rusdt_account→ actual amounts charged, not estimations.user_account_balance_rtrx,user_account_balance_rusdt→ balances after the transaction fee is deducted.tx_fee_rtrx_accountortx_fee_rusdt_account→ whencodeisCHARGED, the field for the currency actually deducted from the internal account holds the exact amount of TFN (former RTRX) or TFU (former RUSDT); the field for the currency you did not pay with is0. OnFREEresponses both fields are0. This differs from the estimate path (/triggersmartcontract), which is unaffected and always returns both fields as numbers — see Transatron Extension Objects for the full charge-vs-estimate split, and the release note for background.- 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": 0,
"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
}
}