> For the complete documentation index, see [llms.txt](https://docs.tronsave.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tronsave.io/chinese/developers/api-reference/buy-resources.md).

# 购买资源

TronSave 的 API 提供了两种购买资源(能量和带宽)的方法。两者都允许你在下单前预估订单,然后再创建订单;它们的区别在于付款的授权和结算方式。

| 方法                                                                   | 付款授权方式                        | 链上结算       | 最适合            |
| -------------------------------------------------------------------- | ----------------------------- | ---------- | -------------- |
| [签名交易](/chinese/developers/api-reference/buy-resources/signed-tx.md) | 由你的私钥对每笔交易进行签名                | 是,每笔订单     | 对资金的最大掌控;非托管流程 |
| [API 密钥](/chinese/developers/api-reference/buy-resources/api-key.md) | 使用绑定到预充值内部账户的 TronSave API 密钥 | 无单笔订单链上手续费 | 高吞吐、低延迟的集成     |

## 使用签名交易

你构建一笔交易并用自己的私钥对其进行签名。签名交易被提交到区块链网络进行验证和执行,因此只有私钥的持有者才能授权此次购买。

**优点**

* 安全性高——每笔订单都用你的私钥签名。
* 直接掌控付款资金;由你自己管理。

**缺点**

* 提交到区块链网络的交易会产生额外的交易手续费。
* 集成更复杂——你需要处理交易签名和验证。

端点:

* [预估订单](/chinese/developers/api-reference/buy-resources/signed-tx/estimate-trx.md)
* [创建订单](/chinese/developers/api-reference/buy-resources/signed-tx/create-order.md)

→ [阅读签名交易指南](/chinese/developers/api-reference/buy-resources/signed-tx.md)

## 使用 API 密钥

要使用 API 密钥方法,请创建一个 TronSave 内部账户并向其中充值。内部账户创建后,会生成一个 API 密钥,用于对你的交易进行身份验证——无需对每笔订单进行链上签名。

**优点**

* 交易快速且安全。
* 集成简单。
* 节省交易手续费。

**缺点**

* 在交易能够执行之前,必须先向内部账户充值。
* TronSave 管理客户的内部账户。

{% hint style="info" %}
需要先获取 API 密钥?请参阅[获取 API 密钥](/chinese/developers/authentication.md)。
{% endhint %}

端点:

* [预估订单](/chinese/developers/api-reference/buy-resources/api-key/estimate-trx.md)
* [创建订单](/chinese/developers/api-reference/buy-resources/api-key/create-order.md)

→ [阅读 API 密钥指南](/chinese/developers/api-reference/buy-resources/api-key.md)

## 后续步骤

* 了解[能量和带宽](/chinese/concepts/energy-and-bandwidth.md)之间的区别。
* 下单前请查看[订单类型](/chinese/concepts/order-types.md)。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tronsave.io/chinese/developers/api-reference/buy-resources.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
