The dynamic Web3 development space is home to numerous Web3 API providers, which bring their unique strengths and weaknesses to the table. With this abundance of API options, you might find it challenging to determine which APIs best suit your development needs. And while it might seem like most providers offer similar products, comparing different Web3 APIs can often be like comparing apples to oranges.
So, out of all Web3 API providers, which is the best option? To find out, follow along in this guide as we conduct a comparative analysis of the Web3 industry’s leading API providers: Moralis, Alchemy, and QuickNode. As we move forward, we’ll carefully analyze these three providers from an accessibility, performance, and cost perspective.
Throughout this guide, you’ll quickly discover that Moralis provides the industry’s most comprehensive Web3 APIs. Consequently, Moralis facilitates the industry’s most accessible and straightforward developer experience. So, if you immediately want to start using Moralis’ top-tier Web3 APIs, click the button below!
To learn more about why Moralis outperforms the competition, join us below as we dive straight into our comparison of Web3 API providers!
Comparing Web3 APIs: Moralis vs. Alchemy vs. QuickNode
To highlight the similarities and, more importantly, differences between Moralis, Alchemy, and QuickNode, we used each provider’s respective Web3 APIs to query the necessary data for building a portfolio view of Vitalik Buterin’s ERC-20 tokens. In this case, a portfolio view includes the name, logo, balance, and price of all assets in the wallet.
We opted for Vitalik’s wallet due to its size and the extensive amount of tokens it holds. This makes it the perfect candidate for testing the availability of spam classifications and metadata for large token sets. This approach also allowed us to systematically assess and compare the accessibility, efficiency, and cost-effectiveness of Moralis, Alchemy, and QuickNode when fetching the same on-chain resources.
You’ll find the results of our tests summarized in the two charts below:
![Chart showing the number of calls required to build a portfolio view of Vitalik Buterin's ERC20 tokens using Moralis, Alchemy, and QuickNode's Web3 APIs.](https://moralis.io/wp-content/uploads/2024/02/Blog-Comparing-Web3-APIs-Calls-1024x575.png)
![Price chart - comparing Moralis, Alchemy, and QuickNode and how much it cost to render a portfolio view of Vitalik's ERC20 tokens](https://moralis.io/wp-content/uploads/2024/02/Blog-Comparing-Web3-APIs-Cost-1024x574.png)
By analyzing the charts above, you’ll notice that building a portfolio view of Vitalik’s ERC-20 tokens with Moralis demands significantly fewer API calls and is more cost-efficient than utilizing both Alchemy and QuickNode.
With only 18 calls at a total cost of $0.000882, we were able to fetch the balance, metadata, and price of Vitalik’s ERC-20 tokens. In comparison, the same task required 4963 calls at a total price of $0.0049189 with Alchemy. And 4760 calls at a total cost of $0.0163091 with QuickNode.
Here’s the data broken down into a table:
Moralis | Alchemy | QuickNode | |
Total Tokens: | 1,743 | 2,469 | 2,368 |
Get All Balances | 18 | 25 | 24 |
Get Metadata | 0* | 2,469 | 2,368 |
Get Price Data | 0* | 2,469 | 2,368 |
Total Calls: | 18 | 4,963 | 4,760 |
CU Cost | 180 | 40,154 | 167,440 |
USD Cost | $0.0008820 | $0.0049189 | $0.0164091 |
Why Does Moralis Outperform the Competition?
All Web3 APIs from Moralis are outcome-oriented and designed to minimize the number of calls you need to query blockchain data. We enrich all our API responses with transaction decodings, metadata, address labels, market data, and much more from multiple sources.
To exemplify, when using Moralis’ Token API and the token balance endpoint, you get the ERC-20 balances of a wallet – along with metadata and prices for each token – in a single response. This means you only have to call one endpoint and use one provider, simplifying your development endeavors significantly.
![Moralis - the best Web3 API provider in Web3](https://moralis.io/wp-content/uploads/2024/02/Blog-Comparing-Web3-APIs-Moralis-Logo.png)
In comparison, when using providers like Alchemy and QuickNode, you must first fetch the token balances from the wallet. From there, you need to make individual calls to query the metadata for each token separately. Moreover, Alchemy and QuickNode’s API responses don’t include token prices, meaning you must also involve a third-party provider like CoinGecko or CoinMarketCap to get this data.
This is why we only needed 18 calls to build a portfolio view of Vitalik’s ERC-20s when working with Moralis. Meanwhile, the same task demanded thousands of calls and multiple providers when using Alchemy or QuickNode.
To break this down and clarify it further, let’s examine in detail the endpoints and responses from each provider we utilized to render the portfolio view of Vitalik’s ERC-20 tokens.
Moralis – Endpoint Overview
With Moralis’ comprehensive APIs, we only need the Token Balance endpoint to fetch the token balances – along with metadata and prices – of any address:
GET https://deep-index.moralis.io/api/v2.2/wallets/0xd8da6bf26964af9d7eed9e03e53415d37aa96045/tokens?chain=eth
Here’s an example of what the response would look like:
{ "cursor": null, "page": 0, "page_size": 100, "result": [ { "token_address": "0xdac17f958d2ee523a2206206994597c13d831ec7", "symbol": "USDT", "name": "Tether USD", "logo": "https://cdn.moralis.io/eth/0xdac17f958d2ee523a2206206994597c13d831ec7.png", "thumbnail": "https://cdn.moralis.io/eth/0xdac17f958d2ee523a2206206994597c13d831ec7_thumb.png", "decimals": 6, "balance": "517438540", "possible_spam": false, "verified_contract": true, "balance_formatted": "517.43854", "usd_price": 1.0006571224951815, "usd_price_24hr_percent_change": 0.08795941027880547, "usd_price_24hr_usd_change": 0.45543496836985303, "usd_value": 517.7785605045078, "native_token": false, "portfolio_percentage": 0 }, //... ] }
This response is enriched with an abundance of useful data, including the symbol, name, logo, price, balance, price changes over time, and more of each token. As such, when working with Moralis, you only need a single endpoint to fetch all the required data for building a full ERC-20 portfolio view!
Alchemy – Endpoints Overview
When using Alchemy, we initially need to call their getTokenBalances()
endpoint, which is used to fetch a wallet’s token balances:
alchemy.core.getTokenBalances(“0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045”)
In return, you’ll get a simple response containing an array of token balances, featuring only the contract address and token balance in hexadecimal:
"jsonrpc": "2.0", "id": 1, "result": { "address": "0x95222290dd7278aa3ddd389cc1e1d165cc4bafe5", "tokenBalances": [ { "contractAddress": "0x0183736842388dcc6d41674082937684056a3904", "tokenBalance": "0x00000000000000000000000000000000000000001581113dffdc72c05ad16068" }, //... ] } }
What’s more, apart from providing a quite limited response, Alchemy additionally includes some tokens with a balance equal to zero:
{ "contractAddress": "0x007f252591528d326b2a73b366e5c6a0aa5128cc", "tokenBalance": "0x0000000000000000000000000000000000000000000000000000000000000000" }
Including tokens with a zero balance is quite unnecessary, and it further slows down the time it takes to fetch all of the tokens using Alchemy’s API.
Once we have the balance, we now also need to call Alchemy’s getTokenMetadata()
endpoint separately for each individual token. This will result in thousands and thousands of additional calls. Here’s an example of what the endpoint looks like:
const contract = "0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48"; alchemy.core.getTokenMetadata(contract).then(console.log);
In return, you’ll get a response containing a single token’s decimals, logo, name, and symbol:
{ "jsonrpc": "2.0", "id": 1, "result": { "decimals": 6, "logo": "https://static.alchemyapi.io/images/assets/3408.png", "name": "USDC", "symbol": "USDC" } }
Lastly, you need to leverage a third-party provider, such as CoinGecko or CoinMarketCap, to get the price of each token. This is another bothersome step, resulting in more calls and a more complex workflow for you and your development team!
QuickNode – Endpoints Overview
When using QuickNode, we also have to start by calling their getWalletTokenBalance
endpoint to fetch the ERC-20 token balances of the wallet:
curl https://docs-demo.quiknode.pro/ \ -X POST \ -H "Content-Type: application/json" \ --data '{ "id":67, "jsonrpc":"2.0", "method":"qn_getWalletTokenBalance", "params": [{ "wallet": "0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045" }] }'
This returns an array of tokens that looks like this:
{ "jsonrpc": "2.0", "id": 67, "result": { "result": [ { "name": "Namefi Service Credit", "symbol": "NFSC", "decimals": "18", "address": "0x0000000000c39a0f674c12a5e63eb8031b550b6f", "quantityIn": "100000000000000000000", "quantityOut": "20000000000000000000", "totalBalance": "80000000000000000000" }, //... ] } }
QuickNode’s response contains more information than Alchemy’s, but it’s insufficient for building a comprehensive portfolio view. As such, we then need to call their getTokenMetadataByContractAddress
endpoint for each individual token to get additional information, which results in thousands of extra calls:
curl https://docs-demo.quiknode.pro/ \ -X POST \ -H "Content-Type: application/json" \ --data '{ "id":67, "jsonrpc":"2.0", "method":"qn_getTokenMetadataByContractAddress", "params": [{ "contract": "0x4d224452801ACEd8B2F0aebE155379bb5D594381" }] }'
This is what the response looks like:
{ "jsonrpc": "2.0", "id": 67, "result": { "name": "Tether USD", "symbol": "USDT", "contractAddress": "0xdac17f958d2ee523a2206206994597c13d831ec7", "decimals": "6", "genesisBlock": null, "genesisTransaction": null } }
What’s more, you will notice that QuickNode’s metadata response doesn’t even include the token logo. This is another important component for building an ERC-20 token portfolio view.
Finally, much like when using Alchemy, you also need to leverage a third-party provider like CoinGecko or CoinMarketCap to get token prices when working with QuickNode. As such, this is another integration that complicates things for you and your development team.
Summary: Full Comparison – Moralis vs. Alchemy vs. QuickNode
With Moralis’ outcome-oriented and use-case-specific Web3 APIs, we’re able to provide a significantly more accessible and straightforward developer experience compared to Alchemy and QuickNode!
Thanks to Moralis’ fully enriched API responses, you only need a single endpoint and 18 API calls to get the token balances, metadata, prices, and much more from Vitalik’s wallet. This significantly improves the performance and cost-effectiveness of Moralis’ Web3 APIs. You require fewer calls to query the data you need.
![Moralis Logo](https://moralis.io/wp-content/uploads/2024/02/Blog-Comparing-APIs-Moralis-Logo-1024x904.png)
In comparison, with Alchemy and QuickNode, the same task requires thousands of calls and third-party involvement. Providers like CoinGecko or CoinMarketCap are necessary, turning this simple task into a bothersome and time-consuming endeavor.
While this comparison uses Moralis’ Token API as an example, it’s worth noting that all our APIs, including the NFT API, Wallet API, etc., are equally as comprehensive and easy to use. As such, it doesn’t matter if you’re building a portfolio view of ERC-20 tokens, an NFT-based platform, a crypto price tracker, or any other Web3 project; Moralis continuously outshines the competition.
So, if you want to start building Web3 projects faster and more efficiently, make sure to sign up with Moralis!