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

# 列出带宽规则

> 您账户中的全部带宽自动补充规则

## 列出带宽规则

返回您账户中的全部带宽自动补充规则，最早创建的在前。不包含已删除的规则。需要 `view` 权限。

### 响应

**rules** `array`

您的带宽规则。

**规则对象**

**id** `number`

规则 ID——在编辑和删除路径中使用

**target\_address** `string`

规则持续供给的地址

**label** `string | null`

您为规则起的名称

**threshold\_bandwidth** `number`

可用带宽低于此值时，规则会购买

**add\_volume** `number`

每次补充购买的带宽

**duration** `string`

每次补充的租赁时长——`1h` 或 `1d`

**status** `string`

`active`、`paused` 或 `stopped_insufficient_balance`——参见[规则状态](/zh/api-reference/auto-refill/overview#规则状态)

**stopped\_reason** `string | null`

规则被暂停或停止的原因：`insufficient_balance`、`order_failed`、`activation_failed` 或 `invalid_params`。没有原因时为 `null`。

**consecutive\_failures** `number`

连续失败的补充次数。达到 5 时规则会被暂停；一次成功的补充会将其重置为 0。

**last\_checked\_at** `string | null`

我们最近一次检查该地址的时间（ISO 8601，UTC），无论读取是否成功。首次检查之前为 `null`。

**last\_available\_bandwidth** `number | null`

最近一次成功检查时该地址的可用带宽，包括免费带宽。首次成功读取之前为 `null`。

**last\_read\_error\_at** `string | null`

最近一次检查未能读取该地址的时间（ISO 8601，UTC）。最近一次检查成功时为 `null`。该字段有值期间，`last_available_bandwidth` 来自更早的检查，可能已过时。无法读取地址的检查不会购买任何东西。

**last\_refill\_at** `string | null`

最近一次补充的时间。从未补充过时为 `null`。

**refill\_count** `number`

自规则创建以来成功补充的次数

**total\_spent\_trx** `string`

这些补充累计花费的 TRX

**created\_at** `string`

规则的创建时间（ISO 8601，UTC）

**estimated\_cost\_per\_refill\_trx** `string | null`

按当前价格计算的您账户补充一次的全部价格，已包含固定手续费。如需激活地址，激活费用另行收取。价格暂时不可用时为 `null`。

**volume\_below\_threshold** `boolean`

当 `add_volume` 小于 `threshold_bandwidth` 时为 `true`。此时一次补充可能无法让地址回到阈值以上，规则会在每次消耗后再次购买——参见[概述中的警告](/zh/api-reference/auto-refill/overview#选择数值)。

### 示例

```bash cURL theme={null}
curl https://api.tronrental.com/v1/bandwidth/auto-refill \
  -H "X-API-Key: your_api_key"
```

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

resp = requests.get(
    "https://api.tronrental.com/v1/bandwidth/auto-refill",
    headers={"X-API-Key": "your_api_key"},
)
print(resp.json())
```

```javascript JavaScript theme={null}
const resp = await fetch("https://api.tronrental.com/v1/bandwidth/auto-refill", {
  headers: { "X-API-Key": "your_api_key" },
});
console.log(await resp.json());
```

```json Response theme={null}
{
  "rules": [
    {
      "id": 15,
      "target_address": "TYourRecipientAddress1234567890abc",
      "label": "Payouts",
      "threshold_bandwidth": 1000,
      "add_volume": 5000,
      "duration": "1h",
      "status": "active",
      "stopped_reason": null,
      "consecutive_failures": 0,
      "last_checked_at": "2026-10-14T09:41:02Z",
      "last_available_bandwidth": 3655,
      "last_read_error_at": null,
      "last_refill_at": "2026-10-14T09:12:30Z",
      "refill_count": 4,
      "total_spent_trx": "1.480000",
      "created_at": "2026-10-14T08:15:00Z",
      "estimated_cost_per_refill_trx": "0.370000",
      "volume_below_threshold": false
    }
  ]
}
```

### 错误

| 状态 | 代码 | 触发条件 |
| - | - | - |
| `403` | `FORBIDDEN` | API 密钥缺少 `view` 权限 |


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