Polymarket¶
Polymarket is the primary venue supported by PolyBot. It's the largest crypto-native prediction market, built on the Polygon blockchain.
Overview¶
| Feature | Details |
|---|---|
| Type | Crypto prediction market |
| Blockchain | Polygon (MATIC) |
| Settlement | USDC |
| Regulation | Offshore (not US-regulated) |
| Volume | $3+ billion monthly |
Setup¶
1. Create a Polymarket Account¶
- Visit polymarket.com
- Connect your Ethereum wallet
- Deposit USDC to your Polymarket proxy wallet
2. Get Your Credentials¶
# Your wallet private key (keep secret!)
POLYMARKET_PRIVATE_KEY=your_private_key_without_0x
# Your proxy address (shown in Polymarket profile)
POLYMARKET_PROXY_ADDRESS=0x...
3. Generate API Credentials¶
This will output:
Add these to your .env:
Configuration¶
# Signature type (most users use 2)
# 0=EOA, 1=POLY_PROXY, 2=GNOSIS_SAFE
POLYMARKET_SIGNATURE_TYPE=2
API Endpoints¶
PolyBot uses these Polymarket APIs:
| API | Purpose |
|---|---|
| CLOB | Order placement, positions |
| Gamma | Market data, events |
| Data | Historical data, trades |
| WebSocket | Real-time price updates |
Rate Limits¶
Polymarket has rate limits per 10-second window:
| Endpoint | Limit |
|---|---|
| CLOB General | 9,000 |
| CLOB Order POST | 3,500 |
| CLOB Order DELETE | 3,000 |
| Gamma General | 4,000 |
| Data API | 1,000 |
PolyBot automatically manages rate limiting.
Market Types¶
Polymarket offers:
- Binary markets - YES/NO outcomes
- Multi-outcome - Multiple possible outcomes
- Scalar markets - Numeric ranges
Most strategies focus on binary markets.
Order Types¶
Supported order types:
- Limit orders - Specify price
- Market orders - Fill at best available
- GTC - Good till cancelled
- FOK - Fill or kill
Fees¶
- Maker fee: 0% (provide liquidity)
- Taker fee: ~1% (take liquidity)
- Gas fees: Minimal on Polygon
Best Practices¶
- Start with testnet - Practice before using real funds
- Use shadow mode - Test strategies without real trades
- Monitor positions - Check the dashboard regularly
- Understand settlement - Know how markets resolve
- Check liquidity - Ensure sufficient volume before trading
Troubleshooting¶
"Invalid signature" errors¶
- Verify
POLYMARKET_SIGNATURE_TYPEmatches your wallet type - Regenerate API credentials with
polybot auth --derive
"Insufficient balance" errors¶
- Check your USDC balance on Polymarket
- Ensure funds are in your proxy wallet, not main wallet
Orders not filling¶
- Check if market has sufficient liquidity
- Verify your price is competitive
- Review order book depth