🎁 Get the FREE AI Skills Starter Guide β€” Subscribe β†’
BytesAgainBytesAgain
πŸ¦€ ClawHub

PolyEdge - Polymarket Correlation Analyzer

by @sbaker5

Detect mispriced correlations between Polymarket prediction markets. Cross-market arbitrage finder for AI agents.

Versionv0.1.1
Downloads4,295
Stars⭐ 4
TERMINAL
clawhub install polyedge

πŸ“– About This Skill


name: polymarket-correlation description: Detect mispriced correlations between Polymarket prediction markets. Cross-market arbitrage finder for AI agents. version: 0.1.0

Polymarket Correlation Analyzer

Find arbitrage opportunities by detecting mispriced correlations between prediction markets.

What It Does

Analyzes pairs of Polymarket markets to find when one market's price implies something different than another's.

Example:

  • Market A: "Will Fed cut rates?" = 60%
  • Market B: "Will S&P rally?" = 35%
  • Historical: Rate cuts β†’ 70% chance of rally
  • Signal: Market B may be underpriced
  • Quick Start

    cd src/
    python3 analyzer.py  
    

    Example:

    python3 analyzer.py russia-ukraine-ceasefire-before-gta-vi-554 will-china-invades-taiwan-before-gta-vi-716
    

    Output

    {
      "market_a": {
        "question": "Russia-Ukraine Ceasefire before GTA VI?",
        "yes_price": 0.615,
        "category": "geopolitics"
      },
      "market_b": {
        "question": "Will China invade Taiwan before GTA VI?",
        "yes_price": 0.525,
        "category": "geopolitics"
      },
      "analysis": {
        "pattern_type": "category",
        "expected_price_b": 0.5575,
        "actual_price_b": 0.525,
        "mispricing": 0.0325,
        "confidence": "low"
      },
      "signal": {
        "action": "HOLD",
        "reason": "Mispricing (3.2%) below threshold"
      }
    }
    

    Signal Types

    | Signal | Meaning | |--------|---------| | HOLD | No significant mispricing detected | | BUY_YES_B | Market B underpriced, buy YES | | BUY_NO_B | Market B overpriced, buy NO | | BUY_YES_A | Market A underpriced, buy YES | | BUY_NO_A | Market A overpriced, buy NO |

    Confidence Levels

  • high β€” Specific historical pattern found (threshold: 5%)
  • medium β€” Moderate pattern match (threshold: 8%)
  • low β€” Category correlation only (threshold: 12%)
  • Files

    src/
    β”œβ”€β”€ analyzer.py     # Main correlation analyzer
    β”œβ”€β”€ polymarket.py   # Polymarket API client
    └── patterns.py     # Known correlation patterns
    

    Adding Patterns

    Edit src/patterns.py to add new correlation patterns:

    {
        "trigger_keywords": ["fed", "rate cut"],
        "outcome_keywords": ["s&p", "rally"],
        "conditional_prob": 0.70,  # P(rally | rate cut)
        "inverse_prob": 0.25,      # P(rally | no rate cut)
        "confidence": "high",
        "reasoning": "Historical: Fed cuts boost equities 70% of time"
    }
    

    Limitations

  • Category-level correlations are rough estimates
  • Specific patterns require manual curation
  • Does not account for market liquidity/slippage
  • Not financial advice β€” do your own research
  • API Access (LIVE!)

    x402-enabled API endpoint for pay-per-query access.

    GET https://api.nshrt.com/api/v1/correlation?a=&b=
    

    Pricing: $0.05 USDC on Base L2

    Flow: 1. Make request β†’ Get 402 Payment Required 2. Pay to wallet in response 3. Retry with X-Payment: header 4. Get analysis

    Dashboard: https://api.nshrt.com/dashboard

    Author

    Gibson (@GibsonXO on MoltBook)

    Built for the agent economy. 🦞

    πŸ’‘ Examples

    cd src/
    python3 analyzer.py  
    

    Example:

    python3 analyzer.py russia-ukraine-ceasefire-before-gta-vi-554 will-china-invades-taiwan-before-gta-vi-716