Introduction
This API allows you to interact with Tron/TRX, all TRC10 tokens and all TRC20 tokens. If you ever looked for a possibility to automate TRC10, TRC20 or Tron/TRX payments this is the right place.
You still have no idea for real use cases? Let me give you some examples: Accept your own TRC20 token as payment method for your shop, distribute airdrop tokens of your ICO, convert your site currency to a TRC10 or TRC20 token that can be traded on exchanges and many more.
There are a lot of use cases which are not only limited to sending Tron/TRX, TRC10 and TRC20 tokens but also receiving them. You could even create a secure wallet for your TRC10 or TRC20 token which only the wallet owner has access to.
API Requests
All Requests to our API are made in JSON format using HTTP POST. We will also return everything in JSON format. The Europe API endpoint is located at https://eu.trx.chaingateway.io/v1/{function}. We may release endpoints for other locations if needed.
API Key
You can get your personal API Key from your account dashboard. It is used by us to determine who is accessing the API and to count the requests by that account.
There are 2 possibilities to use it in your requests:
- Add it to the JSON body in your request, like
"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"
. This is not recommended!
- Add it in the HTTP header as
'Authorization: q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m'
. This is way more secure and may be the only option in future versions.
Please do not share your api key! If you did so by mistake, immediately regenerate it in your account panel!
Parameters
Tron Address
This is a Tron address, which is a string in Base58 format and 34 characters long. CAUTION: If you send TRC10 or TRC20 tokens, the receiving address must be compatible with that token. So please don't use an exchange address.
Contract Address
The contract address is the tron smart contract address of the TRC20 token you want to use. It has the same format as normal Tron addresses.
Token ID
Every TRC10 token has a unique token id. We require it in integer format.
Amount
We want amounts to be strings in decimal format. If you want to send 2.5 TRX, use "2.5". If you want to send 1 million tokens, use "1000000". We require this parameter in string format to allow up to 18 decimals without inaccuracies. We will return amounts in string format for the same reason.
Private Key
Whenever you create a new Tron address, you will get a private key which is related to the address. This key allows you to send Tron, TRC10 and TRC20 tokens from the created address. Do not share or lose it! It is recommended to generate private keys offline for security reasons.
Security
Our API is very secure. The Nodes are not hosted on the same machine as the API endpoint. Also, they are not using the standard port and have a few proxies running in front. They are protected with a few firewalls, ddos protection and breach detection, too. We also have protected our endpoint and nodes against bruteforce. But even if someone would get control over our systems, your funds would still be save. Like you can see above, every Tron address needs a private key for transactions. Without it, the funds can't be accessed. This means our system is as secure as your application. If you don't secure your system and don't store the private keys in a safe way, attackers may be able to steal funds from your addresses.
Fees
We are charging on a monthly plan basis if you use our API. You can see the exact pricing and request amounts
here. There are also transaction fees, which go to the Tron network to include your transaction in a block. So please make sure there is always enough Tron (or bandwidth/energy) on the address you are sending tokens or Tron from.
Receiving Subscriptions/IPNs
Once we detect a balance update in one of your subscriptions, we will delay a JSON formatted call to the URL you provided. You will need to return
{"ok": true}
in JSON format after receiving so our system knows you received the call successfully. If you don't return ok, we will try to send the call again 10 times within 10 minutes.
Here is an explanation of the parameters we send you:
Parameter |
Type |
Explanation |
Example |
id |
integer |
The unique ID of the IPN |
141854 |
action |
string |
Either "withdraw" or "deposit" |
deposit |
type |
string |
Either "TRX", "TRC10" or "TRC20" |
TRX |
tronaddress |
string |
The tron address you subscribed to |
TQDhtyJJnWqgbGLKB79Ns5XaNGqhhQXgBX |
tokenid |
integer |
Token id of TRC10 token |
1002000 |
contractaddress |
string |
Token smart contract address (TRC20). |
TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t |
amount |
string |
Amount received/sent |
3.000000 |
timestamp |
string |
Date and time of the IPN |
2021-08-30 15:15:39 |
An example of a call would look like this:
{"id": 141854, "action": "deposit", "type": "TRC20", "contractaddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "amount": "3.000000", "timestamp": "2021-08-30 15:15:39"}
newAddress
Endpoint:
https://eu.trx.chaingateway.io/v1/newAddress
HTTP Method: POST
Generates a new tron address to send or receive funds. Do not lose the privatekey! We can't restore access to an address if you lose it. We recommend to generate addresses offline for security reasons.
Parameter |
Type |
Explanation |
Example |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true,"privatekey":"e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0","address":"TQDhtyJJnWqgbGLKB79Ns5XaNGqhhQXgBX","hexaddress":"419c4fb46e187bb60d9ea00fa74087ade960a9eaac"}
getTronBalance
Endpoint:
https://eu.trx.chaingateway.io/v1/getTronBalance
HTTP Method: POST
Returns the tron balance of a given tron address.
Parameter |
Type |
Explanation |
Example |
tronaddress |
string (Base58) |
Tron address you want to get the balance of |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "balance": "1.346912"}
getTRC10Balance
Endpoint:
https://eu.trx.chaingateway.io/v1/getTRC10Balance
HTTP Method: POST
Returns the TRC10 token balance of a given tron address
Parameter |
Type |
Explanation |
Example |
tokenid |
integer |
Token id of the TRC10 token |
1003134 |
tronaddress |
string (Base58) |
Tron address you want to get the balance of |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"tokenid": 1003134, "tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "tokenid": 1003134, "decimals": 6, "balance": "150790.630960"}
getTRC20Balance
Endpoint:
https://eu.trx.chaingateway.io/v1/getTRC20Balance
HTTP Method: POST
Returns the TRC20 token balance of a given tron address
Parameter |
Type |
Explanation |
Example |
contractaddress |
string (Base58) |
Contractaddress of the TRC20 token |
TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7 |
tronaddress |
string (Base58) |
Tron address you want to get the balance of |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"contractaddress": "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", "tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "contractaddress": "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", "decimals": 6, "balance": "1206.166463"}
getExchangeRate
Endpoint:
https://eu.trx.chaingateway.io/v1/getExchangeRate
HTTP Method: POST
Returns the current Tron price in Euro or US Dollar
Parameter |
Type |
Explanation |
Example |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
currency |
string |
eur or usd |
eur |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "currency": "eur"}
Example Response JSON:
{"ok": true, "currency": "eur", "rate": 0.02421938}
getTransaction
Endpoint:
https://eu.trx.chaingateway.io/v1/getTransaction
HTTP Method: POST
Returns information about a specific transaction by transaction hash
Parameter |
Type |
Explanation |
Example |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
txid |
string |
transaction hash |
babb68e084777808885ab65cb0ad2d393c3f47d325cbbd9aaf9e1494fca91cec |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "txid": "babb68e084777808885ab65cb0ad2d393c3f47d325cbbd9aaf9e1494fca91cec"}
Example Response JSON:
{"ok":true,"txid":"babb68e084777808885ab65cb0ad2d393c3f47d325cbbd9aaf9e1494fca91cec","type":"TRC20","from":"TUN4dKBLbAZjArUS7zYewHwCYA6GSUeSaK","to":"TKR7vTo6DvGqRXKdXeEV9H83PUaHsd4xbh","contractaddress":"TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t","amount":"20.000000","decimals":6,"blocknumber":29519359,"confirmations":29865}
getNFTOwner Beta
Endpoint:
https://eu.trx.chaingateway.io/v1/getNFTOwner
HTTP Method: POST
Returns the owner address of a specificied TRC721 token id.
Parameter |
Type |
Explanation |
Example |
contractaddress |
string |
Tron contract address of the TRC721 token |
TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t |
tokenid |
integer |
id of the token you want to get the owner address of |
10011 |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"contractaddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "tokenid": 10011, "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "tokenid": 10011, "contractaddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "owner": "TQDhtyJJnWqgbGLKB79Ns5XaNGqhhQXgBX"}
getNFTURI Beta
Endpoint:
https://eu.trx.chaingateway.io/v1/getNFTURI
HTTP Method: POST
Returns the URI of the specified NFT. The returned URI leads to more details of the NFT, like name, description and image.
Parameter |
Type |
Explanation |
Example |
contractaddress |
string |
Tron contract address of the TRC721 token |
TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t |
tokenid |
integer |
id of the token you want to get the owner address of |
10011 |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"contractaddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "tokenid": 10011, "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "tokenid": 10011, "contractaddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "NFTURI": "https://example.com/token/10011"}
subscribeAddress
Endpoint:
https://eu.trx.chaingateway.io/v1/subscribeAddress
HTTP Method: POST
Creates a new subscription/IPN for the given address (and contractaddress or tokenid). You will receive a notification to the given url every time a deposit is received or a withdrawal has been made.
Please return {"ok": true}
in JSON format and with JSON header to signal our API that the IPN has been received successfully. For an example, check out this tutorial.
Parameter |
Type |
Explanation |
Example |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
tronaddress |
string (Base58) |
The tron address you want to watch |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
contractaddress |
string (Base58) |
(Optional) Contractaddress of the TRC20 token you want to watch (Will watch TRON/TRX by default) |
TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7 |
tokenid |
integer |
(Optional) Tokenid of the TRC10 token you want to watch (Will watch TRON/TRX by default). |
1003134 |
url |
string |
The URL you want to receive notifications on. |
https://yoururl.com/ipnreceiver.php |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m","tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "contractaddress": "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", "url": "https://yoururl.com/ipnreceiver.php"}
Example Response JSON:
{"ok":true, "tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "contractaddress": "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", "url": "https://yoururl.com/ipnreceiver.php"}
unsubscribeAddress
Endpoint:
https://eu.trx.chaingateway.io/v1/unsubscribeAddress
HTTP Method: POST
Delete a subscription/IPN for the given address (and contractaddress or tokenid).
Parameter |
Type |
Explanation |
Example |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
tronaddress |
string (Base58) |
The tron address you want to watch |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
contractaddress |
string (Base58) |
(Optional) Contractaddress of the TRC20 token you want to watch (Will watch TRON/TRX by default) |
TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7 |
tronid |
integer |
(Optional) Tokenid of the TRC10 token you want to watch (Will watch TRON/TRX by default). |
1003134 |
url |
string |
The URL you want to receive notifications on. |
https://yoururl.com/ipnreceiver.php |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m","tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "contractaddress": "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", "url": "https://yoururl.com/ipnreceiver.php"}
Example Response JSON:
{"ok":true, "tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "contractaddress": "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", "url": "https://yoururl.com/ipnreceiver.php", "deleted": true}
listSubscribedAddresses
Endpoint:
https://eu.trx.chaingateway.io/v1/listSubscribedAddresses
HTTP Method: POST
Returns all subscriptions/IPNs created with an account.
Parameter |
Type |
Explanation |
Example |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true,"ipns":[{"tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "contractaddress": "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", "url": "https://yoururl.com/ipnreceiver.php"}]}
listFailedIPNs
Endpoint:
https://eu.trx.chaingateway.io/v1/listFailedIPNs
HTTP Method: POST
Returns all IPNs that couldn't be sent. Our system tries to send IPNs 10 times until they end up failed.
Parameter |
Type |
Explanation |
Example |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok":true,"failed_ipns":[{"id":"182659","timestamp":"2019-12-18 17:14:36","tronaddress":"TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB",
"contractaddress": "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7","amount":"1.567393",
"url":"https:\/\/yoururl.com/ipnreceiver.php","action":"withdraw"}]}
resendFailedIPN
Endpoint:
https://eu.trx.chaingateway.io/v1/resendFailedIPN
HTTP Method: POST
Tries to resend a failed IPN
Parameter |
Type |
Explanation |
Example |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
id |
integer |
ID of the IPN to send again |
182659 |
Example Request JSON:
{"apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m", "id": 182659}
Example Response JSON:
{"ok":true, "id": 182659}
sendTron
Endpoint:
https://eu.trx.chaingateway.io/v1/sendTron
HTTP Method: POST
Sends Tron/TRX from an address to a specified receiver address by using privatekey.
Parameter |
Type |
Explanation |
Example |
to |
string (Base58) |
Tron address you want to send to |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
privatekey |
string (Hex) |
Privatekey of the sender address |
e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0 |
amount |
string |
Amount of Tron/TRX you want to send |
1.572945 |
identifier |
(Optional) Prevents double sending. Can be any string below 32 characters. |
CN562 |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"to": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "privatekey": "e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0", "amount": "1.572945", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"txid": "f4935c8af33fd68ddcf6190d1ee8858159541c54e3b3e931c3a1f1fc4c02b0be", "to": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "from": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "amount": "1.572945"}
sendTRC10
Endpoint:
https://eu.trx.chaingateway.io/v1/sendTRC10
HTTP Method: POST
Sends a TRC10 token from an address to a specified receiver address by using privatekey.
Parameter |
Type |
Explanation |
Example |
tokenid |
integer |
Token id of the TRC10 token |
1003134 |
to |
string (Base58) |
Tron address you want to send to |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
privatekey |
string (Hex) |
Privatekey of the sender address |
e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0 |
amount |
string |
Amount of TRC10 tokens you want to send |
1.572945 |
identifier |
(Optional) Prevents double sending. Can be any string below 32 characters. |
CN562 |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"tokenid": 1003134, "to": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "privatekey": "e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0", "amount": "1.572945", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"txid": "f4935c8af33fd68ddcf6190d1ee8858159541c54e3b3e931c3a1f1fc4c02b0be", "tokenid": 1003134, "decimals": 6, "to": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "from": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "amount": "1.572945"}
sendTRC20
Endpoint:
https://eu.trx.chaingateway.io/v1/sendTRC20
HTTP Method: POST
Sends a TRC20 token from an address to a specified receiver address by using privatekey.
Parameter |
Type |
Explanation |
Example |
contractaddress |
string (Base58) |
Contract address of the TRC20 token |
TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7 |
from |
string (Base58) |
Tron address you want to send from |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
to |
string (Base58) |
Tron address you want to send to |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
privatekey |
string (Hex) |
Privatekey of the sender address |
e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0 |
amount |
string |
Amount of TRC20 tokens you want to send |
1.572945 |
identifier |
(Optional) Prevents double sending. Can be any string below 32 characters. |
CN562 |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"contractaddress": "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", "from": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "to": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "privatekey": "e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0", "amount": "1.572945", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"txid": "f4935c8af33fd68ddcf6190d1ee8858159541c54e3b3e931c3a1f1fc4c02b0be", "contractaddress": "TLa2f6VPqDgRE67v1736s7bJ8Ray5wYjU7", "decimals": 6, "to": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "from": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "amount": "1.572945"}
sendNFT Beta
Endpoint:
https://eu.trx.chaingateway.io/v1/sendNFT
HTTP Method: POST
Sends TRC721 tokens from an address controlled by the account to a specified receiver address. The token contract address and id is needed to specify the token.
Parameter |
Explanation |
Example |
contractaddress |
Ethereum contract address of the TRC721 token |
TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t |
tokenid |
ID of the token to send as integer |
10011 |
from |
Tron address you want to send from |
TQDhtyJJnWqgbGLKB79Ns5XaNGqhhQXgBX |
to |
Tron address you want to send to |
TKchW737Ji3nSJQoP3rBnzTXxMXQ7AqXjs |
privatekey |
Private key of the Tron address you want to send from |
e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0 |
apikey |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"contractaddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "from": "TQDhtyJJnWqgbGLKB79Ns5XaNGqhhQXgBX", "to": "TKchW737Ji3nSJQoP3rBnzTXxMXQ7AqXjs", "privatekey": "e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0", "tokenid": 10011, "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, "txid": "f4935c8af33fd68ddcf6190d1ee8858159541c54e3b3e931c3a1f1fc4c02b0be", "contractaddress": "TR7NHqjeKQxGTCi8q8ZY4pL8otSzgjLj6t", "from": "TQDhtyJJnWqgbGLKB79Ns5XaNGqhhQXgBX", "to": "TKchW737Ji3nSJQoP3rBnzTXxMXQ7AqXjs", "tokenid": 10011}
freezeBalance
Endpoint:
https://eu.trx.chaingateway.io/v1/freezeBalance
HTTP Method: POST
Freezes Tron for bandwidth or energy and power
Parameter |
Type |
Explanation |
Example |
tronaddress |
string (Base58) |
Tron address to freeze balance of |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
amount |
string |
Amount of Tron to freeze |
1.572945 |
duration |
integer |
Duration in days to freeze Tron (minimum 3) |
3 |
type |
string |
Resource type to freeze Tron for. Either 'BANDWIDTH' or 'ENERGY' |
ENERGY |
to |
string (Base58) |
(Optional) Tron address which receives the resources. Will use tronaddress if not provided. |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
privatekey |
string (Hex) |
Privatekey of the sender address |
e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0 |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "amount": "1.572945", "duration": 3, "type": "ENERGY", "privatekey": "e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, txid": "78fc104859094c29becb884e8fba1ada974dbe5dd5014052d954a577dbb03be9", "tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "amount": "1.572945", "duration": 3, "type": "ENERGY", "to": NULL}
unfreezeBalance
Endpoint:
https://eu.trx.chaingateway.io/v1/unfreezeBalance
HTTP Method: POST
Unfreeze Tron that has passed the minimum freeze duration.
Parameter |
Type |
Explanation |
Example |
tronaddress |
string (Base58) |
Tron address to unfreeze Tron of |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
type |
string |
Resource type to unfreeze Tron for. Either 'BANDWIDTH' or 'ENERGY' |
ENERGY |
to |
string (Base58) |
(Optional) Tron address which will lose the resources. Will use tronaddress if not provided. |
TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB |
privatekey |
string (Hex) |
Privatekey of the sender address |
e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0 |
apikey |
string |
Your API Key |
q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m |
Example Request JSON:
{"tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "type": "ENERGY", "privatekey": "e03f50b1783026637bfeec27869d68a850ae664ecdbdd2e6438e18cda98a77a0", "apikey": "q9PdaWuD4j6DK6vsUgehhL8pgarSrS9m"}
Example Response JSON:
{"ok": true, txid": "78fc104859094c29becb884e8fba1ada974dbe5dd5014052d954a577dbb03be9", "tronaddress": "TWQiHuVugyFSWDnBh2ytFPaXtGskHt3iyB", "type": "ENERGY", "to": NULL}