How x402 prices a request

A standard call, such as getSlot or eth_blockNumber, costs $0.001, the minimum for one request. Heavier methods, such as getProgramAccounts or eth_getLogs, cost more, by the weight of the method. A batch is priced as one request, so the minimum is paid once for the whole batch. Every method's price is at x402.erpc.global/pricing, from the same tables that price your requests.

How the price is worked out

  1. Each method has a weight, counted in tokens. A token here is a unit of price, not a coin: one token is $0.000001, so 1,000 tokens is $0.001, paid as 0.001 USDC.
  2. The weights of every call in the request are added up.
  3. A total under 1,000 tokens is charged as 1,000 tokens, $0.001: the smallest payment x402.erpc.global settles.
A batch of getSlot and getBlockHeight weighs 42 + 42 = 84 tokens and costs $0.001. A batch of eth_blockNumber, eth_getLogs and eth_call weighs 42 + 2,400 + 420 = 2,862 tokens and costs $0.002862.

Solana

MethodsTokensPrice of one call
Standard methods, such as getBalance, getSlot and sendTransaction42$0.001
DAS methods, such as getAsset640$0.001
getMultipleAccounts420 per account in the call$0.001 for 1 or 2 accounts, up to $0.042 for 100
getTokenLargestAccounts2,400$0.0024
getProgramAccounts, getProgramAccountsV24,200$0.0042
Every other method in /pricing weighs less than 1,000 tokens, so one call costs $0.001; getSignaturesForAddress, for example, weighs 420. Unlike the other chains, Solana also takes a method /pricing does not list, at 42 tokens. The exceptions are the methods x402.erpc.global does not sell, such as getLeaderSlots, which are answered with an error and not charged.

Ethereum and Base

Base uses the Ethereum table.
MethodsTokensPrice of one call
Standard methods, such as eth_blockNumber, eth_getBalance and eth_sendRawTransaction42$0.001
Calls that run code or build proofs, such as eth_call, eth_estimateGas and eth_getProof420$0.001
Calls that return a lot of data, such as eth_getLogs, eth_getBlockReceipts, and eth_getBlockByNumber with full transactions2,400$0.0024
eth_simulateV1, eth_callMany4,200$0.0042
A method outside the table, such as a debug_* or trace_* method, is answered with an error before payment.

Avalanche

eth_* methods use the Ethereum weights. Methods in the other namespaces, such as avax.*, avm.*, platform.* and info.*, weigh 42 tokens, so one call costs $0.001.

The other 12 chains

On Arbitrum, Bitcoin, Hyperliquid, Kaia, Monad, NEAR, Optimism, Polygon, Robinhood Chain, Soneium, Sui and TRON, every method weighs less than 1,000 tokens, so one call costs $0.001. A method outside the chain's table is answered with an error before payment.

Paying in EURC

The price is set in US dollars. EURC is charged at par with USDC: the same number of units, with no exchange rate applied. A $0.001 request is paid with 0.001 USDC or 0.001 EURC.

Check the prices

GET https://x402.erpc.global/pricing returns the table of every route, with each method's tokens and price. It is free.