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

# 提前回收订单

> 在租期结束前收回订单的带宽

## 提前回收订单

立即取消您订单的带宽委托——例如地址已经完成了租用资源所需的转账——无需等待租期结束。**未使用的时间不予退款。** 仅带宽订单可以提前回收。

### 路径参数

**order\_id** `number` *required*

订单 ID —— Buy Bandwidth 返回的 `id`。

### 响应

返回订单对象，与 Get Order 相同。`status` 表示处理结果：

| 状态 | 含义 |
| - | - |
| `reclaimed` | 带宽已在请求等待期间取消委托（请求最多等待约 10 秒）；`undelegate_txid` 为链上交易 |
| `filled` | 取消委托未在请求期间完成，将由下一个回收周期完成，通常在 30 秒内。结果通过 `order.updated` webhook 通知，或轮询 Get Order |
| `reclaiming` | 该订单的回收正在进行中 |
| `reclaim_failed` | 多次重试后，我们这边未能完成取消委托。您无需做任何事 |

对已处于 `reclaiming`、`reclaimed` 或 `reclaim_failed` 状态的订单再次调用，会原样返回订单，因此重试是安全的。API 密钥需要 `buy_bandwidth` 权限。

### 错误

| 代码 | 状态 | 情况 |
| - | - | - |
| `ORDER_NOT_FOUND` | `404` | 您的账户下没有该订单 |
| `ORDER_NOT_RECLAIMABLE` | `409` | 订单尚未交付（`filled`）或已失败 |
| `BAD_REQUEST` | `400` | 不是带宽订单 |
| `FORBIDDEN` | `403` | API 密钥缺少 `buy_bandwidth` 权限 |

### 示例

```bash theme={null}
curl -X POST https://api.tronrental.com/v1/orders/12345/reclaim \
  -H "X-API-Key: your_api_key"
```

```json Response theme={null}
{
  "id": 12345,
  "type": "bandwidth",
  "target_address": "TRecipientAddress...",
  "volume": 350,
  "duration": "1h",
  "price_trx": "0.42",
  "fixed_fee_trx": "0.2",
  "status": "reclaimed",
  "delegate_txid": "a1b2c3d4e5f6...",
  "undelegate_txid": "f6e5d4c3b2a1...",
  "reclaim_at": "2026-11-11T11:00:00Z",
  "source": "api",
  "activation_id": null,
  "activation_cost_trx": null,
  "fail_reason": null,
  "refunded_trx": null,
  "created_at": "2026-11-11T10:00:00Z"
}
```


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