Blog

  1. Blog
  2. Tron support
šŸ—“ Jan 22, 2023 | šŸ•‘ 7 min

Hi, Developer! We are happy to announce that we now support Tron in our universal API! Below we give examples of how to work with our API

āš  Possible values for network param: tron

Table of contents

How get balance of account in the tron MainNet?

Example curl request for getting information:

curl https://api.cryptomation.com/wallet/$address/balance?apikey=API_KEY&network=tron
copy

And system return example answer balance in WEI:

{
"result": "9299552323754576290",
"status": "1",
"message": "OK"
}
copy

If your want to result decimal format (from WEI), please, set format to decimal, then:

curl https://api.cryptomation.com/wallet/tron.wallet/balance?apikey=API_KEY&network=tron&format=gwai
copy

It requests return:

{
"result": "9.29955232375457629",
"status": "1",
"message": "OK"
}
copy

How get transaction of account in the tron MainNet?

Example curl request for getting information about last transaction:

curl https://api.cryptomation.com/wallet/tron.wallet/transactions?apikey=API_KEY&network=tron
copy

And system return example answer balance in WEI:

{"result":[
    {
        "hash":"DCxmr3QNQknujpRR65mzqnKt9ftZ1b4zrKuyJpgqu2ZJ",
        "from":"5141ac5a1a504ad09bd47af6d99d72f7b4b9b3de6c1ba12a88b4349362fa131f",
        "to":"test.tron",
        "nonce":"69885576000001",
        "signature":"ed25519:58CGMW1xKTTvVb1LVUDQ4t8AeguscCtDbumXdpQPVvAfGao4zrBvzAfksMdwcLVPgQyVESPUXDMshC6WcRRLQZQB",
        "signer_id":"5141ac5a1a504ad09bd47af6d99d72f7b4b9b3de6c1ba12a88b4349362fa131f",
        "receiver_id":"test.tron",
        "actions":[{"Transfer":{"deposit":"100000000000000000000000"}}]
    }
    ],
    "status":"OK",
    "message":null
}
copy

More info?

Much more info about our API method you could found on our docs!


Ready to get started?

Our api help your project gain easy access to a sea of crypto data.

If you want to try our Universal API, please enter your email or login from Google Gmail:

Continue with