> ## Documentation Index
> Fetch the complete documentation index at: https://docs.li.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# API 概述

> LI.FI Intents API 的 Base URL、端点、认证和订单生命周期。

Intents API 是面向集成方的接口，用于请求报价、提交订单和跟踪状态。所有端点均为开放的，无需 API 密钥。

<Note>
  关于面向解算器的端点（报价提交、账户管理），请参阅 [Solver API 概述](/lifi-intents/for-solvers/api-overview)。关于认证详情，请参阅[认证](/lifi-intents/authentication#integrators)。
</Note>

***

## Base URL

| 环境   | URL                       | 用途                            |
| ---- | ------------------------- | ----------------------------- |
| 生产环境 | `https://order.li.fi`     | 使用真实资产的实盘订单                   |
| 开发环境 | `https://order-dev.li.fi` | 测试网订单（Sepolia、Base Sepolia 等） |

两个环境上都提供交互式 API 文档，地址为 [`/docs`](https://order.li.fi/docs)。

***

## 端点

| 方法     | 路径                                 | 描述                                             |
| ------ | ---------------------------------- | ---------------------------------------------- |
| `POST` | `/quote/request`                   | 为意图请求报价（exact-input 或 exact-output）            |
| `POST` | `/api/v1/integrator/quote/request` | V1 报价端点，提供对集成方友好的报价参数（CAIP-2 + 原生地址；推荐用于 Tron） |
| `POST` | `/orders/submit`                   | 向解算器网络提交订单（意图）                                 |
| `GET`  | `/orders`                          | 列出订单，可选过滤器                                     |
| `GET`  | `/orders/status`                   | 通过 `onChainOrderId` 或 `catalystOrderId` 获取订单状态 |
| `GET`  | `/chains/supported`                | 获取受支持的链列表                                      |
| `GET`  | `/routes`                          | 获取受支持的路由（链/资产对）                                |

***

## 订单生命周期

根据提交路径和索引时间，订单可能包含过渡状态。在大多数集成中，主要的执行进程为：

```
Signed → Delivered → Settled
```

| 状态            | 发生了什么                   |
| ------------- | ----------------------- |
| **Signed**    | 订单已签名并广播到解算器网络          |
| **Delivered** | 解算器已在目标链上交付资产           |
| **Settled**   | Oracle 已验证交付，锁定资金释放给解算器 |

如果订单在 `fillDeadline` 之前未被填充，则可在 `expires` 之后退款。

***

## 可互操作地址

Intents API 使用 [EIP-7930 可互操作地址](https://eips.ethereum.org/EIPS/eip-7930)，它将链和地址编码在单个字节字段中。这适用于报价请求中的 `user`、`asset` 和 `receiver` 字段。下面的示例是一个 EVM 地址（ChainType `0x0000`）；非 EVM 链使用它们自己的 CAIP-2 命名空间。对于 **Tron**，[V1 端点](/lifi-intents/knowledge-database/tron-deltas#recommended-path-the-v1-quote-endpoint)接受原生的 base58 地址，完全避免了 EIP-7930 的手动编码。

在 Base（链 ID 8453）上编码 `0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913` 的示例：

```
0x0001|0000|02|2105|14|833589fCD6eDb6E08f4c7C32D4f71b54bdA02913
  ^^^^  Version: 1
       ^^^^  ChainType: EVM
            ^^  Chain Reference length: 2 bytes
               ^^^^  Chain Reference: 8453 (hex 2105)
                    ^^  Address length: 20 bytes
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  Address
```

***

## 数额

所有数额均以代币的最小单位（wei 等价）表示，不带小数。例如，1.5 USDC（6 位小数）为 `"1500000"`。

***

## 后续步骤

<CardGroup cols={2}>
  <Card title="请求报价" icon="bolt" href="/lifi-intents/intents-api/request-quote">
    为您的意图获取解算器定价
  </Card>

  <Card title="创建并提交订单" icon="paper-plane" href="/lifi-intents/intents-api/create-and-submit">
    构造订单并提交到解算器网络
  </Card>

  <Card title="跟踪订单状态" icon="signal" href="/lifi-intents/intents-api/track-status">
    通过 API 或链上事件监控订单
  </Card>

  <Card title="Solver API" icon="gears" href="/lifi-intents/for-solvers/api-overview">
    解算器端点、报价和填充订单
  </Card>
</CardGroup>
