✔️Broadcast Transaction

Send Tron Transaction to the network - Irreversible


Request Headers:

Authorization: Bearer <access_token>

Content-Type: application/json

Request Body:

{
    "wallet": "<wallet_uuid>", // the source wallet uuid
    "destination" : "TDmx..Fx68" // Only for TRX or USDT withdrawal
    "amount": 20000000 // Only for TRX or USDT amount in SUN based (20 x 1000000)
    "paymentRequest": "LNINVOICE..." // Only for Case of Bitcoin LN Invoice
}

Success Response: If the OTP is enabled (success.data.isOTP: true), broadcasting the transaction will require an OTP to be authorized. Note that 1 TRX = 1000000 SUN. Amounts are denominate in SUN, for both USDT and TRX, which means you have to divide the amounts by 1,000,000 for user presentation.

Example Below:

{
    "success": {
        "message": "Transfer Preview",
        "data": {
            "source": "TNQ...i2N",
            "destination": "TDmx..Fx68",
            "amount": 86000000, // Sending Raw Amount, to be divided by 1000000
            "requiredEnergy": 0, // Energy Required - In case of USDT
            "availableEnergy": 0, // Energy Available - In case of USDT
            "requiredBandwidthPoints": 100,  // Bandwith Required
            "availableBandwidthPoints": 600, // Bandwith Available
            "feeSUN": 1100000, // TRX Fees, divide feeSUN by 1000000
            "sunCostForBandwidth": 100000, // Bandwith Fees Cost in SUN 
            "sunCostForEnergy": 0,
            "accRes": {
                "freeNetLimit": 600,
                "TotalNetLimit": 43200000000,
                "TotalNetWeight": 84632720284,
                "TotalEnergyLimit": 50000000000000,
                "TotalEnergyWeight": 564258045519
            },
            "dstRes": {},
            // Additional case of TRX account creation
            // first time TRX received on new TRON Address destination
            "sunCostForAccountCreation": 1000000, 
            "isOTP": true
        }
    },
    "uuid": "4f49d932-fae5-479e-b8dd-0c8aee0be833"
}

curl 'https://apis.xpay.stream/client/wallets/send/tron/confirm'                                            \
  -H 'Authorization: Bearer eyJhbGciO...RCf0'                                                               \
  -H 'Content-Type: application/json'                                                                       \
  --data-raw '{"wallet":"<wallet_uuid>","destination":"<destination_address>","amount":<amount_sun_based>}' 

Last updated