Skip to content

hacksurvivor/insider

Repository files navigation

Polymarket Insider Analysis Tool

A free, open-source intelligence CLI for Polymarket market participants. It helps operators evaluate wallets, detect suspicious flows, and monitor whale behavior with reproducible signals.

Problem

Most prediction-market participants do not have a structured way to evaluate trader quality, timing behavior, and suspicious concentration patterns in one workflow.

Architecture

  • Python CLI commands for trader analysis, scoring, insider-pattern detection, whale tracking, and consensus snapshots.
  • Data ingestion from Polymarket public APIs (Data API, Gamma API, CLOB API).
  • Modular components (TraderScanner, SmartScoreCalculator, WhaleTracker, alerts) for scriptable use.

Outcomes

  • Faster triage of wallets worth tracking or avoiding.
  • Comparable scorecards across traders using the same evaluation pipeline.
  • Actionable monitoring for high-signal markets and whale movements.

Features

  • Trader Analysis - Analyze any wallet's P&L, win rate, and trading patterns
  • Smart Score - Rate traders from -100 to +100 (similar to Hashdive's scoring)
  • Insider Detection - Flag suspicious patterns like new wallets making large bets
  • Whale Tracking - Monitor large trades across markets
  • Copy Trading - See what successful traders are currently betting on
  • Whale Consensus - See what outcome whales are collectively betting on
  • Export & Alerts - Export data and set up watchlists

Installation

# Clone or download this repository
cd insider

# Install dependencies
pip install -r requirements.txt

# Run the tool
python main.py --help

Quick Start

Analyze a Trader

# Basic analysis
python main.py analyze-trader 0x1234567890abcdef...

# With current positions
python main.py analyze-trader 0x1234... --positions

# Export as JSON
python main.py analyze-trader 0x1234... --json

Calculate Smart Score

# Basic score
python main.py smart-score 0x1234...

# Detailed breakdown
python main.py smart-score 0x1234... --detailed

Find Insiders in a Market

# Detect suspicious patterns
python main.py find-insiders <condition_id>

# With custom minimum amount
python main.py find-insiders <condition_id> --min 10000

Track Whale Trades

# Recent whale trades (last 24h)
python main.py whale-trades

# Custom timeframe and threshold
python main.py whale-trades --hours 48 --min 25000

# For specific market
python main.py whale-trades --market <condition_id>

Copy a Trader's Positions

# See what a successful trader is betting on
python main.py copy-trades 0x1234...

Whale Consensus

# See what whales collectively think
python main.py whale-consensus <condition_id>

Compare Multiple Traders

python main.py leaderboard "0x123...,0x456...,0x789..."

Understanding the Metrics

Smart Score (-100 to +100)

Score Range Grade Meaning
80-100 S Exceptional - Very high win rate, consistent profits
60-79 A Strong - Above average across all metrics
40-59 B Good - Solid performance
20-39 C Average - Mixed results
0-19 D Below Average - Inconsistent
Below 0 F Poor - Avoid copying

Insider Score (0-100)

Higher = more suspicious patterns detected

Score Interpretation
0-30 Normal trading patterns
30-60 Some unusual activity
60-80 Highly suspicious
80-100 Very likely has inside info

Insider Patterns Detected

  1. Single Market Whale - Large bet on one market with no prior history
  2. New Wallet Large Bet - Fresh wallet immediately placing big bets
  3. Perfect Timing - Consistently enters before favorable outcomes
  4. Concentrated Wins - High win rate in specific market types

API Data Sources

This tool uses Polymarket's public APIs:

  • Data API (data-api.polymarket.com) - Positions, trades, P&L
  • Gamma API (gamma-api.polymarket.com) - Market metadata
  • CLOB API (clob.polymarket.com) - Order book data

No authentication required for read operations. Rate limited to ~1000 calls/hour.

Programmatic Usage

import asyncio
from trader_scanner import TraderScanner
from smart_score import SmartScoreCalculator
from whale_tracker import WhaleTracker

async def main():
    # Analyze a trader
    async with TraderScanner() as scanner:
        profile = await scanner.analyze_trader("0x...")
        print(f"P&L: ${profile.total_pnl:,.2f}")
        print(f"Win Rate: {profile.win_rate*100:.1f}%")

        # Get their current bets
        bets = await scanner.get_trader_current_bets("0x...")
        for bet in bets:
            print(f"  {bet['market']}: ${bet['size_usd']}")

    # Calculate Smart Score
    async with SmartScoreCalculator() as calc:
        score = await calc.calculate_score("0x...")
        print(f"Score: {score.total_score:+.0f} ({score.grade})")

    # Track whales
    async with WhaleTracker() as tracker:
        trades = await tracker.get_recent_whale_trades(hours=24)
        for trade in trades[:5]:
            print(f"${trade.amount_usd:,.0f} - {trade.market_question[:30]}")

asyncio.run(main())

Setting Up Alerts

from alerts import AlertManager, print_alert

manager = AlertManager()

# Watch a successful trader
manager.watch_trader("0x...", name="AlphaTrader", min_trade_size=5000)

# Watch a market for whale activity
manager.watch_market("condition_id", name="Bitcoin 100k", whale_threshold=10000)

# Set up console notifications
manager.on_alert(print_alert)

# Check for new activity
import asyncio
alerts = asyncio.run(manager.check_all())

Known Profitable Traders

See known_whales.py for a list of notable traders mentioned in research:

  • AlphaRaccoon (0xafee) - $1M profit on Google Search predictions
  • Axios - 96% win rate on mention markets

Tips for Profitable Trading

  1. Follow Smart Score 60+ Traders - But verify their recent performance
  2. Watch Insider Score 50-70 - May have edge without being obvious insider
  3. Check Whale Consensus - 70%+ agreement is strong signal
  4. Time Your Entries - Don't chase pumps, enter before crowd
  5. Diversify - Don't put everything on one market
  6. DYOR - Always verify with your own research

Disclaimer

This tool is for informational and educational purposes only. It is NOT financial advice.

  • Prediction market trading involves significant risk
  • Past performance does not guarantee future results
  • "Insider trading" on prediction markets may be legal but is ethically questionable
  • Always do your own research before trading

Contributing

Pull requests welcome! Areas that could use improvement:

  • Real-time WebSocket monitoring
  • More sophisticated insider detection algorithms
  • Historical backtesting
  • Telegram/Discord alert integrations

License

MIT License - Use freely, but at your own risk.

About

Open-source Polymarket intelligence CLI for trader scoring, insider-pattern detection, and whale monitoring.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages