Did you know you can get Solana token holders with just a few lines of code? Enter Moralis Solana Token API – the top choice for fetching and integrating token-related data into Web3 projects!
Are you eager to jump straight into the code? Check out the example script below, highlighting how easy it is to get Solana token holders when using Moralis:
import fetch from "node-fetch"; const options = { method: "GET", headers: { accept: "application/json", "X-API-Key": "YOUR_API_KEY", }, }; fetch( "https://solana-gateway.moralis.io/token/mainnet/holders/6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN", options ) .then((response) => response.json()) .then((response) => console.log(response)) .catch((err) => console.error(err));
Simply add your API key, change the address to match the token of your choice, and run the code. In return, you’ll get holder stats – including changes in holder count, acquisition data, and distribution insights – all with one single API call. Here’s what it looks like:
{ totalHolders: 647008, holdersByAcquisition: { swap: 473654, transfer: 158202, airdrop: 15152 }, holderChange: { '5min': { change: 1, changePercent: 0.00015 }, '1h': { change: 0, changePercent: 0 }, '6h': { change: -5, changePercent: -0.00077 }, '24h': { change: -91, changePercent: -0.014 }, '3d': { change: 17, changePercent: 0.0026 }, '7d': { change: -786, changePercent: -0.12 }, '30d': { change: -66419, changePercent: -10 } }, holderDistribution: { whales: 2, sharks: 0, dolphins: 4, fish: 5, octopus: 16, crabs: 54, shrimps: 646927 } }
That’s it; it shouldn’t be more challenging than this to get Solana token holders!
For a more in-depth tutorial and further information about Moralis, join us in today’s guide as we dive deeper into this topic, or check out the YouTube video right here:
Also, if you want to try out the API immediately, click the button below to sign up for a free Moralis for Devs account!
Overview
Data about holders can reveal a lot of information about a token. For example, how is the supply distributed? What’s the overall market sentiment? How did holders get their tokens? And so on. As such, if you’re building crypto projects, you can integrate this data into your platform to boost both user engagement and value.
But what is the best way to get Solana token holders?
The Moralis Solana Token API is the ultimate tool for anyone looking to fetch token data, including in-depth holder insights. But what exactly is this premier tool? And how can you use the API to get Solana token holders?
For the answers to these questions, follow along in today’s guide as we lay it all out for you. Let’s dive straight in!
What is Moralis for Devs?
Moralis for Devs is a leading crypto data provider, giving you access to world-class APIs and next-generation RPC nodes – all in one place. With single endpoints, you can get token holder data, decoded wallet history, detailed portfolio insights, and much more, so you can build Web3 projects faster and more efficiently.

But what makes Moralis the #1 crypto data provider?
- More Data. Fewer Calls: All APIs and RPC methods are designed with the result in mind, giving you much more data with fewer calls. For instance, get in-depth token holder stats – including changes over time, supply distribution, and holder acquisition data – all with just one endpoint.
- Cross-Chain Support: Moralis offers multi-chain support, giving you full feature parity spanning all major networks, including Solana, Ethereum, BNB Smart Chain (BSC), Optimism, etc.
- World-Class Security & Reliability: With a SOC 2 Type 2 certificate, Moralis delivers enterprise-grade security and reliability across all tools and features.
Overall, Moralis gives you access to the industry’s most comprehensive, reliable, and secure Web3 development tools, allowing you to build cross-chain compatible Web3 projects without breaking a sweat.
Introducing the Solana Token API – The Easiest Way to Get Solana Token Holders
The best and easiest way to get Solana token holders is to leverage the Moralis Solana Token API. But what exactly is this interface? And what makes it the best option for querying token data?

The Token API is a leading interface for querying and integrating token-related data into Web3 applications. With single endpoints, you can use this interface to get Solana token holders, metadata, swaps, volume stats, snipers, and more. As such, it is a world-class API for anyone looking to build portfolio trackers, token analytics tools, and similar platforms.
Here’s what you can fetch using the Token API:
- Holder Stats: Query holder stats, including changes in holder count, acquisition insights, and distribution data.
- Swaps: Access the full history of any wallet, enriched with transaction types, category tags, prices, and more.
- Metadata: Get token metadata, including logos, supply data, links, and other vital insights.
- Prices: Query the price of any token denominated in both the chain’s native currency and USD.
- Pairs: Fetch all supported pairs for a specific token.
- Wallet Balances: Query the token balances of any wallet.
- Trending Tokens: Get trending tokens for any chain.
… and much more!
All in all, the Token API is the ultimate tool for fetching and
Full Tutorial: How to Get Solana Token Holders in 3 Steps
With an overview of the Token API, let’s take a closer look at how you can get Solana token holders in three simple steps:
- Get a Moralis API Key
- Write a Script Calling the Token Holder Stats Endpoint
- Run the Script & Integrate the Data
But before we kick things off, you need to handle a couple of prerequisites!
Prerequisites
Make sure you have the following installed before continuing:
- Node v.14+
- npm/yarn
Step 1: Get a Moralis API Key
To use the Token API, you need an API key from Moralis. As such, the first thing you need to do – if you haven’t already – is to click the ”Start for Free” button at the top right and register an account:

Once you log in, you’ll find your API key directly under the ”Home” tab:

Keep the key for now, as you’ll need it in the next section.
Step 2: Write a Script Calling the Token Holder Stats Endpoint
Open a folder with your preferred IDE, launch a new terminal, and initialize a Node.js project with this command:
npm init
Install the following dependencies:
npm install node-fetch --save npm install moralis @moralisweb3/common-evm-utils
Open the ”package.json” file and add ”type”: ”module”
to the list:

Set up a new ”index.js” file and add the following script for fetching Solana token holders:
import fetch from "node-fetch"; const options = { method: "GET", headers: { accept: "application/json", "X-API-Key": "YOUR_API_KEY", }, }; fetch( "https://solana-gateway.moralis.io/token/mainnet/holders/9BB6NFEcjBCtnNLFko2FqVQBq8HHM13kCyYcdQbgpump", options ) .then((response) => response.json()) .then((response) => console.log(response)) .catch((err) => console.error(err));
Replace YOUR_API_KEY
with the key you fetched during the first step and change the token address to fit your preferences:

Step 3: Run the Script & Interpret the Data
When you’re happy with your script, run it with the following terminal command:
node index.js
In return, you’ll get a response that looks something like this:
{ totalHolders: 125339, holdersByAcquisition: { swap: 93138, transfer: 29156, airdrop: 3045 }, holderChange: { '5min': { change: 8, changePercent: 0.0064 }, '1h': { change: 30, changePercent: 0.024 }, '6h': { change: 35, changePercent: 0.028 }, '24h': { change: 1314, changePercent: 1 }, '3d': { change: 4319, changePercent: 3.4 }, '7d': { change: 7053, changePercent: 5.6 }, '30d': { change: 9081, changePercent: 7.2 } }, holderDistribution: { whales: 0, sharks: 0, dolphins: 11, fish: 57, octopus: 227, crabs: 886, shrimps: 124158 } }
Let’s break down the data points below:
totalHolders
: The total number of token holders.holdersByAcquisition
: A breakdown of how holders acquired their tokens, whether it’s via swaps, transfers, or airdrops.holderChange
: Changes in holder count over various timeframes, from as low as five minutes to as long as 30 days.holderDistribution
: Holder distribution by wallet size category. Categories includewhales
,sharks
,dolphins
,fish
,octopus
,crabs
, andshrimps
.
That’s it; with the Token API, you can get Solana token holders without breaking a sweat. Check out the token holder stats documentation to learn more about this premier endpoint.
What Can You Build with Data on Solana Token Holders?
There are a lot of useful things you can build with the data you get when you fetch Solana token holders. Here are some prominent examples from Moralis.com:
- Holder Trends: Show your users how the holder count has been increasing or decreasing over various time periods. Here’s an example of what it might look like:

- Wallet Distribution: Give traders and investors insight into how holders are distributed between addresses. This can help users identify potential concentration risks and other similar issues. Check out the example below:

- Holder Acquisition: Provide insight into how current holders acquired their tokens, whether it’s via swaps, airdrops, or transfers. Here’s an example of what the feature can look like:

And the best part? You can build these three features with just one single endpoint!
How to Build & Integrate Token Holder Charts
In addition to fetching Solana token holders, you can also build and integrate token holder charts when working with Moralis. Let’s take a closer look at how this works in two separate sections, starting with how you can create your own charts from scratch.
Build a Token Holder Chart
The easiest way to build a token holder chart is to use the Solana Token API to get historical holder statistics for a specific token. Here’s an example showing the Historical Token Holders endpoint in action:
import fetch from "node-fetch"; const options = { method: "GET", headers: { accept: "application/json", "X-API-Key": "YOUR_API_KEY", }, }; fetch( "https://solana-gateway.moralis.io/token/mainnet/holders/6p6xgHyF7AeE6TZkSmFsko444wqoP15icUSqi2jfGiPN/historical?fromDate=2025-01-01T10%3A00%3A00&toDate=2025-02-01T11%3A00%3A00&timeFrame=1d&limit=100", options ) .then((response) => response.json()) .then((response) => console.log(response)) .catch((err) => console.error(err));
In return for calling the endpoint above, you’ll get the historical holder statistics for the specified timeframe. Here’s a sample response:
{ "result": [ { "timestamp": "2025-02-01T00:00:00.000Z", "totalHolders": 666573, "netHolderChange": -10384, "holderPercentChange": -1.6, "newHoldersByAcquisition": { "swap": 6746, "transfer": 5696, "airdrop": 529 }, "holdersIn": { "whales": 0, "sharks": 0, "dolphins": 0, "fish": 0, "octopus": 0, "crab": 32, "shrimps": 12939 }, "holdersOut": { "whales": 0, "sharks": 0, "dolphins": 0, "fish": 0, "octopus": 3, "crab": 36, "shrimps": 23316 } }, //... ], "page": 1 }
With the data provided by the API, you can effortlessly build your own token holder chart. Here’s an example of what it might look like:

To learn more about this, check out the get historical token holders documentation page.
Integrate Token Holder Charts
Another option is to integrate a token holder chart using Moralis’ Token Page Widget. Here’s what it looks like:

The widget above shows the page of a token, and it features a price chart, holder chart, holder insights, and much more.
Here’s a quick three-step breakdown of how you can add a token page to your website, application, or other crypto-related platforms:
- Step 1 – Visit Moralis’ Token Page Widget page:

- Step 2 – Scroll down to the ”Configuration” section, select a chain, add the token address of your choice, and click ”Apply”:

- Step 3 – Copy and integrate the code into your project:

That’s it. Adding a token holder chart – along with other key insights that will keep your users engaged – doesn’t have to be more challenging than this!
Beyond Fetching Solana Token Holders – Other APIs & Features
The Solana Token API only scratches the surface of the Moralis Web3 API suite. As such, let’s introduce three additional interfaces you’ll likely find helpful when building Web3 projects:
- Wallet API: The Wallet API is the ultimate tool for integrating wallet-related data into Web3 apps. It allows you to access a wallet’s full history, token holdings, profitability, and much more without breaking a sweat. As such, this is an excellent interface for anyone looking to build wallets, portfolio trackers, and other similar platforms.
- NFT API: The NFT API supports all kinds of tokens on the Solana network and other EVM chains, including compressed NFTs (cNFTs), semi-fungible tokens (SFTs), etc. With this interface, you can effortlessly fetch NFT balances and up-to-date metadata with single lines of code. Use this API to integrate data into your NFT marketplace, tokenization tool, NFT-Fi platforms, and other NFT-related projects.
- Price API: The Price API is a go-to interface for real-time and historical price data. It empowers you to seamlessly fetch DEX prices, in-depth trading data, and OHLCV insights for any token. Leverage this interface to enrich your analytics platform with accurate price data, build interactive price charts, and much more.
To learn more about all Solana-compatible tools, check out Moralis’ Solana API page!
Summary: How to Get Solana Token Holders
Giving your users insight into holders can help boost engagement and user value for your crypto project. But how do you actually get Solana token holders? Enter Moralis – the industry’s #1 crypto data provider!
Moralis is a world-class crypto data provider that provides comprehensive, secure, and cross-chain compatible Web3 APIs and RPC nodes. With just single calls, you can use these tools to fetch holder data, in-depth portfolio insights, fully decoded wallet activity, and much more. As such, when working with Moralis, you can streamline the process of integrating crypto data into your projects without breaking a sweat.
With the Solana Token API, you can now get Solana token holder stats – including supply distribution insights, changes in holder count, and acquisition data – with just one single endpoint. Here’s an example of what it might look like:
import fetch from "node-fetch"; const options = { method: "GET", headers: { accept: "application/json", "X-API-Key": "YOUR_API_KEY", }, }; fetch( "https://solana-gateway.moralis.io/token/mainnet/holders/2zMMhcVQEXDtdE6vsFS7S7D5oUodfJHE8vd1gnBouauv", options ) .then((response) => response.json()) .then((response) => console.log(response)) .catch((err) => console.error(err));
In return for running the script above, you’ll get a response that looks like this:
{ totalHolders: 517517, holdersByAcquisition: { swap: 138323, transfer: 153296, airdrop: 225898 }, holderChange: { '5min': { change: 1, changePercent: 0.00019 }, '1h': { change: 5, changePercent: 0.00097 }, '6h': { change: 16, changePercent: 0.0031 }, '24h': { change: -226, changePercent: -0.044 }, '3d': { change: -987, changePercent: -0.19 }, '7d': { change: -2036, changePercent: -0.39 }, '30d': { change: -54675, changePercent: -11 } }, holderDistribution: { whales: 1, sharks: 1, dolphins: 11, fish: 11, octopus: 23, crabs: 225, shrimps: 517245 } }
With this data, you can build powerful features that give your users insight into holder data, allowing them to understand market sentiment, identify potential supply concentration risks, and much more!
So, if you’re looking for an easy way to get Solana token holders, sign up for a free Moralis account today!
Also, if you found this tutorial interesting, consider checking out more premier content here on the blog. For example, explore our Raydium API piece or learn how to get pump.fun token data with our Pump Fun API.