Createtransaction Using Trongrid Api

I am trying to create a tron transaction using trongrid APi. But when I do so, I get the following error:

{ "Error": "class org.tron.core.exception.ContractValidateException : Validate TransferContract error, no OwnerAccount." }

There is the api:

There is the curl command:

curl --request POST \
     --url  \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --data '
{
  "to_address": "41e9d79cc47518930bc322d9bf7cddd260a0260a8d",
  "owner_address": "415c543dca23f94f3e3db585368cb070204efeca0f",
  "amount": 100000
}
'
1

1 Answer

You are missing the TRON-PRO-API-KEY header. Here is a an example:

curl -X POST \
   \
  -H 'Content-Type: application/json' \
  -H 'TRON-PRO-API-KEY: 25f66928-0b70-48cd-9ac6-da6f8247c663' \
  -d '{
    "to_address": "41e9d79cc47518930bc322d9bf7cddd260a0260a8d",
    "owner_address": "41D1E7A6BC354106CB410E65FF8B181C600FF14292",
    "amount": 1000
}'

You can create your api key here.

Notice that this will only create the transaction string, you still need to sign it and broadcast to the network:

Create -> Sign -> Broadcast -> (wait) -> Lookup and get receipt

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

David Miller

David Miller

Executive Financial & Market Analyst

David Miller brings 15 years of experience in global economics, personal finance strategy, and market dynamics. He specializes in turning complex economic trends into actionable insights for everyday readers.

Share this article
Twitter Facebook Pinterest