Skip to content

Latest commit

 

History

History
95 lines (52 loc) · 3.17 KB

File metadata and controls

95 lines (52 loc) · 3.17 KB
description API method credit cost.

import React from 'react'; import CreditCostTable from '@site/src/components/CreditCost/CreditCostTable.js';

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.

:::caution 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

Trace methods

Filter methods

Debug methods

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.

Linea

Polygon

Starknet

ZKsync Era

Gas API