# ============================================================================= # Polymarket Crypto Trading Bot Configuration # ============================================================================= # Copy this file to .env and fill in your values: # cp .env.example .env # # NEVER commit .env with real keys to git! # ============================================================================= # ============================================================================= # WALLET CREDENTIALS (REQUIRED) # ============================================================================= # Your Polygon wallet private key # Format: 64 hex characters with 0x prefix (66 characters total) # How to get: # - MetaMask: Settings -> Security & Privacy -> Export Private Key # - Polymarket UI: polymarket.com/settings -> Export Private Key # # WARNING: Never share this key or commit it to git! PRIVATE_KEY=0x0000000000000000000000000000000000000000000000000000000000000000 # Proxy/funder wallet address # Required ONLY for SIGNATURE_TYPE 1 or 2 # Leave empty for type 0 (EOA) # How to get: polymarket.com/settings -> Your Wallet Address FUNDER_ADDRESS= # ============================================================================= # SIGNATURE TYPE (REQUIRED) # ============================================================================= # Determines how to sign transactions for Polymarket # # 0 = EOA (Externally Owned Account) # - You created the wallet yourself (MetaMask, Ledger, etc.) # - Did not register on Polymarket UI # - FUNDER_ADDRESS not needed # # 1 = POLY_PROXY (Magic Link / Email) # - You registered on Polymarket via email # - Requires FUNDER_ADDRESS (proxy address from Polymarket) # # 2 = POLY_GNOSIS_SAFE (MetaMask / Phantom / Browser Wallet) # - You registered on Polymarket via browser wallet # - Requires FUNDER_ADDRESS (Safe address from Polymarket) # SIGNATURE_TYPE=2 #use 2 otherwise it wont work, if you want to use EOA you need to first adjust the entire thing # ============================================================================= # API CREDENTIALS (OPTIONAL) # ============================================================================= # These keys are auto-generated on startup # Can be specified for reusing the same session # Generate manually: python3 generate_keys.py # POLY_API_KEY= POLY_API_SECRET= POLY_API_PASSPHRASE= # ============================================================================= # TRADING PARAMETERS (OPTIONAL) # ============================================================================= # Position size in contracts # 1 contract = ~1 USDC # Default: 10 contracts = ~$10 per trade CONTRACTS_SIZE=10 #default is 10, but you can change it to any number you want # Trade size in USDC (alternative parameter, legacy) TRADE_SIZE_USDC=5 #default is 5, but you can change it to any number you want # Timing delays REDEEM_DELAY=180 RECONNECT_COOLDOWN=0.0 # Order retry settings ORDER_RETRY_COUNT=5 ORDER_RETRY_DELAY=1.0 # ============================================================================= # TELEGRAM NOTIFICATIONS (OPTIONAL) # ============================================================================= # For receiving trade notifications in Telegram # # 1. Create a bot via @BotFather in Telegram # 2. Get the bot token # 3. Find your Chat ID via @userinfobot # TELEGRAM_BOT_TOKEN= TELEGRAM_CHAT_ID= # ============================================================================= # POLYGON RPC (RECOMMENDED) # ============================================================================= # URL for connecting to Polygon network # # Public RPCs (free, but with limits): # https://polygon-rpc.com # https://rpc.ankr.com/polygon # https://polygon-bor-rpc.publicnode.com # # Private RPCs (recommended for stability): # Alchemy: https://polygon-mainnet.g.alchemy.com/v2/YOUR_API_KEY # Infura: https://polygon-mainnet.infura.io/v3/YOUR_PROJECT_ID # QuickNode: https://your-endpoint.quiknode.pro/YOUR_API_KEY/ # # Get free API key: # - Alchemy: https://www.alchemy.com/ # - Ankr: https://www.ankr.com/rpc/ # RPC_URL=https://polygon-rpc.com