The error "credits limited to X/sec" indicates that your client attempts to use more API Credits per second than your current plan allows.
Usage in the QuickNode Pricing Plans is measured in API Credits. API Credits are based on the intensity that the method has on the platform and vary based on several complex factors such as compute, memory, disk, and network resources. API Credits per second differ depending on your subscription plan. Always refer to the QuickNode Pricing Plans for accurate information.
To monitor your API Credits consumption, visit the Usage & Billing section on the dashboard. This section offers a detailed overview of your usage across different methods and API Credits. For an in-depth analysis, refer to the Metrics section within each endpoint, where you can find more specific breakdowns and insights.
Remember that when you batch requests, each request within the batch is individually counted towards your API Credits per second. Additionally, all responses received through an open WebSocket connection are included in this count. For example, subscribing to pending transactions results in a request, but it's a subscription that may generate hundreds or thousands of responses. If you want to monitor specific blocks, transactions, or logs, consider using QuickAlerts as a more efficient alternative.
The distribution of requests within that second is also crucial. Sending a series of intensive requests in a brief timeframe, such as 10 requests within 2 milliseconds, might lead to exceeding the limits, even if the overall count does not surpass the API Credits per second threshold.
When you receive the "credits limited to X/sec" error, consider waiting for a bit before sending additional requests. To help manage this, you can use throttle middlewares such as ratelimit for Python, axios-rate-limit for JavaScript, or Uber's Go rate limiter. If your requirements consistently exceed the set limit, consider an upgrade to a plan with higher API Credits per second.
For more details on API Credits, please visit our website at https://www.quicknode.com/api-credits.
Comments
0 comments
Article is closed for comments.