Extend with Rest API

To use this feature you must have the API key. Read here to view how to get our API key

Step 1: Check all extendable delegates

POST https://api.tronsave.io/v0/get-extendable-delegates

Check extendable delegates by API-key

Rate limit: 1 request per 1 seconds

Headers

Name
Type
Description

apikey*

String

Tronsave api key that present for internal account

Request Body

Name
Type
Description

extend_to*

String

Time in milliseconds you want to extend to

max_price

Number

Number maximum price you want to pay to extend

receiver

String

The address that received resource delegate

  {
            "extend_order_book": [
                {
                    "price": 133,
                    "value": 64319
                },
                ...
            ], //Overview extend energy amount at every single price
            "total_delegate_amount": 64319, 
            //Total current delegate of receiver address in tronsave
            "total_available_extend_amount": 64319,
            //Total available delegate of receiver address in tronsave
            "total_estimate_trx": 8554427,
            //Estimate TRX payout if using extend_data below to create extend request
            "your_balance": 20000000,
            //api key's internal balance 
            "is_able_to_extend": true,
            //Compare balance and total_estimate_trx 
            "extend_data": [
                {
                    "delegator": "TMN2uTdy6rQYaTm4A5g732kHRf72tKsA4w",
                    "is_extend": true,
                    "extra_amount": 0,
                    "extend_to": 1728459019000
                }
            ]
            //Extend data that are used to create extend requests below
}

Example

Example Code

Step 2: Create an extend request by API key

POST https://api.tronsave.io/v0/internal-extend-request

Create a new extend request order by API-key

Rate limit: 15 request per 1 seconds

Headers

Name
Type
Description

apikey*

String

Tronsave api key that present for internal account

Request Body

Name
Type
Description

receiver*

String

The address that received resource

extend_data*

Array

Array extends data. Get it at a response of API estimate extendable delegate

return array of order ids if success

Example

Example Code

Last updated