A free, open-source web tool for analyzing Polymarket trading activities.
For any Polymarket wallet address, you can:
- 📊 View complete trade history - See all buy/sell records with timestamps, prices, and amounts
- 💰 Calculate profit & loss - Know exactly how much you earned or lost (realized + unrealized PnL)
- 🏷️ Identify Maker/Taker roles - Determine if you provided liquidity (Maker) or took liquidity (Taker) in each trade
- 📈 Generate visual charts - Price charts, position changes, cumulative PnL over time
- 🔗 Detect on-chain operations - Track Split, Merge, Redeem, and Convert activities
- 📥 Export data - Download trade data as JSON for further analysis
Supports two query modes:
- Quick Query - Analyze a single market
- Multi-Market Query - Batch analyze all sub-markets within an event (e.g., election predictions with multiple candidates)
- Maker/Taker Analysis: Uses on-chain transaction receipts to accurately determine your role
- Multi-Source Detection: Identifies trade sources (Direct, Neg-Risk, Split, Merge, Transfer, Redeem)
- Real-time Positions: Shows current holdings and unrealized gains/losses
- Multi-language: English and Chinese interface
- No Login Required: Just enter a wallet address and market URL
- 100% Free: No paid APIs used, all data from public endpoints
This tool uses free public RPC endpoints (polygon-rpc.com) for on-chain data queries.
- Query speed may be slow for wallets with many transactions (e.g., 500 trades could take 5-10 minutes)
- No API keys required, but public RPC has rate limits
- For better performance, you can replace
POLYGON_RPC_URLin the code with a paid RPC provider (Alchemy, Infura, etc.)
(Add your screenshots here)
- Python 3.8+
- pip
- Clone the repository:
git clone https://github.com/yourusername/polymarket-trade-tracker.git
cd polymarket-trade-tracker- Install dependencies:
pip install -r requirements.txt- (Optional) Set environment variables:
# Linux/macOS
export ADMIN_PATH='your_custom_admin_path'
# Windows
set ADMIN_PATH=your_custom_admin_path- Run the application:
python app.py- Open your browser and visit:
http://127.0.0.1:5000
- Enter the Polymarket market URL
- Enter the wallet address to analyze
- Click "Start Analysis"
- View the generated report with charts and statistics
- Enter the Polymarket event URL (with multiple sub-markets)
- Enter the wallet address
- Select the sub-markets to analyze
- Click "Start Analysis"
- View batch analysis results
- Backend: Flask (Python)
- Frontend: HTML, Tailwind CSS, JavaScript
- Charts: Matplotlib
- Data Sources:
- Polymarket Gamma API
- Polymarket CLOB API
- Polygon RPC (for on-chain data)
This tool uses the following public APIs:
gamma-api.polymarket.com- Market datadata-api.polymarket.com- Trading activityclob.polymarket.com- Order book datapolygon-rpc.com- Blockchain data
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License - see the LICENSE file for details.
This tool is for informational purposes only. It is not financial advice. Always do your own research before making any trading decisions.
- Polymarket for providing the prediction market platform
- Gnosis Conditional Tokens for the underlying protocol