---
title: "x402 如何为请求计价"
description: "在 x402.erpc.global 上，一次标准 RPC 调用的价格为 $0.001。开销更大的方法按其权重收取更高费用，批量请求按一个请求计价。"
canonical: "https://erpc.global/zh/doc/x402/pricing/"
locale: "zh"
---

# x402 如何为请求计价

标准调用（例如 `getSlot` 或 `eth_blockNumber`）的价格为 \$0.001，这是单个请求的最低收费。开销更大的方法（例如 `getProgramAccounts` 或 `eth_getLogs`）会按方法的权重收取更高费用。批量请求按一个请求计价，因此最低收费对整个批量请求只计一次。每个方法的价格都可在 [x402.erpc.global/pricing](https://x402.erpc.global/pricing) 查看，该页面与实际为您的请求计价所用的是同一套价格表。

## 价格的计算方式

1. 每个方法都有一个以 token 计的权重。这里的 token 是价格单位，不是代币：一个 token 为 \$0.000001，因此 1,000 token 为 \$0.001，以 0.001 USDC 支付。
2. 将请求中所有调用的权重相加。
3. 合计不足 1,000 token 时，按 1,000 token（\$0.001）收费：这是 x402.erpc.global 结算的最低付款额。

`getSlot` 和 `getBlockHeight` 组成的批量请求权重为 42 + 42 = 84 token，价格为 \$0.001。`eth_blockNumber`、`eth_getLogs` 和 `eth_call` 组成的批量请求权重为 42 + 2,400 + 420 = 2,862 token，价格为 \$0.002862。

## Solana

| 方法 | Token | 单次调用的价格 |
| --- | --- | --- |
| 标准方法，例如 `getBalance`、`getSlot` 和 `sendTransaction` | 42 | \$0.001 |
| DAS 方法，例如 `getAsset` | 640 | \$0.001 |
| `getMultipleAccounts` | 调用中每个账户 420 | 1 或 2 个账户为 \$0.001，最多 100 个账户时为 \$0.042 |
| `getTokenLargestAccounts` | 2,400 | \$0.0024 |
| `getProgramAccounts`、`getProgramAccountsV2` | 4,200 | \$0.0042 |

/pricing 中的其他方法权重都低于 1,000 token，因此单次调用的价格为 \$0.001；例如 `getSignaturesForAddress` 的权重为 420。与其他链不同，Solana 还接受 /pricing 中未列出的方法，按 42 token 计。例外是 x402.erpc.global 不出售的方法（例如 `getLeaderSlots`），调用这些方法会返回错误，且不收费。

## Ethereum 和 Base

Base 使用与 Ethereum 相同的价格表。

| 方法 | Token | 单次调用的价格 |
| --- | --- | --- |
| 标准方法，例如 `eth_blockNumber`、`eth_getBalance` 和 `eth_sendRawTransaction` | 42 | \$0.001 |
| 执行代码或生成证明的调用，例如 `eth_call`、`eth_estimateGas` 和 `eth_getProof` | 420 | \$0.001 |
| 返回大量数据的调用，例如 `eth_getLogs`、`eth_getBlockReceipts`，以及返回完整交易的 `eth_getBlockByNumber` | 2,400 | \$0.0024 |
| `eth_simulateV1`、`eth_callMany` | 4,200 | \$0.0042 |

调用不在价格表中的方法（例如 `debug_*` 或 `trace_*` 方法）会在付款之前返回错误。

## Avalanche

`eth_*` 方法使用 Ethereum 的权重。其他命名空间中的方法（例如 `avax.*`、`avm.*`、`platform.*` 和 `info.*`）权重为 42 token，因此单次调用的价格为 \$0.001。

## 其他 12 条链

在 Arbitrum、Bitcoin、Hyperliquid、Kaia、Monad、NEAR、Optimism、Polygon、Robinhood Chain、Soneium、Sui 和 TRON 上，所有方法的权重都低于 1,000 token，因此单次调用的价格为 \$0.001。调用不在该链价格表中的方法会在付款之前返回错误。

## 用 EURC 付款

价格以美元计。EURC 与 USDC 按 1:1 收取：单位数量相同，不做汇率换算。\$0.001 的请求以 0.001 USDC 或 0.001 EURC 支付。

## 查看价格

`GET https://x402.erpc.global/pricing` 返回每个路径的价格表，列出每个方法的 token 数和价格。此端点免费。
