Skip to main content
Version: 2.0

EVM Compute Units

All Moralis plans have generous limits on the number of requests you can make per month. How many included requests you have depends on the plan you have, check the pricing page for more details.

Some requests are more expensive than others. By giving some heavy requests higher weight, we ensure that you only pay for what you use and not a cent more.

This allows you to get cheaper requests for most use cases while protecting our systems from abuse by weighing the computationally expensive endpoints.

What is a Compute Unit (CU)?

A compute unit is a measure of the requests needed to query computationally expensive API endpoints. Each request has both price and rate limit cost that are measured in terms of compute units. It is also important to note that some API will have dynamic pricing that will cost more CU the more inputs you add for the request.

Price

Request price refers to the amount of compute units that will be calculated towards your API usage billing.

Dynamic Prices

Some endpoints have a dynamically priced CU cost based on the number of resources being requested. The more resources being requested, the higher the CU cost for that particular request. Taking getNativeBalancesForAddresses as an example; the base CU cost of this endpoint when fetching the balance of a single address is 1 CU. If we wanted to fetch the balances of 5 addresses at once, then the CU cost for that particular call would be 5 CU.

Rate limit Cost

On the other hand, request rate limit cost refers to the amount of compute units that an API request cost in terms of rate limits.

NamePathPriceRate Limit Cost
BaseAdditional
getBlock/block/{block_number_or_hash}1005
getContractEvents/{address}/events202
getTransaction/transaction/{transaction_hash}203
getTransactions/{address}504
getTransactionVerbose/transaction/{transaction_hash}/verbose505
getMultipleNFTs/nft/getMultipleNFTs5+5 CUs per NFTs5
getTransactionsVerbose/{address}/verbose10010
getInternalTransactions/transaction/{transaction_hash}/internal-transactions505
getNativeBalance/{address}/balance101
getNativeBalancesForAddresses/wallets/balances1+1 CU per wallet addresses1
getTokenBalances/{address}/erc201005
getWalletTokenBalancesPrice/{address}/tokens1005
getTokenTransfers/{address}/erc20/transfers502
getTokenAddressTransfers/erc20/{address}/transfers1002
getNFTs/{address}/nft505
getNFTTransfers/{address}/nft/transfers505
getNftTransfersByBlock/block/{block_number_or_hash}/nft/transfers202
getTokenMetadata/erc20/metadata101
web3ApiVersion/web3/version101
getTokenMetadataBySymbol/erc20/metadata/symbols101
getTokenPrice/erc20/{address}/price10+5 per token, if you add the query parameter include=percent_change3
getMultipleTokenPrices/erc20/prices10 per token+5 per token, if you add the query parameter include=percent_change3
getTokenAllowance/erc20/{address}/allowance101
getAllTokenIds/nft/{address}505
getContractNFTTransfers/nft/{address}/transfers505
getWalletNFTCollections/nft/{address}/collections505
getNFTOwners/nft/{address}/owners505
getNFTMetadata/nft/{address}/metadata505
syncNFTContract/nft/{address}/sync5025
reSyncMetadata/nft/{address}/{token_id}/metadata/resync5025
getTokenIdOwners/nft/{address}/{token_id}/owners505
getWalletTokenIdTransfers/nft/{address}/{token_id}/transfers202
resolveDomain/resolve/{domain}101
resolveAddressToDomain/resolve/{address}/domain101
resolveENSDomain/resolve/ens/{domain}101
resolveAddress/resolve/{address}/reverse101
getPairReserves/{pair_address}/reserves101
getLogsByAddress/{address}/logs502
getNftTransfersFromToBlock/nft/transfers505
getNFTTrades/nft/{address}/trades404
getNFTLowestPrice/nft/{address}/lowestprice404
getWalletActiveChains/wallets/{address}/chains10+10 CUs per chains5
getTopERC20TokensByMarketCap/market-data/erc20s/top-tokens2005
getTopERC20TokensByPriceMovers/market-data/erc20s/top-movers2005
getTopNFTCollectionsByMarketCap/market-data/nfts/top-collections2005
getHottestNFTCollectionsByTradingVolume/market-data/nfts/hottest-collections2005
contractsReview/contracts-review001
endpointWeights/info/endpointWeights001
getWalletStats/wallets/{address}/stats505
getNFTCollectionStats/nft/{address}/stats505
getNFTTokenStats/nft/{address}/{token_id}/stats505
getTokenStats/erc20/{address}/stats505
getBlockStats/block/{block_number_or_hash}/stats505
getWalletNetWorth/wallets/{address}/net-worth50+50 CUs per chains5

Query Parameters

In addition to having compute units charged on each API request, there are additional query parameters that cost additional compute units when added to an API request.

Query parameterCU Cost
include=internal_transactions on /{address}5
include=internal_transactions on /transaction/{transaction_hash}3
include=internal_transactions on /block/{block_number_or_hash}10
media_items=true2
include=percent_change on /erc20/prices5

How to Check Compute Units?

To check the latest compute units of our API offerings, you can use endpointWeights to do so.

const Moralis = require("moralis").default;

await Moralis.start({
apiKey: "YOUR_API_KEY",
// ...and any other configuration
});

const response = await Moralis.EvmApi.utils.endpointWeights();

console.log(response?.toJSON());

Your output for the API request will be as follows:

[
{
"endpoint": "getBlock",
"path": "/block/{block_number_or_hash}",
"price": 5,
"rateLimitCost": 5
},
{
"endpoint": "getContractEvents",
"path": "/{address}/events",
"price": 2,
"rateLimitCost": 2
},
{
"endpoint": "getTransactions",
"path": "/transaction/{transaction_hash}",
"price": 1,
"rateLimitCost": 3
}
]

where price refers to how much CU does the API request cost in terms of billing and rateLimitCost refers to how much CU does the API request cost in terms of rate limits.