Skip to main content

Services documentation

Use high performance APIs provided by Infura to scale your dapp or Snap.

Credit costs

The following tables outline the credit costs associated with various RPC methods across different networks. The credit calculation logic is designed to ensure accurate and fair pricing based on the specific network and method being used.

important

Requests for archive data (older than 128 blocks) currently cost the same as non-archive data, but this might change in the near future.

The process used to determine the credit cost for each request is as follows:

  1. Initial check for a specific credit value - When you make a request, the system first checks if there is a specific credit value assigned for the network and method used. This ensures that any unique resource requirements or costs associated with a particular network are accurately reflected.

  2. Fallback to the Ethereum method's credit value - If no specific credit value is found for the network, the system applies the Ethereum method's credit value. Ethereum serves as the baseline for pricing core RPC methods.

  3. Fallback to the default credit value - If the method is not found in the Ethereum table either, the system applies a default credit value. Initially set to 80 credits, this default value ensures all requests are accounted for, even if specific pricing information is not available.

Error code costs

When making requests that return status code errors, some errors count towards your credit usage.

  • 429 errors: These are not charged and can occur if you've exceeded your allowed throughput limit (requests per second).
  • 402 errors: These are not charged and can occur if you've exceeded your allowed daily credit usage.
  • 4xx errors: These are errors caused by human input, and consume 5 credits.
  • 5xx errors: These are server errors, and do not consume any credit charges.

Ethereum

The Ethereum methods serve as a baseline for pricing RPC methods. If a credit cost is not available for a specific network, then use the default Ethereum method's credit cost.

Standard Ethereum-compliant methods

RPC method Credit cost
eth_accounts80 credits
eth_blobBaseFee300 credits
eth_blockNumber80 credits
eth_call80 credits
eth_chainId5 credits
eth_createAccessList80 credits
eth_estimateGas300 credits
eth_feeHistory80 credits
eth_gasPrice80 credits
eth_getBalance80 credits
eth_getBlockByHash80 credits
eth_getBlockByNumber80 credits
eth_getBlockReceipts1000 credits
eth_getBlockTransactionCountByHash150 credits
eth_getBlockTransactionCountByNumber150 credits
eth_getCode80 credits
eth_getLogs255 credits
eth_getProof150 credits
eth_getStorageAt80 credits
eth_getTransactionByBlockHashAndIndex150 credits
eth_getTransactionByBlockNumberAndIndex150 credits
eth_getTransactionByHash80 credits
eth_getTransactionCount80 credits
eth_getTransactionReceipt80 credits
eth_getUncleByBlockHashAndIndex150 credits
eth_getUncleByBlockNumberAndIndex150 credits
eth_getUncleCountByBlockHash150 credits
eth_getUncleCountByBlockNumber150 credits
eth_getWork80 credits
eth_hashrate5 credits
eth_maxPriorityFeePerGas80 credits
eth_mining5 credits
eth_protocolVersion5 credits
eth_sendRawTransaction80 credits
eth_sign80 credits
eth_simulateV1300 credits
eth_submitWork80 credits
eth_subscribe5 credits
eth_syncing5 credits
eth_unsubscribe10 credits
net_listening5 credits
net_peerCount80 credits
net_version5 credits
web3_clientVersion80 credits

Trace methods

RPC method Credit cost
trace_block300 credits
trace_call300 credits
trace_callMany300 credits
trace_filter300 credits
trace_transaction300 credits

Filter methods

RPC method Credit cost
eth_getFilterChanges140 credits
eth_getFilterLogs255 credits
eth_newBlockFilter80 credits
eth_newFilter80 credits
eth_uninstallFilter80 credits

Debug methods

RPC method Credit cost
debug_storageRangeAt1000 credits
debug_traceBlock1000 credits
debug_traceBlockByHash1000 credits
debug_traceBlockByNumber1000 credits
debug_traceCall1000 credits
debug_traceTransaction1000 credits

Subscription events

You can subscribe and unsubscribe to events using eth_subscribe and eth_unsubscribe.

The credit costs for the logs and newHeads events are charged per block, whereas newPendingTransaction events are charged at approximately one second intervals.

Subscription events Credit cost
logs300 credits
newHeads50 credits
newPendingTransaction200 credits

Linea

RPC method Credit cost
linea_estimateGas100 credits
linea_getTransactionExclusionStatusV1160 credits

Polygon

RPC method Credit cost
bor_getAuthor80 credits
bor_getCurrentProposer80 credits
bor_getCurrentValidators80 credits
bor_getRootHash80 credits
bor_getSignersAtHash80 credits

Starknet

RPC method Credit cost
starknet_addDeclareTransaction700 credits
starknet_addDeployAccountTransaction700 credits
starknet_addInvokeTransaction700 credits
starknet_blockHashAndNumber80 credits
starknet_blockNumber80 credits
starknet_call80 credits
starknet_chainId5 credits
starknet_estimateFee240 credits
starknet_getBlockTransactionCount80 credits
starknet_getBlockWithTxHashes80 credits
starknet_getBlockWithTxs80 credits
starknet_getClass80 credits
starknet_getClassAt80 credits
starknet_getClassHashAt80 credits
starknet_getEvents200 credits
starknet_getNonce80 credits
starknet_getStateUpdate80 credits
starknet_getStorageAt80 credits
starknet_getTransactionByBlockIdAndIndex80 credits
starknet_getTransactionByHash80 credits
starknet_getTransactionReceipt80 credits
starknet_pendingTransactions160 credits
starknet_simulateTransactions160 credits
starknet_specVersion5 credits
starknet_syncing5 credits

ZKsync Era

RPC method Credit cost
zks_estimateFee80 credits
zks_estimateGasL1ToL280 credits
zks_getAllAccountBalances80 credits
zks_getBlockDetails80 credits
zks_getBridgeContracts80 credits
zks_getBytecodeByHash80 credits
zks_getL1BatchBlockRange80 credits
zks_getL1BatchDetails80 credits
zks_getL2ToL1LogProof80 credits
zks_getL2ToL1MsgProof80 credits
zks_getMainContract80 credits
zks_getProof80 credits
zks_getRawBlockTransactions80 credits
zks_getTestnetPaymaster80 credits
zks_getTransactionDetails80 credits
zks_L1BatchNumber80 credits
zks_L1ChainId80 credits

Gas API

API endpoint Credit cost
baseFeeHistory80 credits
baseFeePercentile80 credits
busyThreshold80 credits
suggestedGasFees80 credits