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

# Купить энергию

> Покупка энергии для адреса TRON

## Купить энергию

Делегирует энергию на указанный адрес TRON. Стоимость списывается с баланса вашего аккаунта.

### Тело запроса

<ParamField body="target_address" type="string" required>
  Целевой адрес TRON (формат T..., 34 символа)
</ParamField>

<ParamField body="volume" type="number" required>
  Количество делегируемой энергии (мин. 32 000, макс. 5 000 000)
</ParamField>

<ParamField body="duration" type="string" required>
  Длительность аренды: `"1h"` (только 1 час)
</ParamField>

### Ответ

<ResponseField name="id" type="number">
  Уникальный идентификатор заказа
</ResponseField>

<ResponseField name="status" type="string">
  Статус заказа: `pending`, `filled`, `failed`
</ResponseField>

<ResponseField name="txid" type="string | null">
  Идентификатор on-chain транзакции после broadcast делегирования (null пока `pending`)
</ResponseField>

<ResponseField name="price_trx" type="string">
  Сумма, списанная с баланса, в TRX
</ResponseField>

<ResponseField name="reclaim_at" type="string | null">
  ISO 8601 время отзыва BW (энергия отзывается автоматически на стороне провайдера)
</ResponseField>

<ResponseField name="activation_cost_trx" type="string">
  Стоимость активации адреса в TRX (`"0"` если адрес уже активирован)
</ResponseField>

### Пример

<CodeGroup>
  ```bash cURL theme={null}
  curl -X POST https://api.tronrental.com/v1/energy/buy \
    -H "X-API-Key: your_api_key" \
    -H "Content-Type: application/json" \
    -d '{
      "target_address": "TYourRecipientAddress1234567890abc",
      "volume": 65000,
      "duration": "1h"
    }'
  ```

  ```python Python theme={null}
  import requests

  resp = requests.post(
      "https://api.tronrental.com/v1/energy/buy",
      headers={"X-API-Key": "your_api_key"},
      json={
          "target_address": "TYourRecipientAddress1234567890abc",
          "volume": 65000,
          "duration": "1h",
      },
  )
  print(resp.json())
  ```

  ```javascript JavaScript theme={null}
  const resp = await fetch("https://api.tronrental.com/v1/energy/buy", {
    method: "POST",
    headers: {
      "X-API-Key": "your_api_key",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      target_address: "TYourRecipientAddress1234567890abc",
      volume: 65000,
      duration: "1h",
    }),
  });
  console.log(await resp.json());
  ```
</CodeGroup>

```json Response theme={null}
{
  "id": 12345,
  "price_trx": "2.75",
  "status": "pending"
}
```

<Tip>
  **65 000 энергии** покрывает один перевод USDT на адрес, который уже содержит USDT.
  Используйте **131 000** для первого получения USDT (создание нового слота хранения).
</Tip>
