Package Information
Documentation
n8n-nodes-polymarket
This is an n8n community node that provides integration with Polymarket, a decentralized prediction market platform. Discover tradeable markets, filter by categories, and access real-time market data directly in your n8n workflows.
n8n is a fair-code licensed workflow automation platform.
π¦ Installation
In n8n (Recommended)
- Go to Settings > Community Nodes
- Select Install
- Enter
n8n-nodes-polymarketin the npm package name field - Click Install
- Restart n8n
Manual Installation
npm install n8n-nodes-polymarket
After installation, restart n8n to load the new node.
β¨ Current Features (Part 1: Market Info)
π’ Available Now - Gamma API Integration
Discover and analyze prediction markets with comprehensive market data access:
5 Fetch Methods
- Get Tags List - Retrieve all market categories (Politics, Crypto, Sports, etc.)
- By Slug - Fetch specific markets or events by URL slug
- By Tags - Filter markets by category/topic
- Via Events Endpoint - Browse all active markets efficiently
- Search - Find markets using keywords
Resource Types
- Events - Groups of related markets (e.g., "2024 US Election" with multiple outcome markets)
- Markets - Individual tradeable prediction markets
Advanced Filtering
- Active/Closed/Archived status
- Pagination (limit, offset)
- Sorting (by volume, liquidity, created date, ID)
- Tag-based filtering with related tags
- Default: Active markets only (no old/closed data)
Data Retrieved
- Market questions and descriptions
- Token IDs for trading preparation
- Current outcome prices
- Trading volume and liquidity
- Market metadata and status
- Category tags and classifications
π§ Coming Soon
Part 2: Trading Operations (CLOB API) - In Development
- Create buy/sell orders (Market & Limit orders)
- Cancel orders
- View orderbook depth
- Real-time price feeds
- Order management
Part 3: User Data & Positions (Data API) - Planned
- View all positions
- Track profit/loss
- Trade history
- Portfolio analytics
- Performance metrics
π Quick Start
Example 1: Get All Market Categories
1. Add Polymarket node to workflow
2. Operation: Market Info (Gamma API)
3. Fetch Method: Get Tags List
4. Execute
Result: List of all categories with IDs (Politics, Crypto, Sports, etc.)
Example 2: Browse Active Crypto Markets
1. Operation: Market Info (Gamma API)
2. Fetch Method: By Tags
3. Resource Type: Market
4. Tag ID: 21 (Crypto - get from Tags List)
5. Filters:
- Active: Yes
- Closed: No
- Limit: 20
6. Execute
Result: Active cryptocurrency prediction markets
Example 3: Search for Specific Markets
1. Operation: Market Info (Gamma API)
2. Fetch Method: Search
3. Search Query: "bitcoin"
4. Execute
Result: All markets mentioning "bitcoin"
Example 4: Get Market Details for Trading
1. Operation: Market Info (Gamma API)
2. Fetch Method: By Slug
3. Resource Type: Market
4. Slug: bitcoin-above-100k-by-2025
5. Execute
Result: Complete market data including token IDs needed for trading
π Usage Examples
Workflow 1: Daily Market Report
Schedule (Daily 9AM)
β
Polymarket (Get Active Events)
β
Filter (volume > 100000)
β
Email (Send report)
Workflow 2: Category Monitor
Schedule (Every hour)
β
Polymarket (By Tags: Politics)
β
Sort (by volume)
β
Slack (Alert on high volume)
Workflow 3: Market Discovery Bot
Schedule (Every 30 min)
β
Polymarket (Via Events Endpoint)
β
Filter (new markets)
β
Database (Store for analysis)
Workflow 4: Price Alert System
Schedule (Every 5 min)
β
Polymarket (By Slug: specific market)
β
Compare (price vs threshold)
β
Notification (if condition met)
π― Operations Reference
Market Info (Gamma API)
| Fetch Method | Best For | Returns |
|---|---|---|
| Get Tags List | Finding categories | Tag IDs and labels |
| By Slug | Specific market/event lookup | Single result |
| By Tags | Category filtering | Markets in category |
| Via Events | Browsing all markets | Bulk market data |
| Search | Keyword search | Matching markets |
Available Filters
| Filter | Type | Default | Description |
|---|---|---|---|
| Active | Boolean | Yes | Only active markets |
| Closed | Boolean | No | Include closed markets |
| Archived | Boolean | No | Include archived markets |
| Limit | Number | 50 | Results per page |
| Offset | Number | 0 | Pagination offset |
| Order By | String | ID | Sort field |
| Sort Direction | Boolean | Descending | Sort order |
π Important Data Fields
From Market Response
{
"id": "789",
"question": "Will Bitcoin reach $100k by 2025?",
"conditionId": "0xe3b423...",
"slug": "bitcoin-100k-2025",
"clobTokenIds": [
"token_yes_id", // Index 0 = Yes outcome
"token_no_id" // Index 1 = No outcome
],
"outcomePrices": ["0.65", "0.35"],
"volume": "1000000.50",
"liquidity": "50000.00",
"active": true,
"closed": false
}
Key fields for trading prep:
clobTokenIds: Token IDs for placing ordersconditionId: Market identifieroutcomePrices: Current market pricesslug: For URL references
π API Documentation
This node integrates with Polymarket's APIs:
Gamma API (Current): Market discovery and metadata
- Base URL:
https://gamma-api.polymarket.com - Gamma API Docs
- Base URL:
CLOB API (Coming Soon): Trading operations
- Base URL:
https://clob.polymarket.com - CLOB API Docs
- Base URL:
Data API (Planned): User positions and history
- Base URL:
https://data-api.polymarket.com
- Base URL:
πΊοΈ Roadmap
β Phase 1: Market Discovery (Complete)
- Gamma API integration
- Tag-based filtering
- Search functionality
- Event and market browsing
- Advanced filtering and sorting
π¨ Phase 2: Trading Operations (In Progress)
- CLOB API authentication
- Order creation (Market & Limit)
- Order cancellation
- Orderbook access
- Real-time pricing
π Phase 3: User Data (Planned)
- Position tracking
- Trade history
- Portfolio analytics
- P&L calculations
- Performance metrics
π Phase 4: Real-time Updates (Future)
- WebSocket integration
- Live price feeds
- Order status updates
- Market notifications
π Troubleshooting
Common Issues
Getting old/closed markets
- β
Solution: Ensure filters are set to
Active: YesandClosed: No
Can't find category
- β Solution: Use "Get Tags List" to find correct tag IDs
No results returned
- β Solution: Try removing filters or increasing limit
Tag filtering not working
- β Solution: Use Tag ID (number) not tag name (string)
Enable Debug Logging
In n8n, enable debug mode to see detailed request/response data:
export N8N_LOG_LEVEL=debug
n8n start
π€ Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Development Setup
# Clone repository
git clone https://github.com/yourusername/n8n-nodes-polymarket.git
cd n8n-nodes-polymarket
# Install dependencies
npm install
# Build
npm run build
# Link for local testing
npm link
# In your n8n installation
npm link n8n-nodes-polymarket
# Restart n8n
Project Structure
n8n-nodes-polymarket/
βββ package.json
βββ tsconfig.json
βββ gulpfile.js
βββ README.md
βββ credentials/
β βββ PolymarketApi.credentials.ts
βββ nodes/
βββ Polymarket/
βββ Polymarket.node.ts
βββ polymarket.png
π License
π Resources
β οΈ Disclaimer
This is a community-developed integration and is not officially affiliated with or endorsed by Polymarket or n8n.io.
Trading Warning: Prediction markets involve risk. This tool is for informational and automation purposes. Always verify data and trade responsibly. Past performance does not guarantee future results.
π¬ Support
- π Report Issues
- π‘ Feature Requests
- π Documentation
- π¬ n8n Community Forum
π Acknowledgments
- Polymarket - Prediction market platform
- n8n - Workflow automation
- Community contributors and testers
Built with β€οΈ for the n8n community
Current Version: 1.0.0 (Part 1: Market Info)
Last Updated: January 2026

