The use case
Two questions come up constantly in token research, risk scoring, and airdrop design:- How concentrated is this token? A handful of wallets controlling most of the supply is a governance and liquidity risk.
- Is it getting more or less concentrated over time? Concentration trending up after an unlock or an airdrop is a red flag.
- Gini coefficient: inequality across all holders.
0means every holder owns an equal amount;1means a single wallet owns everything. - HHI (Herfindahl-Hirschman Index): the sum of squared ownership shares. It ranges from
1/N(perfectly even acrossNholders) to1(one holder owns everything), and it is dominated by the largest holders, so it is the sharper “whale detector” of the two.
- the holder’s balance,
- the token’s total supply (to turn balances into ownership shares),
- the holder count (
N), - and, ideally, the ability to pull all of the above as of a past block so you can chart the trend.
The formulas
With holder balancesbᵢ and shares sᵢ = bᵢ / Σ bⱼ:
- HHI
= Σ sᵢ² - Gini
= Σᵢ (2i − N − 1) · b₍ᵢ₎ / (N · Σ b₍ⱼ₎), whereb₍ᵢ₎are balances sorted ascending andiruns from1toN.
[20, 30, 50]: shares are [0.2, 0.3, 0.5], so HHI = 0.04 + 0.09 + 0.25 = 0.38 and Gini = 0.20.
What you need from an API
| Requirement | Why it matters |
|---|---|
| Every holder’s balance | Both metrics are sums over all holders, so a truncated list understates concentration. |
| Total supply | Converts raw balances into ownership shares. |
Holder count (N) | Sets the HHI floor (1/N) and normalizes the Gini. |
| Point-in-time holders | Required to chart concentration over time, not just today. |
Fetching holders and computing Gini & HHI with GoldRush
The GoldRush TypeScript SDK exposesgetTokenHoldersV2ForTokenAddress as an async iterator that pages through all holders for you. Each item carries balance, total_supply, and contract_decimals inline, so you never need a second request to normalize the data.
balance and total_supply are returned as raw strings in the token’s base units. The examples divide by 10 ^ contract_decimals for readability; for tokens whose supply exceeds JavaScript’s safe-integer range, sum the raw values with BigInt before taking ratios if you need exact precision.The Etherscan approach
Etherscan exposes the equivalent data throughtokenholderlist (module token, action tokenholderlist), paginated with page and offset:
TokenHolderAddress and TokenHolderQuantity. To compute Gini or HHI you then have to:
- fetch the total supply separately (the
stats/tokensupplyendpoint), since it is not in the holder response; - apply the token’s decimals separately (also not in the holder response);
- accept that the list is current holders only, with no way to snapshot holders at a past block, so a concentration-over-time chart is not possible from this endpoint.
tokenholderlist and tokenholdercount are PRO endpoints, available only on Etherscan’s paid Standard plan and above.
Side-by-side
| For a Gini/HHI pipeline | GoldRush token_holders_v2 | Etherscan tokenholderlist |
|---|---|---|
| Total supply in the same response | ✅ total_supply on every item | ❌ separate tokensupply call |
| Decimals in the same response | ✅ contract_decimals | ❌ separate lookup |
Holder count (N) | ✅ pagination.total_count | Separate tokenholdercount call |
| Point-in-time (historical) holders | ✅ block-height / date | ❌ current only |
| Max page size | 1000 | 1000 |
| Auto-pagination in the SDK | ✅ async iterator | ❌ manual page/offset loop |
| Multichain under one key | ✅ 100+ chains | Per-chain access |
| Access tier | Included (0.02 credits/item) | PRO (paid) endpoint |
Where GoldRush pulls ahead
- One response has everything the math needs.
balance,total_supply, andcontract_decimalsarrive together, so shares are a one-line calculation, with no second request and no separate supply/decimals bookkeeping. - Concentration over time, not just a snapshot.
block-heightanddatelet you recompute Gini/HHI at any historical point on Foundational Chains and chart the trend across unlocks, airdrops, and listings. Ncomes for free.pagination.total_countgives the holder count in the same call, so the HHI floor (1/N) and Gini normalization need no extra request.- Fewer round-trips. A page size of 1000 plus SDK auto-pagination enumerates every holder with minimal code.
- Same shape across 100+ chains. One API key and one code path cover Ethereum, Polygon, BSC, Base, Arbitrum, and more.
Where to start
Get token holders (v2)
Full parameter and response reference for the endpoint used above, including historical
block-height and date queries.Foundational API quickstart
Install the TypeScript SDK and make your first authenticated call in minutes.
Estimate your cost
Project the monthly cost of pulling full holder lists at 0.02 credits per item.
Supported chains
See which chains support the latest snapshot and which support historical holder queries.