Monday, June 22, 2026
No Result
View All Result
Crypeto News
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos
CRYPTO MARKETCAP
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos
CRYPTO MARKETCAP
Crypeto News
No Result
View All Result

How to Get the Full Supply of a Token  – Moralis Web3

by crypetonews
May 20, 2024
in Web3
Reading Time: 14 mins read
0 0
A A
0
Home Web3
Share on FacebookShare on Twitter


Are you looking for the easiest way to get the full supply of a token? If so, you’re in the right place. This guide will show you how to effortlessly access the full supply of a token using Moralis – the industry’s leading Web3 data provider. At Moralis, we have enriched our ERC-20 endpoints with in-depth metadata, ensuring you automatically receive the full supply of a coin when querying token balances, metadata, and more. Eager to jump straight into the code? Here’s an example showing our token metadata endpoint in action:

import fetch from ‘node-fetch’;

const options = {
method: ‘GET’,
headers: {
accept: ‘application/json’,
‘X-API-Key’: ‘YOUR_API_KEY’
},
};

fetch(‘https://deep-index.moralis.io/api/v2.2/erc20/metadata?chain=eth&addresses%5B0%5D=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48’, options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));

By calling the endpoint above, you’ll receive the metadata of the specified token, including two central parameters: total_supply and total_supply_formatted. Here’s an example of what it looks like:

[
{
address: ‘0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48’,
address_label: ‘USD Coin (USDC)’,
name: ‘USD Coin’,
symbol: ‘USDC’,
decimals: ‘6’,
logo: ‘https://logo.moralis.io/0x1_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_e6ec22e3ef954a7f9eda04f294938f4d’,
logo_hash: ‘442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213’,
thumbnail: ‘https://logo.moralis.io/0x1_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_e6ec22e3ef954a7f9eda04f294938f4d’,
total_supply: ‘25373535439531383’,
total_supply_formatted: ‘25373535439.531383’,
fully_diluted_valuation: ‘25405862477.92’,
block_number: ‘19888348’,
validated: 1,
created_at: ‘2018-08-03T19:28:24.000Z’,
possible_spam: false,
verified_contract: true,
categories: [
‘Exchange-Issued Asset Tokens’,
‘Platform-Based Utility Tokens’,
‘Stablecoins’
],
links: {
//…
}
}
]

That’s it! Getting the full supply of a token with Moralis is that simple. If you’d like to learn more about how this works, check out our official Token API documentation page or continue following along in this guide.

Also, if you want to leverage our APIs, don’t forget to sign up with Moralis. You can create an account free of charge and gain instant access to our premier suite of development tools!

Overview

In today’s article, we will begin by clarifying what the total supply of cryptocurrency means. We’ll also delve into the advantages of understanding this metric and discuss common use cases where knowing the total supply of a token is essential. After that, we’ll introduce Moralis – the industry’s premier Web3 data provider. In doing so, you’ll learn how to obtain the total supply of a token using Moralis’ Token API through a simple three-step process:

Get a Moralis API KeyWrite a Script Calling the Token Balances with Prices EndpointExecute the Code

Following this, we’ll also highlight other Moralis APIs that can be useful when developing decentralized applications (dapps)! 

So, if you’re seeking the simplest method to get the full supply of a token, this guide is for you. Let’s dive in!

What is the Total Supply of a Crypto Token? 

The total supply of a cryptocurrency refers to the number of coins or tokens that currently exist. This includes tokens actively traded or held in circulation, as well as those locked and awaiting release to the public market. Essentially, the total supply is calculated by subtracting the number of tokens that have been burned or destroyed from the sum of all coins minted!

The total supply of a cryptocurrency comprises two primary components:

Circulating Supply: This is the number of tokens or coins in circulation. It, for instance, includes tokens available for trading in the market. Locked Coins: Although they exist, these tokens are not accessible for public trading. A project’s team may retain a portion of the coins in reserve for strategic purposes, such as marketing activities and development funding, or designate them for specific initiatives like staking rewards.

This overview should give you a clear understanding of what the total supply of a cryptocurrency entails. Now, let’s explore some benefits of this particular metric!

Why Do You Want to Get the Full Supply of a Token?

The total supply metric of crypto tokens offers several benefits, particularly in investment analysis, economic planning, and market understanding. Here are three key examples:

Crypto Valuations: The total supply metric is crucial for calculating the valuation of a cryptocurrency. Market capitalization, a central indicator of a coin’s value, is derived by multiplying the total supply by the current price of the asset. This helps investors assess the relative size and worth of different cryptocurrencies. Transparency & Trust: A clear and immutable record of a token’s total supply enhances transparency, which is crucial for building trust among investors, users, regulators, and other stakeholders. Knowing the total supply ensures all parties can verify the number of tokens in circulation. Investment Insights: A coin’s total supply provides critical insights into its abundance or scarcity, which are important factors for cryptocurrency investors. Scarcity can drive demand, while abundance may affect the coin’s long-term price stability.

Token Supply Use Cases 

When it comes to Web3 development, there are many instances when you need the total supply of a cryptocurrency. Here are three prominent use cases:

Wallets: Cryptocurrency wallets can display the total supply to provide context about a user’s holdings. By showing the total number of tokens available, users can understand their share in relation to the entire supply, helping them make informed decisions about their investments. Decentralized Exchanges (DEXs): DEXs display a token’s total supply to inform trading decisions and provide market context. This metric is crucial for traders as it influences strategies, liquidity assessments, and overall market analysis. Analytic Platforms: Platforms that track cryptocurrency statistics and market behaviors, such as Moralis Money, use the total supply of tokens as a core metric in their reporting. This data helps analysts and investors evaluate a token’s scarcity, distribution, and potential value.

That gives you an overview of what the total supply of a token entails, the benefits of this metric, and scenarios in which this data can come in handy. In the following part, we’ll show you the easiest way to get the full supply of a token!

The Easiest Way to Get the Full Supply of a Token – Introducing Moralis 

The simplest method to access the full supply of a token is to utilize a Web3 data provider such as Moralis. At Moralis, we provide a comprehensive array of nodes and cross-chain APIs, facilitating the seamless integration of on-chain data into your projects. By leveraging our top-tier development tools, you can create dapps more swiftly and effectively!

So, how can you use Moralis to get the full supply of a token?

Moralis provides highly comprehensive APIs, delivering more data with fewer calls. As such, to get the full supply of a token, you only need to call one of our ERC-20 endpoints, such as those for balances, metadata, and more.

To show you how this works, let’s look at a short script for fetching the metadata of any ERC-20 token:

import fetch from ‘node-fetch’;

const options = {
method: ‘GET’,
headers: {
accept: ‘application/json’,
‘X-API-Key’: ‘YOUR_API_KEY’
},
};

fetch(‘https://deep-index.moralis.io/api/v2.2/erc20/metadata?chain=eth&addresses%5B0%5D=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48’, options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));

By calling the endpoint above, you’ll receive, among other things, two critical metrics: total_supply and total_supply_formatted. Here’s an example of the output:

[
{
address: ‘0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48’,
address_label: ‘USD Coin (USDC)’,
name: ‘USD Coin’,
symbol: ‘USDC’,
decimals: ‘6’,
logo: ‘https://logo.moralis.io/0x1_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_e6ec22e3ef954a7f9eda04f294938f4d’,
logo_hash: ‘442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213’,
thumbnail: ‘https://logo.moralis.io/0x1_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_e6ec22e3ef954a7f9eda04f294938f4d’,
total_supply: ‘25373535439531383’,
total_supply_formatted: ‘25373535439.531383’,
fully_diluted_valuation: ‘25405862477.92’,
block_number: ‘19888348’,
validated: 1,
created_at: ‘2018-08-03T19:28:24.000Z’,
possible_spam: false,
verified_contract: true,
categories: [
‘Exchange-Issued Asset Tokens’,
‘Platform-Based Utility Tokens’,
‘Stablecoins’
],
links: {
//…
}
}
]

That’s it! Getting the full supply of a token is straightforward when using Moralis!

However, if you want a detailed breakdown of how to call our various endpoints, join us in the next section as we walk you through a comprehensive tutorial on how to get the full supply of a token!

3-Step Tutorial: How to Get the Full Supply of a Token

Thanks to the comprehensive nature of our API responses, you’ll automatically get the full supply of a token when calling any Moralis ERC-20 endpoint. To demonstrate how this works, we’ll show you how to fetch the token balances with prices of any address using our Token API in three simple steps:

Get a Moralis API KeyWrite a Script Calling the Token Balances with Prices EndpointRun the Code

However, before you can get started with the tutorial, you need to deal with a few prerequisites!

Prerequisites 

For this tutorial, we’ll be using Node.js and JavaScript. As such, if you haven’t already, make sure you set up the following before moving on to the first step:

Ensure these are installed and ready to use!

Step 1: Get a Moralis API Key 

To call Moralis’ APIs, you need a Moralis API key. Consequently, the first thing you need to do is sign up. You can register for a free account by clicking the “Start for Free” button at the top right: 

With an account at hand, simply log in and copy your Moralis API key:

Make sure you save the key, as you’ll need it in the next section!

Step 2: Write a Script Calling the Token Balances with Prices Endpoint 

Open your IDE, create a folder, and set up a new project using the following terminal command:

npm init

Install the required dependencies by running this command in your terminal:

npm install node-fetch –save
npm install moralis @moralisweb3/common-evm-utils

Add “type”: “module” to your “package.json” file:

Create a new index.js file and add the following code:

import fetch from ‘node-fetch’;

const options = {
method: ‘GET’,
headers: {
accept: ‘application/json’,
‘X-API-Key’: ‘YOUR_API_KEY’
},
};

fetch(‘https://deep-index.moralis.io/api/v2.2/wallets/0x4B16c5dE96EB2117bBE5fd171E4d203624B014aa/tokens?chain=eth’, options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));

Next, you need to configure the code slightly. First, replace YOUR_API_KEY with the key you copied in the previous step: 

Then, configure the address parameter to fit your query: 

That’s it for the code. All that remains is to run the script!

Step 3: Run the Code 

Open a new terminal, navigate to the root folder of your project using the cd command, and run this input to execute the script:

node index.js

In return, you’ll receive a response containing not only the balances of the specified wallet but also each token’s full supply, price, price change over time, and much more. Here’s an example of what it might look like:

{
[
{
token_address: ‘0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48’,
symbol: ‘USDC’,
name: ‘USD Coin’,
logo: ‘https://logo.moralis.io/0x1_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_e6ec22e3ef954a7f9eda04f294938f4d’,
thumbnail: ‘https://logo.moralis.io/0x1_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_e6ec22e3ef954a7f9eda04f294938f4d’,
decimals: 6,
balance: ‘1000000000000000’,
possible_spam: false,
verified_contract: true,
total_supply: ‘25373535439531383’,
total_supply_formatted: ‘25373535439.531383’,
percentage_relative_to_total_supply: 3.941114167488158,
balance_formatted: ‘1000000000.0’,
usd_price: 1.0007165741842363,
usd_price_24hr_percent_change: 0.04563286892779958,
usd_price_24hr_usd_change: 0.0004564473925958712,
usd_value: 1000716574.1842363,
usd_value_24hr_usd_change: 456447.3925958872,
native_token: false,
portfolio_percentage: 100
},
//…
]
}

Included in the response, you’ll find both the total_supply and total_supply_formatted parameters for each token: 

//…
total_supply: ‘25373535439531383’,
total_supply_formatted: ‘25373535439.531383’,
//…

That’s it. Leveraging Moralis makes it easy to get the full supply of a token! 

Beyond Token Supply – Diving Deeper Into Moralis’ Web3 APIs 

Moralis is the industry’s leading Web3 data provider. Our premier suite of development tools includes nodes for all major chains and specialized APIs tailored for various use cases. This includes the Token API, Wallet API, NFT API, Streams API, and many more. As such, when using Moralis, you can build everything from cryptocurrency wallets to NFT marketplaces without breaking a sweat!

But what makes our APIs stand out compared to the competition?

One Call – All the Data: At Moralis, we provide highly comprehensive APIs, giving you more data with fewer calls. Get all the information you need from both on- and off-chain sources in a single response. Cross-Chain: Streamline your developer experience with truly cross-chain compatible APIs, offering full feature parity across the biggest chains, including Ethereum, Polygon, BNB Smart Chain (BSC), and many more. With Moralis, you no longer need a new data provider for each chain. Enterprise-Grade Security: Experience the gold standard for data security with Moralis. We are proud to be the industry’s only SOC 2 Type 2 certified Web3 infrastructure provider, ensuring top-tier security for your projects.

This gives you a brief overview of Moralis. Let’s now dive a bit deeper into our Web3 API suite!

Moralis’ Web3 APIs 

Our suite of APIs includes over ten use case-specific interfaces, and covering all of them in this guide would be impractical. Instead, we’ll introduce you to three examples:

Wallet API: The Wallet API is Web3’s premier interface for wallet data. With this tool, you can seamlessly fetch a wallet’s history, token balances, net worth, profitability, and more. This makes it the perfect tool for building wallets, portfolio trackers, and other platforms that require wallet data.

NFT API: The NFT API provides everything you need in terms of NFT data. With this API, you can effortlessly get NFT balances, metadata, prices, and more using just a few lines of code. Consequently, this is the ultimate tool for building NFT marketplaces, Web3 games, and other NFT-related applications.

Streams API: Moralis’ Streams API is the ideal tool for setting up Web3 data pipelines. With this industry-leading API, you can stream on-chain data into your project’s backend with just a few clicks. It’s perfect for setting up Web3 alerts, populating databases with real-time data, and much more.

For a comprehensive look at all our remaining interfaces, please visit our official Web3 API page!

Summary: How to Get the Full Supply of a Token

The easiest and most straightforward way to get the full supply of a token is by leveraging a Web3 data provider like Moralis. At Moralis, we have enriched our ERC-20 endpoints with detailed metadata. As such, to get the full supply of a token, you simply need to call one of our endpoints for balances, metadata, etc. Here’s an example using our token metadata endpoint:

import fetch from ‘node-fetch’;

const options = {
method: ‘GET’,
headers: {
accept: ‘application/json’,
‘X-API-Key’: ‘YOUR_API_KEY’
},
};

fetch(‘https://deep-index.moralis.io/api/v2.2/erc20/metadata?chain=eth&addresses%5B0%5D=0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48’, options)
.then(response => response.json())
.then(response => console.log(response))
.catch(err => console.error(err));

When you run the script above, you’ll receive the metadata of any token, including the total_supply and total_supply_formatted parameters. Here’s what the response should look like:

[
{
address: ‘0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48’,
address_label: ‘USD Coin (USDC)’,
name: ‘USD Coin’,
symbol: ‘USDC’,
decimals: ‘6’,
logo: ‘https://logo.moralis.io/0x1_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_e6ec22e3ef954a7f9eda04f294938f4d’,
logo_hash: ‘442b80bd16af0c0d9b22e03a16753823fe826e5bfd457292b55fa0ba8c1ba213’,
thumbnail: ‘https://logo.moralis.io/0x1_0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48_e6ec22e3ef954a7f9eda04f294938f4d’,
total_supply: ‘25373535439531383’,
total_supply_formatted: ‘25373535439.531383’,
fully_diluted_valuation: ‘25405862477.92’,
block_number: ‘19888348’,
validated: 1,
created_at: ‘2018-08-03T19:28:24.000Z’,
possible_spam: false,
verified_contract: true,
categories: [
‘Exchange-Issued Asset Tokens’,
‘Platform-Based Utility Tokens’,
‘Stablecoins’
],
links: {
//…
}
}
]

That’s it! Fetching the full supply of a token doesn’t have to be more challenging than this when working with Moralis!

If you want to get the full supply of a token using our APIs, sign up with Moralis. You can create your account for free, no credit card required, and gain instant access to our premier suite of APIs!



Source link

Tags: FullMoralisSupplyTokenWeb3
Previous Post

Coinbase Highlights Key US Regulatory Developments Driving Crypto Prices

Next Post

Ether (ETH), Bitcoin (BTC) Open Asia Trading Week Flat as ETH ETF Decision, Nvidia Earnings Loom

Related Posts

Ronin API – Build on Ronin with Moralis
Web3

Ronin API – Build on Ronin with Moralis

May 28, 2025
How to Build NFT Apps on Solana
Web3

How to Build NFT Apps on Solana

May 23, 2025
Solana NFT API – Exploring the Top 2025 NFT API for Solana
Web3

Solana NFT API – Exploring the Top 2025 NFT API for Solana

May 21, 2025
Get Solana Whales – How to Fetch Top Whales of a Solana Token
Web3

Get Solana Whales – How to Fetch Top Whales of a Solana Token

May 19, 2025
Neobank App Development – How to Build a Web3 Neobank
Web3

Neobank App Development – How to Build a Web3 Neobank

May 16, 2025
How to Get Top Solana Token Holders
Web3

How to Get Top Solana Token Holders

May 14, 2025
Next Post
Ether (ETH), Bitcoin (BTC) Open Asia Trading Week Flat as ETH ETF Decision, Nvidia Earnings Loom

Ether (ETH), Bitcoin (BTC) Open Asia Trading Week Flat as ETH ETF Decision, Nvidia Earnings Loom

Ex-Employee Turned Hacker Exposes Alleged Shady Practices

Ex-Employee Turned Hacker Exposes Alleged Shady Practices

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

RECOMMENDED

No Content Available

  • USD
  • EUR
  • GBP
  • AUD
  • JPY
  • bitcoinBitcoin(BTC)
    $64,052.00-0.22%
  • ethereumEthereum(ETH)
    $1,734.710.05%
  • tetherTether(USDT)
    $1.000.01%
  • binancecoinBNB(BNB)
    $591.730.37%
  • usd-coinUSDC(USDC)
    $1.00-0.01%
  • rippleXRP(XRP)
    $1.13-0.97%
  • solanaSolana(SOL)
    $73.821.03%
  • tronTRON(TRX)
    $0.3283270.78%
  • Figure HelocFigure Heloc(FIGR_HELOC)
    $1.030.00%
  • HyperliquidHyperliquid(HYPE)
    $66.27-4.15%
  • Trending
  • Comments
  • Latest
4 Expert Tips to Turn Blank Pages Into Business Blueprints

4 Expert Tips to Turn Blank Pages Into Business Blueprints

October 21, 2024
Top Crypto Portfolio Rebalancing Tools (Automated & Manual)

Top Crypto Portfolio Rebalancing Tools (Automated & Manual)

April 13, 2025
What are Meta Transactions? Exploring ERC-2771

What are Meta Transactions? Exploring ERC-2771

October 25, 2023
How to Set Up NFT Sales Notifications

How to Set Up NFT Sales Notifications

October 19, 2023
Uniswap v4 Teases Major Updates for 2025

Uniswap v4 Teases Major Updates for 2025

January 2, 2025
How to Bridge Avalanche (AVAX) to Fantom (FTM)?

How to Bridge Avalanche (AVAX) to Fantom (FTM)?

November 11, 2022
AI Expert: Truth Protocols Could Become the SSL of the Information Age

AI Expert: Truth Protocols Could Become the SSL of the Information Age

August 24, 2025
Analyst Says Dogecoin Price Is Entering Expansion Phase, Here’s What It Means

Analyst Says Dogecoin Price Is Entering Expansion Phase, Here’s What It Means

August 24, 2025
Robert Kiyosaki Exposes Brutal Truth Behind Sudden Wealth and Collapse

Robert Kiyosaki Exposes Brutal Truth Behind Sudden Wealth and Collapse

August 24, 2025
Ethereum’s Tech Edge Could Outshine Bitcoin — Here’s How

Ethereum’s Tech Edge Could Outshine Bitcoin — Here’s How

August 23, 2025
IRS Loses Top Crypto Enforcer After Only 90 Days on the Job

IRS Loses Top Crypto Enforcer After Only 90 Days on the Job

August 23, 2025
US Court Grants Stay In Coinbase Biometric Data Lawsuit — Details

US Court Grants Stay In Coinbase Biometric Data Lawsuit — Details

August 23, 2025
Crypeto News

Find the latest Bitcoin, Ethereum, blockchain, crypto, Business, Fintech News, interviews, and price analysis at Crypeto News.

CATEGORIES

  • Altcoin
  • Analysis
  • Bitcoin
  • Blockchain
  • Crypto Exchanges
  • Crypto Updates
  • DeFi
  • Ethereum
  • Metaverse
  • Mining
  • NFT
  • Regulations
  • Scam Alert
  • Uncategorized
  • Videos
  • Web3

LATEST UPDATES

  • AI Expert: Truth Protocols Could Become the SSL of the Information Age
  • Analyst Says Dogecoin Price Is Entering Expansion Phase, Here’s What It Means
  • Robert Kiyosaki Exposes Brutal Truth Behind Sudden Wealth and Collapse
  • Disclaimer
  • Privacy Policy
  • DMCA
  • Cookie Privacy Policy
  • Terms and Conditions
  • Contact us
  • About Us

Copyright © 2022 Crypeto News.
Crypeto News is not responsible for the content of external sites.

No Result
View All Result
  • Home
  • Bitcoin
  • Crypto Updates
    • General
    • Blockchain
    • Ethereum
    • Altcoin
    • Mining
    • Crypto Exchanges
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Analysis
  • Regulations
  • Scam Alert
  • Videos

Copyright © 2022 Crypeto News.
Crypeto News is not responsible for the content of external sites.

Welcome Back!

Login to your account below

Forgotten Password?

Retrieve your password

Please enter your username or email address to reset your password.

Log In