Inspiration

Traditional trading decisions rely on limited signals. We wanted to combine prediction markets (real-money sentiment), news, and video content into one system. Prediction markets like Polymarket reflect real-money sentiment, while news and video capture broader narratives. MarketMinds unifies these signals with AI to produce actionable trading insights.

What it does

MarketMinds is a multi-agent system that analyzes market sentiment for any stock ticker or company. It:

  • Gambler Agent: Analyzes prediction market odds from Polymarket to gauge real-money sentiment
  • Gossip Agent: Scrapes and analyzes news headlines from Google News RSS
  • Video Gossip Agent: Extracts and analyzes sentiment from YouTube videos about the company
  • Judge Agent: Uses Google Vertex AI (Gemini) to synthesize all signals and make BUY/SELL/HOLD decisions with reasoning
  • Web Interface: Interactive FastAPI dashboard showing real-time analysis, sentiment scores, and historical price charts

The system provides a unified sentiment score, trade recommendation, confidence level, and key factors behind each decision.

How we built it

Built with Python and FastAPI:

  1. Backend Architecture: FastAPI server orchestrating asynchronous agent workflows with real-time progress tracking
  2. Gambler Agent: Integrates Polymarket's Gamma API and CLOB API to fetch prediction market odds and order book data
  3. Gossip Agent: Parses Google News RSS feeds and uses Vertex AI to extract sentiment from headlines
  4. Video Gossip Agent: Uses yt-dlp to download YouTube videos, extracts audio, and analyzes sentiment from video content
  5. Judge Agent: Leverages Google Vertex AI (Gemini 2.5 Flash Lite) to synthesize multiple data sources and generate trade decisions
  6. Frontend: Jinja2 templates with real-time updates via polling, interactive charts using SerpApi for historical price data
  7. APIs Integrated: Polymarket Gamma/CLOB, Google News RSS, Google Vertex AI, SerpApi, Airia API (company descriptions), YouTube (via yt-dlp)

The system handles errors gracefully, with fallbacks and mock responses when APIs are unavailable.

Challenges we ran into

  1. Polymarket API Complexity: The Gamma API structure required careful parsing of nested JSON, outcome tokens, and order book data
  2. Multi-Agent Coordination: Orchestrating asynchronous agents with proper error handling and progress tracking
  3. Video Processing: Downloading, extracting audio, and processing video content at scale while respecting rate limits
  4. API Rate Limiting: Managing rate limits across multiple APIs (Polymarket, SerpApi, YouTube) with delays and retries
  5. Vertex AI Integration: Setting up Google Cloud credentials, service accounts, and handling authentication
  6. Real-time Updates: Implementing a polling system for the frontend to show live progress without WebSockets
  7. Data Parsing: Handling inconsistent API response formats and edge cases (missing data, malformed JSON)

Accomplishments that we're proud of

  1. Working Multi-Agent System: Four specialized agents working together seamlessly
  2. Real-Time Analysis: End-to-end analysis in seconds, with live progress updates
  3. Robust Error Handling: Graceful degradation when APIs fail, ensuring the system remains functional
  4. Video Sentiment Analysis: Successfully extracting and analyzing sentiment from YouTube video content
  5. Clean Architecture: Modular design with clear separation of concerns, making it easy to add new agents
  6. Comprehensive Integration: Successfully integrated 6+ different APIs and services
  7. User-Friendly Interface: Intuitive web interface with real-time progress indicators and interactive charts

What we learned

  1. Multi-Agent Systems: Designing and orchestrating specialized agents that work together
  2. API Integration Best Practices: Handling rate limits, errors, and inconsistent response formats
  3. Asynchronous Programming: Using Python's asyncio for concurrent API calls and background tasks
  4. AI-Powered Decision Making: Using LLMs (Gemini) to synthesize multiple data sources into actionable insights
  5. Prediction Markets: Understanding how prediction markets reflect real-money sentiment differently from traditional news
  6. Video Processing: Working with yt-dlp, audio extraction, and processing multimedia content
  7. FastAPI Development: Building production-ready APIs with proper error handling, logging, and async support

What's next for MarketMinds

  1. Backtesting: Historical performance analysis to validate decision quality
  2. Portfolio Management: Track multiple positions and provide portfolio-level insights
  3. Real-Time Alerts: Push notifications for significant sentiment changes or trade opportunities
  4. Advanced ML Models: Fine-tune sentiment models on historical data for improved accuracy
  5. More Data Sources: Integrate social media (Twitter/X, Reddit), earnings calls transcripts, and SEC filings
  6. Risk Management: Add position sizing recommendations and risk-adjusted returns
  7. Mobile App: Native mobile app for on-the-go market analysis
  8. Paper Trading Integration: Connect to paper trading platforms to test strategies without real money
  9. Multi-Asset Support: Extend beyond stocks to cryptocurrencies, commodities, and forex
  10. Community Features: Allow users to share analyses and build a community around market sentiment

Built With

Share this project:

Updates