> ## Documentation Index
> Fetch the complete documentation index at: https://docs-en.keysecure.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Purchase TRON Network Transaction Resources

> Purchase TRON resources via API without burning TRX to complete the transaction.

> [!TIP]
>
> Before making a purchase, please refer to [Purchase TRON Network Transaction Resources](https://docs-en.keysecure.io/api-references/mpc-apis/apis/tron/resource-shopping-guide.md) to complete all the necessary configurations.

#### Request Parameters

**request\_id** `string` *required*

Unique business identifier. cannot be reused for repeated submissions. Maximum 32 characters, letters, numbers, underscores (`_`), and hyphens (`-`) only.

**buy\_type** `integer`

0: System estimation - full delegation, 1: Specified quantity, 2: System estimation - supplementary delegation, default is 0 if not specified.

> [!NOTE]
>
> **All methods comply with minimum purchase value limits:**
>
> * Minimum bandwidth purchase quantity: 300
> * Minimum energy purchase quantity: 10,000
>
> **1. System Estimation - Full delegation (buy\_type=0)**
>
> * Required fields: address\_to and contract\_address.
> * he system will automatically estimate the total resources needed for the current transaction plus a certain buffer. For example, if the user requests an energy proxy for a USDT transfer and the system estimates the required energy to be 64,285, the purchase amount will be 64,285 + 115 = 64,400 to ensure the transaction is successfully completed.
> * Note: The system estimation may be affected by Tron network fluctuations. If the transaction fails due to insufficient estimation, please switch to the Specified Quantity (buy\_type=1) method.
>
> **2. System estimation - supplementary delegation (buy\_type=2)**
>
> * Required fields: address\_to and contract\_address.
> * This method only affects energy purchase quantities (bandwidth purchase estimation for buy\_type=2 is the same as buy\_type=0).
> * The system will calculate the remaining energy required based on the current address balance and slightly supplement it to ensure successful transactions. For example, if the user requests an energy proxy for a USDT transfer and the system estimates the required energy to be 64,285 while the current address has 10,000 energy, the purchase amount will be 64,285 - 10,000 + 115 = 54,400 to ensure smooth completion.
> * Note: The system estimation may be affected by Tron network fluctuations. If the transaction fails due to insufficient estimation, please switch to the Specified Quantity (buy\_type=1) method.
>
> **3. Specified quantity (buy\_type=1)**
>
> * Users can customize the resource purchase quantity.

**resource\_type** `integer`

Resource purchase type: 0: Energy and Bandwidth, 1: Energy, default if not specified

> [!NOTE]
>
> If you choose to purchase bandwidth (resource\_type=0), please note the following:
>
> 1.The minimum purchase quantity is 300.
>
> 2.Each bandwidth purchase order will incur a fixed additional fee of 560, which covers the bandwidth cost required for initiating delegation and recovery by the system. For example, if you request to purchase 600 bandwidth units, the total bandwidth amount for the order will be 600 + 560 = 1,160.

**service\_charge\_type** `string` *required*

Resource purchase cycle:
10010 - 10 minutes,
20001 - 1 hour,
30001 - 1 day

**energy\_num** `integer`

Energy Amount

> [!NOTE]
>
> 1. If buy\_type=1, please enter the specific amount of energy, with a minimum value of 10,000.
>
> 2. If buy\_type=0 or 2, the quantity will be automatically provided by the system.

**net\_num** `integer`

Bandwidth Amount

> [!NOTE]
>
> 1. If buy\_type=1, please enter the specific bandwidth amount, with a minimum value of 300.
>
> 2. If buy\_type=0 or 2,, the quantity will be automatically provided by the system.
>
> 3. Please note that each bandwidth purchase order will incur a fixed additional fee of 560 to cover the bandwidth cost for system-initiated proxy and recovery processes. For example, if you enter a purchase amount of 600 bandwidth, the total bandwidth for the order will be 600 + 560 = 1160.

**address\_from** `string` *required*

The address that will receive the resources
\[!NOTE] When buy\_type=0 or 2, Please ensure that address\_from holds the token corresponding to contract\_dedress, otherwise the miner fee estimation will fail

**address\_to** `string`

The transfer address for estimating miner fees.

> [!NOTE]
>
> Required when selecting **buy\_type=0** or **buy\_type=2**.

**contract\_address** `string`

Contract address for estimating miner fees.

> [!NOTE]
>
> Required when selecting **buy\_type=0** or **buy\_type=2**.

#### Response Parameters

**object**

**trans\_id** `integer`

Purchase Resource Transaction ID

```curl cURL theme={null}
curl -X POST \
--url 'https://openapi.keysecure.io/
api/mpc/tron/delegate?app_id=16a9f17fc2ad61ca4339fdd6a8a37f21&data=SWYYr-LBVAmaS0eq8n-CUT_nHkM3OBxyWOsImMTe41UaqAoYI2ZghmaphXHov-7hsRsVmOhyPqC-JFuRGvonJKFd2Jirxv6Vn_8V40r_MMYTkhqcviQbZWYW5xX8Ai8CIpqas9fIWVDIYA_NKBl0UCJpwGxscxLNpjq5Z8-BTyIYDsVBquM9zEQGBCfcA7szD9n2fN_loSkoexlwqV8wg9HIZO5yQ6utZ_Kt0lNDQQb8zn8BwfAvsEsbJlOINUAqhxh1vV_AJ4bXn2uYx8TaYcBht-n_ZcBdxIDt975dbOFUiH-oCzIuDi1oLDtb4EylfCvhU5E4ozel_lQ-6cyIG0Dqiiyx0RFFOCJzPSXIoV031pvoa8pTCpkWklh8mRw1rylBgeZtqSxpnJO2_u2RIlXq6Hs8Yly9CmhIXaSrUgPir0h6xVxlf4VC6PFVCkiiTlp0kZ_H_UbKm0nUis3v3U2sflWJ2C449waSrikhuxVrFAQ6PQmrFVCAE6MYXNrFXJQuam2HAIQNSGbFQjspw8b_bXyfyZMGZ3K2oBC4I_v3eETTdPe0pfSNJb-5g37K0tOAr_UFbWK8pkC8yl56fSjn8tcR3yCRWwoi8jxTcUBiswTtvXZtzgG4dyzkaHXjsZjSGiywXSqP76VZWlyOmAx6IDSViLcPLPISdU3ruCI'
```

```json theme={null}
{
    "trans_id": 1
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.