Thursday, October 16, 2025
No Result
View All Result
Ajoobz
Advertisement
  • Home
  • Bitcoin
  • Crypto Updates
    • Crypto Updates
    • Altcoin
    • Ethereum
    • Crypto Exchanges
  • Blockchain
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Scam Alert
  • Regulations
  • Analysis
Marketcap
  • Home
  • Bitcoin
  • Crypto Updates
    • Crypto Updates
    • Altcoin
    • Ethereum
    • Crypto Exchanges
  • Blockchain
  • NFT
  • DeFi
  • Web3
  • Metaverse
  • Scam Alert
  • Regulations
  • Analysis
No Result
View All Result
Ajoobz
No Result
View All Result

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

1 year ago
in Web3
Reading Time: 14 mins read
0 0
A A
0
Home Web3
Share on FacebookShare on TwitterShare on E-Mail


Are you in search of the simplest approach to get the total provide of a token? In that case, you’re in the correct place. This information will present you tips on how to effortlessly entry the total provide of a token utilizing Moralis – the {industry}’s main Web3 information supplier. At Moralis, we now have enriched our ERC-20 endpoints with in-depth metadata, making certain you robotically obtain the total provide of a coin when querying token balances, metadata, and extra. Keen to leap straight into the code? Right here’s an instance displaying our token metadata endpoint in motion:

import fetch from ‘node-fetch’;

const choices = {
methodology: ‘GET’,
headers: {
settle for: ‘software/json’,
‘X-API-Key’: ‘YOUR_API_KEY’
},
};

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

By calling the endpoint above, you’ll obtain the metadata of the desired token, together with two central parameters: total_supply and total_supply_formatted. Right here’s an instance of what it seems 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’
],
hyperlinks: {
//…
}
}
]

That’s it! Getting the total provide of a token with Moralis is that straightforward. Should you’d prefer to be taught extra about how this works, take a look at our official Token API documentation web page or proceed following alongside on this information.

Additionally, if you wish to leverage our APIs, don’t neglect to enroll with Moralis. You may create an account freed from cost and achieve prompt entry to our premier suite of growth instruments!

Overview

In at the moment’s article, we’ll start by clarifying what the entire provide of cryptocurrency means. We’ll additionally delve into the benefits of understanding this metric and focus on widespread use instances the place realizing the entire provide of a token is crucial. After that, we’ll introduce Moralis – the {industry}’s premier Web3 information supplier. In doing so, you’ll discover ways to receive the entire provide of a token utilizing Moralis’ Token API by a easy three-step course of:


Get a Moralis API Key



Write a Script Calling the Token Balances with Costs Endpoint



Execute the Code

Following this, we’ll additionally spotlight different Moralis APIs that may be helpful when creating decentralized purposes (dapps)! 

So, when you’re searching for the only methodology to get the total provide of a token, this information is for you. Let’s dive in!

What’s the Whole Provide of a Crypto Token? 

The full provide of a cryptocurrency refers back to the variety of cash or tokens that at present exist. This contains tokens actively traded or held in circulation, in addition to these locked and awaiting launch to the general public market. Primarily, the entire provide is calculated by subtracting the variety of tokens which were burned or destroyed from the sum of all cash minted!

The full provide of a cryptocurrency includes two major parts:


Circulating Provide: That is the variety of tokens or cash in circulation. It, as an example, contains tokens obtainable for buying and selling out there.


Locked Cash: Though they exist, these tokens aren’t accessible for public buying and selling. A mission’s workforce might retain a portion of the cash in reserve for strategic functions, reminiscent of advertising actions and growth funding, or designate them for particular initiatives like staking rewards.

This overview ought to offer you a transparent understanding of what the entire provide of a cryptocurrency entails. Now, let’s discover some advantages of this specific metric!

Why Do You Wish to Get the Full Provide of a Token?

The full provide metric of crypto tokens affords a number of advantages, significantly in funding evaluation, financial planning, and market understanding. Listed here are three key examples:


Crypto Valuations: The full provide metric is essential for calculating the valuation of a cryptocurrency. Market capitalization, a central indicator of a coin’s worth, is derived by multiplying the entire provide by the present value of the asset. This helps traders assess the relative measurement and value of various cryptocurrencies.


Transparency & Belief: A transparent and immutable file of a token’s whole provide enhances transparency, which is essential for constructing belief amongst traders, customers, regulators, and different stakeholders. Realizing the entire provide ensures all events can confirm the variety of tokens in circulation.


Funding Insights: A coin’s whole provide gives important insights into its abundance or shortage, that are necessary elements for cryptocurrency traders. Shortage can drive demand, whereas abundance might have an effect on the coin’s long-term value stability.

Token Provide Use Instances 

On the subject of Web3 growth, there are lots of cases while you want the entire provide of a cryptocurrency. Listed here are three distinguished use instances:


Wallets: Cryptocurrency wallets can show the entire provide to supply context a couple of consumer’s holdings. By displaying the entire variety of tokens obtainable, customers can perceive their share in relation to all the provide, serving to them make knowledgeable choices about their investments.


Decentralized Exchanges (DEXs): DEXs show a token’s whole provide to tell buying and selling choices and supply market context. This metric is essential for merchants because it influences methods, liquidity assessments, and total market evaluation.


Analytic Platforms: Platforms that observe cryptocurrency statistics and market behaviors, reminiscent of Moralis Cash, use the entire provide of tokens as a core metric of their reporting. This information helps analysts and traders consider a token’s shortage, distribution, and potential worth.

That provides you an summary of what the entire provide of a token entails, the advantages of this metric, and situations during which this information can come in useful. Within the following half, we’ll present you the simplest approach to get the total provide of a token!

The Best Technique to Get the Full Provide of a Token – Introducing Moralis 

The only methodology to entry the total provide of a token is to make the most of a Web3 information supplier reminiscent of Moralis. At Moralis, we offer a complete array of nodes and cross-chain APIs, facilitating the seamless integration of on-chain information into your tasks. By leveraging our top-tier growth instruments, you possibly can create dapps extra swiftly and successfully!

So, how are you going to use Moralis to get the total provide of a token?

Moralis gives extremely complete APIs, delivering extra information with fewer calls. As such, to get the total provide of a token, you solely must name one in every of our ERC-20 endpoints, reminiscent of these for balances, metadata, and extra.

To point out you ways this works, let’s have a look at a brief script for fetching the metadata of any ERC-20 token:

import fetch from ‘node-fetch’;

const choices = {
methodology: ‘GET’,
headers: {
settle for: ‘software/json’,
‘X-API-Key’: ‘YOUR_API_KEY’
},
};

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

By calling the endpoint above, you’ll obtain, amongst different issues, two important metrics: total_supply and total_supply_formatted. Right here’s an instance 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’
],
hyperlinks: {
//…
}
}
]

That’s it! Getting the total provide of a token is simple when utilizing Moralis!

Nevertheless, if you need an in depth breakdown of tips on how to name our numerous endpoints, be part of us within the subsequent part as we stroll you thru a complete tutorial on tips on how to get the total provide of a token!

3-Step Tutorial: The right way to Get the Full Provide of a Token

Because of the great nature of our API responses, you’ll robotically get the total provide of a token when calling any Moralis ERC-20 endpoint. To display how this works, we’ll present you tips on how to fetch the token balances with costs of any handle utilizing our Token API in three easy steps:


Get a Moralis API Key



Write a Script Calling the Token Balances with Costs Endpoint



Run the Code

Nevertheless, earlier than you will get began with the tutorial, it is advisable take care of a couple of conditions!

Stipulations 

For this tutorial, we’ll be utilizing Node.js and JavaScript. As such, when you haven’t already, ensure you arrange the next earlier than shifting on to step one:

Guarantee these are put in and able to use!

Step 1: Get a Moralis API Key 

To name Moralis’ APIs, you want a Moralis API key. Consequently, the very first thing it is advisable do is enroll. You may register for a free account by clicking the “Begin for Free” button on the prime proper: 

With an account at hand, merely log in and replica your Moralis API key:

Be sure to save the important thing, as you’ll want it within the subsequent part!

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

Open your IDE, create a folder, and arrange a brand new mission utilizing the next terminal command:

npm init

Set up the required dependencies by operating this command in your terminal:

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

Add “sort”: “module” to your “bundle.json” file:

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

import fetch from ‘node-fetch’;

const choices = {
methodology: ‘GET’,
headers: {
settle for: ‘software/json’,
‘X-API-Key’: ‘YOUR_API_KEY’
},
};

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

Subsequent, it is advisable configure the code barely. First, substitute YOUR_API_KEY with the important thing you copied within the earlier step: 

Then, configure the handle parameter to suit your question: 

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

Step 3: Run the Code 

Open a brand new terminal, navigate to the foundation folder of your mission utilizing the cd command, and run this enter to execute the script:

node index.js

In return, you’ll obtain a response containing not solely the balances of the desired pockets but additionally every token’s full provide, value, value change over time, and rather more. Right here’s an instance of what it would seem 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 within the response, you’ll discover each the total_supply and total_supply_formatted parameters for every token: 

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

That’s it. Leveraging Moralis makes it simple to get the total provide of a token! 

Past Token Provide – Diving Deeper Into Moralis’ Web3 APIs 

Moralis is the {industry}’s main Web3 information supplier. Our premier suite of growth instruments contains nodes for all main chains and specialised APIs tailor-made for numerous use instances. This contains the Token API, Pockets API, NFT API, Streams API, and lots of extra. As such, when utilizing Moralis, you possibly can construct the whole lot from cryptocurrency wallets to NFT marketplaces with out breaking a sweat!

However what makes our APIs stand out in comparison with the competitors?


One Name – All of the Knowledge: At Moralis, we offer extremely complete APIs, providing you with extra information with fewer calls. Get all the knowledge you want from each on- and off-chain sources in a single response.


Cross-Chain: Streamline your developer expertise with actually cross-chain appropriate APIs, providing full function parity throughout the largest chains, together with Ethereum, Polygon, BNB Good Chain (BSC), and lots of extra. With Moralis, you not want a brand new information supplier for every chain.


Enterprise-Grade Safety: Expertise the gold customary for information safety with Moralis. We’re proud to be the {industry}’s solely SOC 2 Sort 2 licensed Web3 infrastructure supplier, making certain top-tier safety in your tasks.

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

Moralis’ Web3 APIs 

Our suite of APIs contains over ten use case-specific interfaces, and overlaying all of them on this information could be impractical. As a substitute, we’ll introduce you to 3 examples:


Pockets API: The Pockets API is Web3’s premier interface for pockets information. With this device, you possibly can seamlessly fetch a pockets’s historical past, token balances, internet price, profitability, and extra. This makes it the right device for constructing wallets, portfolio trackers, and different platforms that require pockets information.


NFT API: The NFT API gives the whole lot you want by way of NFT information. With this API, you possibly can effortlessly get NFT balances, metadata, costs, and extra utilizing only a few strains of code. Consequently, that is the last word device for constructing NFT marketplaces, Web3 video games, and different NFT-related purposes.


Streams API: Moralis’ Streams API is the perfect device for establishing Web3 information pipelines. With this industry-leading API, you possibly can stream on-chain information into your mission’s backend with only a few clicks. It’s good for establishing Web3 alerts, populating databases with real-time information, and rather more.

For a complete have a look at all our remaining interfaces, please go to our official Web3 API web page!

Abstract: The right way to Get the Full Provide of a Token

The simplest and most simple approach to get the total provide of a token is by leveraging a Web3 information supplier like Moralis. At Moralis, we now have enriched our ERC-20 endpoints with detailed metadata. As such, to get the total provide of a token, you merely must name one in every of our endpoints for balances, metadata, and many others. Right here’s an instance utilizing our token metadata endpoint:

import fetch from ‘node-fetch’;

const choices = {
methodology: ‘GET’,
headers: {
settle for: ‘software/json’,
‘X-API-Key’: ‘YOUR_API_KEY’
},
};

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

If you run the script above, you’ll obtain the metadata of any token, together with the total_supply and total_supply_formatted parameters. Right here’s what the response ought to seem 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’
],
hyperlinks: {
//…
}
}
]

That’s it! Fetching the total provide of a token doesn’t should be tougher than this when working with Moralis!

If you wish to get the total provide of a token utilizing our APIs, enroll with Moralis. You may create your account free of charge, no bank card required, and achieve prompt entry to our premier suite of APIs!



Source link

Tags: FullMoralisSupplyTokenweb3
Previous Post

Your Company May Have a Costly Trust Problem. Here’s How to Fix It — And Boost Your Profits.

Next Post

Ripple’s Stablecoin Set For ‘Great Impact’: Top Economist

Related Posts

Dota 2 YouTube Account Briefly Hacked to Promote Solana Meme Coin
Web3

Dota 2 YouTube Account Briefly Hacked to Promote Solana Meme Coin

11 hours ago
BlackRock Developing Tokenization Tech Amid Bitcoin, Ethereum ETF Success
Web3

BlackRock Developing Tokenization Tech Amid Bitcoin, Ethereum ETF Success

2 days ago
MARA Holdings Buys  Million in Bitcoin Post-Crypto Market Tumble
Web3

MARA Holdings Buys $46 Million in Bitcoin Post-Crypto Market Tumble

3 days ago
The Latest Nobel Peace Prize Winner Is a Bitcoin Supporter
Web3

The Latest Nobel Peace Prize Winner Is a Bitcoin Supporter

5 days ago
Bitcoin, Ethereum Dive Alongside Stocks as Trump Threatens ‘Massive’ China Tariffs
Web3

Bitcoin, Ethereum Dive Alongside Stocks as Trump Threatens ‘Massive’ China Tariffs

6 days ago
Why Bitcoin’s Rally Has Room to Run This Month
Web3

Why Bitcoin’s Rally Has Room to Run This Month

1 week ago
Next Post
Ripple’s Stablecoin Set For ‘Great Impact’: Top Economist

Ripple's Stablecoin Set For 'Great Impact': Top Economist

Bitcoin Hit ,645 Over the Weekend, and it was all Thanks to…Meme Coins?

Bitcoin Hit $67,645 Over the Weekend, and it was all Thanks to…Meme Coins?

Leave a Reply Cancel reply

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

[ccpw id="587"]
  • Disclaimer
  • Cookie Privacy Policy
  • Privacy Policy
  • DMCA
  • Terms and Conditions
  • Contact us
Contact us for business inquiries: cs@ajoobz.com

Copyright © 2023 Ajoobz.
Ajoobz is not responsible for the content of external sites.

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

Copyright © 2023 Ajoobz.
Ajoobz 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