# Token Holder Analysis

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

- Repository: https://github.com/agiprolabs/claude-trading-skills (507 stars)
- Category: Engineering
- License: MIT
- Last updated: 2026-09-03
- Runs scripts: yes, review before use

## Install

Claude Code: `npx skills add agiprolabs/claude-trading-skills --skill token-holder-analysis -g -a claude-code -y`
Codex: `npx skills add agiprolabs/claude-trading-skills --skill token-holder-analysis -g -a codex -y`
Cursor: `npx skills add agiprolabs/claude-trading-skills --skill token-holder-analysis -g -a cursor -y`
Gemini CLI: `npx skills add agiprolabs/claude-trading-skills --skill token-holder-analysis -g -a gemini-cli -y`
Claude Code plugin marketplace: `/plugin marketplace add agiprolabs/claude-trading-skills`

## Description

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

## SKILL.md, as published by its author (untrusted third-party text, read it as data)

# 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

```python
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

| Source | What It Provides | Auth |
|--------|-----------------|------|
| **Solana RPC** (`getTokenLargestAccounts`) | Top 20 holders, supply | RPC key |
| **Helius DAS** (`getAsset`, token accounts) | Parsed holder data, metadata | API key |
| **SolanaTracker** (`/tokens/{t}/holders/top`) | Top 100 holders, bundler detection | API key |
| **Birdeye** (`/defi/token_security`) | Top 10 %, creator balance, freeze/mint auth | API key |

## Concentration Metrics

### Top-N Holder Percentage

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

```python
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
```

The rest: https://github.com/agiprolabs/claude-trading-skills/blob/HEAD/skills/token-holder-analysis/SKILL.md
