A powerful Chrome extension that extracts betting information from Polymarket event pages and generates AI-friendly prompts for Kelly Criterion-based betting strategies and arbitrage opportunities.
- Smart Page Detection: Automatically detects Polymarket event pages and enables/disables accordingly
- Data Extraction: Intelligently extracts event titles, market data, odds, and resolution rules
- AI-Optimized Prompts: Generates comprehensive prompts for AI trading assistants
- Template Customization: Edit and save custom prompt templates with placeholder support
- Clipboard Integration: One-click copying of generated prompts
- Dark/Light Theme: Automatic theme adaptation based on system preferences
- Maximum Permissions: Configured for development use with localhost and local network access
git clone <repository-url>
cd polymarket-chrome-extension
- Open Chrome and navigate to
chrome://extensions/
- Toggle "Developer mode" in the top-right corner
- You should see additional options appear
- Click "Load unpacked" button
- Navigate to and select the
polymarket-chrome-extension
folder - The extension should now appear in your extensions list
- Click the puzzle piece icon (Extensions) in Chrome's toolbar
- Find "Polymarket Strategy Generator" and click the pin icon
- The extension icon will now appear directly in your toolbar
-
Navigate to a Polymarket Event Page
- Go to any URL matching the pattern:
https://polymarket.com/event/*
- Example:
https://polymarket.com/event/fed-decision-in-july
- Go to any URL matching the pattern:
-
Extension Status Indicators
- ✅ Green dot: Active on valid Polymarket event page
- ❌ Red dot: Not on a compatible page
- 🟡 Yellow dot: Checking page status
-
Generate and Copy Prompt
- Click "Auto Copy Prompt" button
- Extension extracts page data automatically
- Generated prompt is copied to clipboard
- Paste into your preferred AI assistant
-
Access Template Editor
- Click "Edit Template" button
- Template editor opens in overlay
-
Available Placeholders
{{TITLE}}
- Betting event title{{MARKET_INFO}}
- Market data, odds, and volumes{{RULES}}
- Event resolution rules and conditions
-
Save Custom Templates
- Edit template content as needed
- Click "Save Template" to persist changes
- Use "Reset to Default" to restore original template
The extension is configured with maximum permissions for development purposes:
- Local Development: Access to
http://localhost/*
andhttp://127.0.0.1/*
- Network Testing: Access to local network
http://192.168.1.*/*
- Full Web Access: Complete internet access for data fetching
The extension extracts three key data types:
- Primary heading from the betting event page
- Fallback to meta tags if main title not found
- Betting options and outcomes
- Current odds and probabilities
- Trading volumes
- Buy/sell prices for Yes/No positions
- Event resolution criteria
- Source information and deadlines
- Special conditions and edge cases
The extension includes a comprehensive default template that instructs AI assistants to:
-
Market Assessment
- Evaluate odds and implied probabilities
- Identify market inefficiencies
- Assess liquidity patterns
-
Kelly Criterion Application
- Calculate optimal bet sizing
- Consider multiple confidence scenarios
- Factor in bankroll management
-
Arbitrage Strategy
- Specific entry/exit points
- Limit order recommendations
- Take-profit and stop-loss levels
-
Risk Management
- Timeline-based adjustments
- Volatility considerations
- Exit strategies
-
Execution Plan
- Specific order types and prices
- Timing recommendations
- Profit-taking milestones
- Verify you're on a
polymarket.com/event/*
page - Check that extension is enabled in
chrome://extensions/
- Try refreshing the page and reopening extension popup
- Ensure page has fully loaded before clicking "Auto Copy Prompt"
- Check browser console for any JavaScript errors
- Try on different Polymarket event pages to isolate issues
- Use "Reset to Default" if custom template causes issues
- Ensure all placeholders (
{{TITLE}}
,{{MARKET_INFO}}
,{{RULES}}
) are present - Check template syntax for any malformed content
- Grant clipboard permissions when prompted
- Manually copy from browser console if automatic copy fails
- Check that popup has focus when clicking copy button
This extension requests extensive permissions for development flexibility:
- Active Tab: Access current tab information
- Storage: Save custom templates locally
- Clipboard: Copy generated prompts
- All Hosts: Maximum access for development and testing
Note: In production use, permissions should be reduced to only necessary domains.
- Manifest V3: Uses latest Chrome extension standards
- Content Scripts: Inject into Polymarket pages for data extraction
- Service Worker: Background script for extension management
- Popup Interface: Modern, responsive UI with dark/light theme support
- Chrome 88+ (Manifest V3 support required)
- Chromium-based browsers (Edge, Brave, etc.)
polymarket-chrome-extension/
├── manifest.json # Extension configuration
├── popup.html # Main popup interface
├── popup.css # Styling for popup
├── popup.js # Popup functionality
├── content.js # Page data extraction
├── background.js # Service worker
├── icons/ # Extension icons (16x16 to 128x128)
└── README.md # This documentation
The extension uses multiple fallback selectors to extract data from Polymarket's dynamic React interface:
- CSS class-based selectors for direct targeting
- Attribute-based selectors for stability
- Text content searching for resilience
- Meta tag fallbacks for reliability
Comprehensive error handling includes:
- Network request failures
- Missing page elements
- Clipboard API limitations
- Storage quota exceeded scenarios
- Lazy loading of heavy operations
- Debounced DOM queries
- Efficient selector strategies
- Minimal memory footprint
To contribute to this extension:
- Fork the repository
- Create feature branch
- Test thoroughly on multiple Polymarket pages
- Submit pull request with detailed description
This extension is provided as-is for educational and development purposes. Users are responsible for compliance with Polymarket's terms of service and applicable regulations.