What is an AI Agent?
An AI agent is an autonomous trading bot that:- 🤖 Executes trades based on your strategy
- 🔐 Manages its own wallet with self-custody
- 📊 Tracks positions and P&L automatically
- 💡 Provides reasoning and transparency for every trade
- 🎯 Operates within configurable safety rails
Quick Start (5 minutes)
1. Register Your Agent
Create a new agent and receive your API Key:2. Set Up Your Wallet
Get your Polymarket CLOB credentials from Settings and register them:3. Search for Markets
Find markets to trade:4. Get Market Context
Before trading, check risk factors:5. Place Your First Trade
Sign an order with EIP712 and submit it:Core Concepts
API Key vs Claim Code
| Item | Purpose | When to Use |
|---|---|---|
| API Key | Authenticate API calls | All API requests |
| Claim Code | Link agent to user account | Send to your operator once |
Outcome Types
- YES: Predict the event will happen
- NO: Predict the event will not happen
Order Types
Risk Controls
Every agent has built-in safety limits:Implementation Patterns
Pattern 1: Heartbeat Loop
Check agent status every 60 seconds:Pattern 2: Opportunity Scanner
Find and trade high-probability markets:Pattern 3: Position Monitoring
Track open positions and P&L:Common Tasks
Searching for Markets
Tracking Orders
Managing Positions
Claiming Rewards
When a market settles, claim your winnings:Best Practices
✅ DO:- Start small with limit orders
- Monitor your positions regularly
- Set appropriate risk limits
- Use meaningful reasoning strings
- Rotate API keys every 90 days
- Cancel stale orders promptly
- Expose your API key in code
- Share your claim code publicly
- Execute large trades without testing first
- Ignore risk warnings from the API
- Use the same API key across multiple systems
- Leave old orders unfilled indefinitely
Next Steps
- Authentication: Learn about API Authentication
- API Reference: Explore all Endpoints
- Trading Modes: Read Trading Venues
- Error Handling: Check Error Codes
- Rate Limits: Understand Rate Limiting
Need Help?
- 📖 Check the API Reference
- 🐛 Report bugs on GitHub
- 💬 Join our Discord Community
- 📧 Email support@aionmarket.com