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

# GraphQL 接口

> 使用 GraphQL 接口查询已解析的事件数据。

已解析事件的 GraphQL 接口提供了两种方法，允许客户端选择所需的字段。使用 `transactions` 进行解析交易，使用 `transactionsByAddress` 获取已解析的交易历史。

## 查询

### `transactions`

解析交易：解析一个或多个交易签名。

| 参数           | 类型           | 默认值         | 描述                         |
| ------------ | ------------ | ----------- | -------------------------- |
| `signatures` | `[String!]!` | -           | 要解析的交易签名。                  |
| `commitment` | `Commitment` | `CONFIRMED` | `CONFIRMED` 或 `FINALIZED`。 |

### `transactionsByAddress`

已解析的交易历史：获取某个地址的已解析交易历史。

| 参数                | 类型                               | 默认值         | 描述                               |
| ----------------- | -------------------------------- | ----------- | -------------------------------- |
| `address`         | `String!`                        | -           | 要获取交易历史的地址。                      |
| `limit`           | `Int`                            | `100`       | 返回的交易数量。                         |
| `beforeSignature` | `String`                         | -           | 返回此签名之前的交易。                      |
| `afterSignature`  | `String`                         | -           | 返回此签名之后的交易。                      |
| `paginationToken` | `String`                         | -           | 形状为 `slot:transactionIndex` 的游标。 |
| `sortOrder`       | `SortOrder`                      | `DESC`      | `ASC` 或 `DESC`。                  |
| `commitment`      | `Commitment`                     | `CONFIRMED` | `CONFIRMED` 或 `FINALIZED`。       |
| `filters`         | `AddressTransactionFiltersInput` | -           | 可选的 `slot` 和 `time` 边界。          |

## 原始交易选择

只有在查询中选择时，GraphQL 才会包含 `rawTransaction`。如果未选择，原始交易有效载荷将被省略。

## 错误行为

请求级错误使用具有扩展代码的 GraphQL 错误，如 `BAD_REQUEST`、`NOT_FOUND`、`SERVICE_UNAVAILABLE` 或 `INTERNAL_SERVER_ERROR`。

按项目解析器失败将在数据有效载荷中作为 `parserStatus: ERROR` 与 `parserError` 返回。
