> 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/getting-started/how-it-works.md).

# 工作原理

TronSave 是一个面向 TRON 资源的**订单簿市场**。买家为能量/带宽下单；供应商用其质押的 TRX 提供资源；TronSave 撮合双方并执行链上**代理(委托)**。

## 流程概览

```
Buyer ──places order──▶  TronSave order book  ◀──supplies resource── Provider
                              │
                              ├─ matches order at market price
                              ▼
                       On-chain delegation (Stake 2.0)
                              │
                              ▼
                   Receiver address gets Energy/Bandwidth
                        for the rental duration
```

1. **预估** —— 买家询问某笔订单的成本(`estimate-buy-resource`)。TronSave 返回单价(以 [SUN](/chinese/concepts/glossary.md) 计)和可用供应量。
2. **下单** —— 买家创建订单，指定 `resourceType`、`resourceAmount`、`durationSec`、`receiver` 以及一个[价格档位](/chinese/concepts/order-types.md)(`SLOW`/`MEDIUM`/`FAST` 或固定的 SUN 值)。
3. **撮合** —— 订单簿将订单与供应商的供应进行撮合。根据供应量和订单选项,订单可以完全成交、部分成交或保持待处理状态。
4. **代理** —— 已撮合的资源会从供应商账户\*\*在链上代理(委托)\*\*到买家的 `receiver` 接收地址,租赁时长为 `durationSec`。
5. **过期 / 续期** —— 当时长结束时,代理会被收回。买家可以在过期前进行[续期](/chinese/developers/api-reference/extend-orders.md),无需重新下单。

## 两种付款方式

|         | API 密钥(内部账户)                  | 签名交易                    |
| ------- | ----------------------------- | ----------------------- |
| **方式**  | 将 TRX 存入 TronSave 内部账户;费用自动扣除 | 每次购买时从你自己的钱包签名一笔 TRX 付款 |
| **适用于** | 机器人、后端、高频买家                   | 不愿在 TronSave 持有 TRX 的用户 |
| **托管**  | TronSave 持有你存入的余额             | 你保留完全的自我托管              |

两种方式详见[身份验证](/chinese/developers/authentication.md)。

## 在哪里使用

* **网站** —— [tronsave.io](https://tronsave.io)(完整 UI、所有订单类型和工具)
* **Telegram** —— [TronSave 机器人](/chinese/guides/buy/on-telegram.md)
* **API / SDK** —— [REST API](/chinese/developers/api-reference.md) 和 [SDK](/chinese/developers/sdk.md)(TypeScript、Rust、Python、Java 和 PHP)

## 后续步骤

* [快速开始](/chinese/getting-started/quickstart.md) · [订单类型](/chinese/concepts/order-types.md) · [租赁模型](/chinese/concepts/rental-model.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/getting-started/how-it-works.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.
