Repository navigation
Expand file tree
/
Copy path.env.example
More file actions
167 lines (127 loc) · 4.98 KB
/
Copy path.env.example
File metadata and controls
167 lines (127 loc) · 4.98 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
# PolyBot Configuration
# Copy this file to .env and fill in your values
# =============================================================================
# POLYMARKET CREDENTIALS
# =============================================================================
# Your Ethereum wallet private key (without 0x prefix)
# NEVER commit this to version control!
POLYMARKET_PRIVATE_KEY=
# Your proxy wallet address from polymarket.com (with 0x prefix)
# This is displayed on your Polymarket profile, NOT your EOA address
POLYMARKET_PROXY_ADDRESS=
# L2 API credentials (generated via L1 authentication)
# These will be auto-generated on first run if not provided
POLYMARKET_API_KEY=
POLYMARKET_API_SECRET=
POLYMARKET_API_PASSPHRASE=
# Signature type: 0=EOA, 1=POLY_PROXY, 2=GNOSIS_SAFE
# Most users should use 2 (GNOSIS_SAFE) for Polymarket proxy wallets
POLYMARKET_SIGNATURE_TYPE=2
# =============================================================================
# STRATEGY CONFIGURATION
# =============================================================================
# Arbitrage Strategy
ARB_ENABLED=false
ARB_MIN_PROFIT_PCT=0.01
ARB_POLL_INTERVAL_SEC=2
ARB_MAX_POSITION_SIZE=100
# Statistical Arbitrage Strategy
STAT_ARB_ENABLED=false
STAT_ARB_SPREAD_THRESHOLD=0.04
STAT_ARB_LOOKBACK_HOURS=24
STAT_ARB_MIN_CORRELATION=0.7
# AI Probability Model Strategy
AI_MODEL_ENABLED=false
AI_MODEL_PLUGIN=example
AI_MODEL_CONFIG={}
AI_MIN_CONFIDENCE=0.7
AI_MIN_EDGE=0.05
# Spread Farming Strategy
SPREAD_FARM_ENABLED=false
SPREAD_FARM_MIN_SPREAD=0.02
SPREAD_FARM_ORDER_SIZE=10
# Copy Trading Strategy
COPY_TRADE_ENABLED=false
COPY_TRADE_MIN_WHALE_BALANCE=100000
COPY_TRADE_PROPORTIONAL_SIZE=0.01
# =============================================================================
# RISK MANAGEMENT
# =============================================================================
MAX_POSITION_SIZE_USD=1000
MAX_TOTAL_EXPOSURE_USD=10000
DAILY_LOSS_LIMIT_USD=500
MAX_OPEN_ORDERS=50
# =============================================================================
# DATABASE
# =============================================================================
SQLITE_PATH=./data/polybot.db
DUCKDB_PATH=./data/analytics.duckdb
# =============================================================================
# API SERVER
# =============================================================================
API_HOST=127.0.0.1
API_PORT=8000
API_RELOAD=false
# =============================================================================
# NNG MESSAGING
# =============================================================================
NNG_IPC_PATH=/tmp/polybot
NNG_RECV_TIMEOUT_MS=1000
# =============================================================================
# LOGGING
# =============================================================================
LOG_LEVEL=INFO
LOG_FORMAT=json
# =============================================================================
# AUTHENTICATION (Required for production)
# =============================================================================
# Enable API authentication (set to true for production)
AUTH_ENABLED=false
# JWT secret for token signing (generate with: openssl rand -hex 32)
# REQUIRED in production when AUTH_ENABLED=true
AUTH_JWT_SECRET=
# JWT algorithm (default: HS256)
AUTH_JWT_ALGORITHM=HS256
# JWT token expiration in minutes (default: 60)
AUTH_JWT_EXPIRE_MINUTES=60
# Comma-separated SHA256 hashes of valid API keys
# Generate key: python -c "from polybot.api.auth import generate_api_key; k,h = generate_api_key(); print(f'Key: {k}\nHash: {h}')"
AUTH_API_KEYS_HASH=
# =============================================================================
# CORS CONFIGURATION
# =============================================================================
# Comma-separated allowed origins (default allows localhost dev servers)
CORS_ALLOWED_ORIGINS=http://localhost:3000,http://localhost:5173
# Allow credentials in CORS requests
CORS_ALLOW_CREDENTIALS=true
# Allowed HTTP methods
CORS_ALLOW_METHODS=GET,POST,PUT,DELETE,OPTIONS
# Allowed headers
CORS_ALLOW_HEADERS=Authorization,X-API-Key,Content-Type,Accept
# =============================================================================
# MCP SERVER (AI Agent Integration)
# =============================================================================
# Enable MCP server for AI agent integration
MCP_ENABLED=false
# MCP server host and port
MCP_HOST=127.0.0.1
MCP_PORT=3001
# AI trading mode:
# disabled - AI can only read market data
# shadow - AI can paper trade (no real money)
# live - AI can submit real orders (with approval)
MCP_AI_TRADING_MODE=shadow
# AI-specific risk limits (separate from main limits)
MCP_MAX_POSITION_USD=100
MCP_MAX_DAILY_TRADES=50
MCP_DAILY_LOSS_LIMIT_USD=200
# Approval settings for live trading
MCP_REQUIRE_APPROVAL=true
MCP_APPROVAL_TIMEOUT_SEC=300
# Rate limiting and audit
MCP_RATE_LIMIT_PER_MIN=30
MCP_AUDIT_LOG_ENABLED=true
# Strategy assessment settings
MCP_ALLOW_CODE_READ=true
MCP_ALLOW_CLI_EXECUTION=true
MCP_ASSESSMENT_LOOKBACK_DAYS=30