> ## 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.

# Comprar bandwidth

> Comprar bandwidth para una dirección TRON

## Comprar bandwidth

Delega bandwidth a la dirección TRON especificada. El costo se deduce del saldo de su cuenta.

### Cuerpo de la solicitud

<ParamField body="target_address" type="string" required>
  Dirección TRON de destino (formato T..., 34 caracteres)
</ParamField>

<ParamField body="volume" type="number" required>
  Cantidad de bandwidth a delegar (mín. 350, máx. 100,000)
</ParamField>

<ParamField body="duration" type="string" required>
  Duración del alquiler: `"1h"` (1 hora) o `"1d"` (24 horas). Use `"1d"`, no `"24h"` ni valores numéricos de horas.
</ParamField>

### Respuesta

<ResponseField name="id" type="number">
  Identificador único del pedido
</ResponseField>

<ResponseField name="status" type="string">
  Estado del pedido: `pending`, `filled`, `failed`
</ResponseField>

<ResponseField name="txid" type="string | null">
  ID de transacción on-chain tras el broadcast de la delegación (null mientras `pending`)
</ResponseField>

<ResponseField name="price_trx" type="string">
  Costo total cargado al saldo, en TRX
</ResponseField>

<ResponseField name="reclaim_at" type="string | null">
  Marca de tiempo ISO 8601 cuando se recupera el bandwidth alquilado
</ResponseField>

### Precios

Precio = `(volume × price_sun) / 1,000,000 + 0.2 TRX` tarifa fija. Obtenga `price_sun_1h`, `price_sun_1d` y `fixed_fee_trx` actuales en `GET /v1/bandwidth/prices`.

### Ejemplo

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

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

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

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

```json Response theme={null}
{
  "id": 5678,
  "price_trx": "10.28",
  "status": "filled",
  "txid": "abc123...",
  "reclaim_at": "2026-06-10T21:00:00+00:00"
}
```

<Tip>
  **350 bandwidth** cubre una transferencia USDT TRC-20 cuando se agota el bandwidth diario gratuito.
</Tip>
