Computational Units
Details on CUs

Required Number of CUs

If you have read about Computational Units (opens in a new tab), you may find it challenging to calculate the number of CUs required for requests accurately. For this purpose, we have added the estimate_cu parameter to our endpoints. The requests that you make with this parameter won't charge any CUs.

How it works:

  1. Pick the desired endpoint, for example Get Logs (opens in a new tab).
  2. Add the estimate_cu parameter. For a cURL request, it would be &estimate_cu=true.
  3. Send the request and expect to see the CU cost and remainder details in the headers of the response.
📘️

If the estimate_cu parameter set to true, there will be no output in the response body. Be sure to check the headers of the response as shown in the image below.

PARSIQ

CUs for Web3Hook API

By utilizing Web3Hook API, users can stay up-to-date on log events and function calls as they happen and receive timely updates and notifications. However, it's important to note that using the Web3Hook endpoints incurs additional computational costs compared to other endpoints such as Get Logs, Get Internal Transactions, etc.

Delivering records is the key factor as every record of a log event or a function call delivered to the user incurs a cost of 4 CUs. This cost reflects the computational resources involved in processing, filtering, and delivering each record to the user in real time.

When calculating the computational cost of the Web3Hook endpoints, it's essential to consider and estimate the number of potential record deliveries. This will ensure you can factor them into your pricing, resource allocation considerations, and other API usage.