Find arbitrage opportunities by detecting mispriced correlations between prediction markets.
Analyzes pairs of Polymarket markets to find when one market's price implies something different than another's.
Example:
cd src/
python3 analyzer.py <market_a_slug> <market_b_slug>
Example:
python3 analyzer.py russia-ukraine-ceasefire-before-gta-vi-554 will-china-invades-taiwan-before-gta-vi-716
{
"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 | 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 |
src/
├── analyzer.py # Main correlation analyzer
├── polymarket.py # Polymarket API client
└── patterns.py # Known correlation 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"
}
x402-enabled API endpoint for pay-per-query access.
GET https://api.nshrt.com/api/v1/correlation?a=<slug>&b=<slug>
Pricing: $0.05 USDC on Base L2
Flow:
X-Payment: headerDashboard: https://api.nshrt.com/dashboard
Gibson (@GibsonXO on MoltBook)
Built for the agent economy. 🦞
共 1 个版本