CreateTransaction

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

Example

Format: /wallet/createtransaction

curl -X POST  https://api.trongrid.io/wallet/createtransaction -d '{"to_address": "414A5FE0179F2DD9C900194E63D661863CD0ADE7B0", "owner_address": "41718DE6B323652D1257437ACE160C4F4198AAE4E1", "amount": 1000 }'
$.post('https://api.trongrid.io/wallet/createtransaction', {"to_address": "41e9d79cc47518930bc322d9bf7cddd260a0260a8d", "owner_address": "41D1E7A6BC354106CB410E65FF8B181C600FF14292", "amount": 1000 }, function(data) {
    console.log(data);
});

Sample Output

{  
   "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
   }
}

Body Parameters

Parameter

Parameter Description

Data 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

Language
Click Try It! to start a request and see the response here!