CreateTransaction

Create a TRX transfer transaction. If to_address does not exist, then create the account on the blockchain.

Body Parameters

ParameterParameter DescriptionData Type

to_address

To_address is the transfer address, converted to a hex string

string

owner_address

Owner_address is the transfer address, converted to a hex string

string

amount

Amount is the transfer amount in denominations of SUN

integer 32

Example

Format: /wallet/createtransaction

cURLJavaScript

curl -X POST  https://tron.api.watchdata.io/wallet/createtransaction -d '{"to_address": "414A5FE0179F2DD9C900194E63D661863CD0ADE7B0", "owner_address": "41718DE6B323652D1257437ACE160C4F4198AAE4E1", "amount": 1000 }'

Sample Output

JSON

{  
   "txID":"9908eed564650eed0027b84b18adb934e401e39a62d7c8964224fc723914f551",
   "raw_data":{  
      "contract":[  
         {  
            "parameter":{  
               "value":{  
                  "amount":1000,
                  "owner_address":"41718de6b323652d1257437ace160c4f4198aae4e1",
                  "to_address":"414a5fe0179f2dd9c900194e63d661863cd0ade7b0"
               },
               "type_url":"type.googleapis.com/protocol.TransferContract"
            },
            "type":"TransferContract"
         }
      ],
      "ref_block_bytes":"00b0",
      "ref_block_hash":"3f1bc96dc80e7f61",
      "expiration":1548974130000,
      "timestamp":1548974072663
   }
}

Last updated