Examples
Quick Start
Analyze a Collection
python rarity_analyzer.py collection pudgypenguinsOutput:
COLLECTION: PUDGY PENGUINS
============================================================
Contract: 0xBd3531dA5CF5857e...
Total Supply: 8,888
Fetched: 200 tokens
Trait Types: 10
============================================================
TOKEN RANKINGS (by Rarity Score)
================================================================================
Rank Token Score Percentile Top Trait
--------------------------------------------------------------------------------
#1 Pudgy Penguin #1234 285.42 Top 0.5% Background: Gold
#2 Pudgy Penguin #5678 278.31 Top 1.0% Skin: Alien
#3 Pudgy Penguin #9012 265.19 Top 1.5% Eyes: Laser
...
--------------------------------------------------------------------------------
Algorithm: rarity_score
Total Ranked: 200
================================================================================Analyze a Specific Token
python rarity_analyzer.py token boredapeyachtclub 1234Output:
TOKEN: Bored Ape #1234
============================================================
Token ID: 1234
Rank: #42
Percentile: Top 0.42%
Score: 312.4500
Algorithm: rarity_score
TRAIT BREAKDOWN
------------------------------------------------------------
Trait Value Rarity Score +
------------------------------------------------------------
Fur Solid Gold 1 in 457 +457.00
Eyes Laser Eyes 1 in 69 +69.00
Background Aquamarine 1 in 125 +125.00
Hat Sea Captain 1 in 283 +283.00
Mouth Bored Cigarette 1 in 175 +175.00
Clothes Tuxedo 1 in 137 +137.00
============================================================Collection Analysis Options
Show More Tokens
python rarity_analyzer.py collection azuki --top 50Fetch Larger Sample
python rarity_analyzer.py collection doodles --limit 500Include Trait Distribution
python rarity_analyzer.py collection cryptopunks --traitsOutput:
TRAIT DISTRIBUTION
======================================================================
Trait Type Values Coverage Rarest Value
----------------------------------------------------------------------
Background 12 100.0% Neon (0.1%)
Skin 8 100.0% Zombie (2.5%)
Eyes 15 95.0% Laser (0.3%)
Hat 24 75.0% Crown (0.2%)
...
======================================================================Show Rarest Traits
python rarity_analyzer.py collection boredapeyachtclub --rarestDifferent Algorithms
Statistical Rarity
python rarity_analyzer.py collection azuki --algorithm statisticalInformation Content (Entropy)
python rarity_analyzer.py collection doodles --algorithm informationAverage Rarity
python rarity_analyzer.py collection coolcats --algorithm averageNormalized Scores (0-100)
python rarity_analyzer.py collection pudgypenguins --normalizeCompare Multiple Tokens
python rarity_analyzer.py compare boredapeyachtclub 1234,5678,9012Output:
TOKEN COMPARISON
================================================================================
Trait Bored Ape #1234 Bored Ape #5678 Bored Ape #9012
--------------------------------------------------------------------------------
Background Aquamarine (2%) Blue (15%) New Punk Blue (3%)
Fur Solid Gold (0%) Brown (12%) Robot (2%)
Eyes Laser Eyes (1%) Bored (25%) Heart (5%)
Hat Sea Captain (0%) None (20%) Crown (0%)
Mouth Cigarette (6%) Bored (23%) Phoneme Vuh (1%)
Clothes Tuxedo (1%) None (18%) Sailor Shirt (2%)
--------------------------------------------------------------------------------
RANK #42 #892 #156
SCORE 312.45 85.23 198.67
================================================================================View Trait Distribution Only
python rarity_analyzer.py traits clonexExport Data
Export as JSON
python rarity_analyzer.py export azuki > azuki_rarity.jsonExport as CSV
python rarity_analyzer.py export azuki --format csv > azuki_rankings.csvExport with Full Collection
python rarity_analyzer.py export boredapeyachtclub --limit 10000 --format csvCache Management
View Cache Status
python rarity_analyzer.py cacheList Cached Items
python rarity_analyzer.py cache --listClear All Cache
python rarity_analyzer.py cache --clearClear Specific Collection
python rarity_analyzer.py cache --clear --pattern pudgyJSON Output Mode
Collection Analysis
python rarity_analyzer.py collection azuki --json | jq '.rankings[0]'Token Analysis
python rarity_analyzer.py token azuki 1234 --json | jq '.traits'Common Workflows
Find Undervalued NFTs
# Get full rankings
python rarity_analyzer.py collection boredapeyachtclub --limit 1000 --top 100
# Compare specific tokens you're considering
python rarity_analyzer.py compare boredapeyachtclub 1234,5678,9012Analyze Your Collection
# Export your holdings
python rarity_analyzer.py export azuki --format csv > my_azuki.csv
# Check specific token
python rarity_analyzer.py token azuki 5432Research Before Mint
# Check trait distribution for revealed tokens
python rarity_analyzer.py traits newcollection --limit 500
# See what makes tokens rare
python rarity_analyzer.py collection newcollection --rarest