New Here? Claim Your 30% Discount on Your First Blockchain Node Access!

banner image
trx

Tron

TRX

POST

GET

attention-sign-fill/wallet/accountpermissionupdateattention-sign-fill/wallet/broadcasthexattention-sign-fill/wallet/broadcasttransactionattention-sign-fill/wallet/clearabiattention-sign-fill/wallet/createaccountattention-sign-fill/wallet/createaddressattention-sign-fill/wallet/createassetissueattention-sign-fill/wallet/createshieldedcontractparametersattention-sign-fill/wallet/createspendauthsigattention-sign-fill/wallet/createtransactionattention-sign-fill/wallet/createwitnessattention-sign-fill/wallet/deploycontractattention-sign-fill/wallet/easytransferattention-sign-fill/wallet/easytransferassetattention-sign-fill/wallet/easytransferassetbyprivateattention-sign-fill/wallet/easytransferbyprivateattention-sign-fill/wallet/exchangecreateattention-sign-fill/wallet/exchangeinjectattention-sign-fill/wallet/exchangetransactionattention-sign-fill/wallet/exchangewithdrawattention-sign-fill/wallet/freezebalanceattention-sign-fill/wallet/generateaddressattention-sign-fill/wallet/getaccountattention-sign-fill/wallet/getaccountbalanceattention-sign-fill/wallet/getaccountnetattention-sign-fill/wallet/getaccountresourceattention-sign-fill/wallet/getakfromaskattention-sign-fill/wallet/getassetissuebyaccountattention-sign-fill/wallet/getassetissuebyidattention-sign-fill/wallet/getassetissuelistattention-sign-fill/wallet/getblockbalanceattention-sign-fill/wallet/getBrokerageattention-sign-fill/wallet/getcontractattention-sign-fill/wallet/getcontractinfoattention-sign-fill/wallet/getdelegatedresourceattention-sign-fill/wallet/getdelegatedresourceaccountindexattention-sign-fill/wallet/getdiversifierattention-sign-fill/wallet/getexchangebyidattention-sign-fill/wallet/getexpandedspendingkeyattention-sign-fill/wallet/getincomingviewingkeyattention-sign-fill/wallet/getnewshieldedaddressattention-sign-fill/wallet/getnkfromnskattention-sign-fill/wallet/getnodeinfoattention-sign-fill/wallet/getpaginatedassetissuelistattention-sign-fill/wallet/getRewardattention-sign-fill/wallet/getspendingkeyattention-sign-fill/wallet/gettransactionsignattention-sign-fill/wallet/gettriggerinputforshieldedtrc20contractattention-sign-fill/wallet/getzenpaymentaddressattention-sign-fill/wallet/isshieldedtrc20contractnotespentattention-sign-fill/wallet/listwitnessesattention-sign-fill/wallet/participateassetissueattention-sign-fill/wallet/proposalapproveattention-sign-fill/wallet/proposalcreateattention-sign-fill/wallet/proposaldeleteattention-sign-fill/wallet/scanshieldedtrc20notesbyattention-sign-fill/wallet/scanshieldedtrc20notesbyovkattention-sign-fill/wallet/transferassetattention-sign-fill/wallet/triggerconstantcontractattention-sign-fill/wallet/triggersmartcontractattention-sign-fill/wallet/unfreezeassetattention-sign-fill/wallet/unfreezebalanceattention-sign-fill/wallet/updateaccountattention-sign-fill/wallet/updateassetattention-sign-fill/wallet/updateBrokerageattention-sign-fill/wallet/updateenergylimitattention-sign-fill/wallet/updatesettingattention-sign-fill/wallet/updatewitnessattention-sign-fill/wallet/votewitnessaccountattention-sign-fill/wallet/withdrawbalanceattention-sign-fill/walletsolidity/getaccountattention-sign-fill/walletsolidity/getblockbylatestnumattention-sign-fill/walletsolidity/getblockbynumattention-sign-fill/walletsolidity/getnowblockattention-sign-fill/walletsolidity/gettransactionbyid
chevron-right

Last updated on January 1, 1970

3 min read

Method /wallet/createtransaction Tron (TRX)
connect with REST protocol

/wallet/createtransaction

info-circle-fill

Method not allowed

info-circle-fill

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

Parameters

to_address - string

To_address is the transfer address, converted to a hex string

owner_address - string

Owner_address is the transfer address, converted to a hex string

amount - int64

Amount is the transfer amount,the unit is sun

permission_id - int32

Optional, for multi-signature use

visible - boolean

Optional.Whehter the address is in base58 format.

extra_data - string

Optional, totes on the transaction, HEX format

Request

curl --location --request POST 'https://trx.getblock.io/wallet/createtransaction' \
--header 'x-api-key: YOUR-API-KEY' \
--header 'Content-Type: application/json' \
--data-raw '{"to_address": "414a5fe0179f2dd9c900194e63d661863cd0ade7b0", "owner_address": "41718de6b323652d1257437ace160c4f4198aae4e1", "amount": 1000}'

Response

{
    "result": "null",
    "id": "getblock.io",
    "message": {  
      "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
          }
      }
}
banner icon

Start Building with GetBlock RPCs for Free