Skills

Token Holder Analysis

Token holder distribution, concentration metrics, insider detection, and supply...

Install

npx skills add agiprolabs/claude-trading-skills --skill token-holder-analysis -g -a claude-code -y
Category
Engineering
Updated
2mo ago
License
MIT
Context cost
Mediumabout 2,583 tokens
Runs scripts
Yes, review before use

What it does

Token holder distribution, concentration metrics, insider detection, and supply analysis for Solana tokens

Token Holder Analysis, Concentration, Distribution & Risk

Analyze who holds a token, how concentrated ownership is, and whether insider patterns suggest risk. This is a critical pre-trade safety check, high concentration means a few wallets can crash the price.

Quick Start

import httpx
import math

# Using Helius DAS API for holder data
HELIUS_KEY = os.getenv("HELIUS_API_KEY", "")
HELIUS = f"https://mainnet.helius-rpc.com/?api-key={HELIUS_KEY}"

# Or using SolanaTracker for holder + risk data
ST_KEY = os.getenv("SOLANATRACKER_API_KEY", "")
ST = "https://data.solanatracker.io"

# Get top holders via RPC
def get_top_holders(mint: str) -> list[dict]:
    resp = httpx.post(HELIUS, json={
        "jsonrpc": "2.0", "id": 1,
        "method": "getTokenLargestAccounts",
        "params": [mint],
    })
    return resp.json()["result"]["value"]

holders = get_top_holders("TOKEN_MINT")

Data Sources

SourceWhat It ProvidesAuth
Solana RPC (getTokenLargestAccounts)Top 20 holders, supplyRPC key
Helius DAS (getAsset, token accounts)Parsed holder data, metadataAPI key
SolanaTracker (/tokens/{t}/holders/top)Top 100 holders, bundler detectionAPI key
Birdeye (/defi/token_security)Top 10 %, creator balance, freeze/mint authAPI key

Concentration Metrics

Top-N Holder Percentage

The simplest measure, what % of supply do the top N holders control?

def top_n_percentage(holders: list[dict], supply: int, n: int = 10) -> float:
    """Calculate percentage held by top N holders.

    Args:
        holders: Sorted list of holders (largest first).
        supply: Total token supply.
        n: Number of top holders.

    Returns:
        Percentage (0-100) held by top N.
    """
    top_n_amount = sum(int(h.get("amount", 0)) for h in holders[:n])
    return top_n_amount / supply * 100 if supply > 0 else 0
Read the whole SKILL.md on GitHub

More in Engineering