Inspiration
We are Polymarket traders who do a variety of news trading on X. We've always wanted to build on the X API and then use LLMs to parse everything, find relevant news, and leverage AI intelligence to estimate second-order effects. Breaking news from accounts like @firstsquawk and @DeItaone moves markets within seconds—but manually monitoring dozens of accounts while cross-referencing thousands of prediction markets is humanly impossible. We built PolyTracker to automate this entire workflow: from tweet detection to market matching to price impact analysis, all in real-time.
What it does
PolyTracker is a real-time intelligence platform that connects breaking news from X (Twitter) to Polymarket prediction markets. The pipeline is:
Real-Time Tweet Monitoring — Streams or polls tweets from influential financial news accounts (@firstsquawk, @DeItaone, @unusual_whales, @zaboravsky, etc.)
Semantic Market Matching — Uses BGE sentence embeddings to instantly match incoming tweets to the most relevant prediction markets from Polymarket's 1,000+ active markets
Grok-Powered Analysis — xAI's Grok filters candidates for true relevance, then provides directional price impact analysis (UP/DOWN/NEUTRAL) with confidence scores and reasoning
"What If" Scenario Engine — Enter hypothetical scenarios like "Iran launches missiles at Israel" and see which markets would be affected with projected price movements
Historical Tweet Analysis — View any market and instantly see all related tweets with their historical price impact
Progressive Real-Time Updates — SSE-powered dashboard shows tweets appearing instantly, then progressively enriches them with market matches and impact analysis
How we built it
Backend: Python Flask with Server-Sent Events (SSE) for real-time streaming updates
X Integration: Twitter API v2 for filtered streaming (elevated access) or polling fallback (basic access)
Sentence Transformers (BAAI/bge-base-en-v1.5) for semantic embeddings with GPU acceleration
xAI Grok (grok-3-mini-fast) for relevance filtering and price impact analysis
Market Data: Polymarket CLOB API for live prices, orderbooks, and historical price data
Challenges we ran into
Market Matching at Scale — With 1,000+ markets, naive keyword matching produces too many false positives. We solved this with a two-stage pipeline: semantic embeddings for fast candidate retrieval (50 markets), then Grok for precise relevance filtering (top 10).
Grok Response Parsing — LLM outputs are unpredictable. We implemented robust JSON extraction with fallbacks for markdown code blocks and edge cases
Accomplishments that we're proud of
Sub-second tweet-to-screen latency — Tweets appear on the dashboard within milliseconds of being posted
The "What If" feature — Our favorite feature. Enter any hypothetical scenario and see exactly which markets would move and why
What we learned
xAI's Grok is incredibly fast and accurate for structured financial analysis tasks—the grok-3-mini-fast model is perfect for high-volume, low-latency use cases
Semantic search beats keyword search dramatically for matching news to markets—embeddings understand context, synonyms, and implications
What's next for PolyTracker
Automated Trading Integration — Connect to Polymarket's trading API to execute trades based on high-confidence signals
Log in or sign up for Devpost to join the conversation.