2026-03-30 21:00:43 +07:00
|
|
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
|
|
# polymarket-terminal — Environment Configuration
|
|
|
|
|
|
# Copy this file to .env and fill in your values
|
|
|
|
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
|
|
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# ─────────────────────────────────────────────
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# WALLET SETUP (required for all strategies)
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# ─────────────────────────────────────────────
|
2026-03-30 21:00:43 +07:00
|
|
|
|
|
|
|
|
|
|
# EOA private key — used for SIGNING only, does NOT hold funds
|
|
|
|
|
|
# Never share this key or commit it to version control
|
2026-02-23 23:03:06 +07:00
|
|
|
|
PRIVATE_KEY=0xYOUR_EOA_PRIVATE_KEY_HERE
|
2026-02-22 15:38:13 +07:00
|
|
|
|
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# Polymarket Proxy Wallet — the address shown when you click "Deposit" on Polymarket
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# This is where you deposit USDC.e and where all trades are funded from
|
|
|
|
|
|
# How to find: polymarket.com → Profile → Deposit → copy the address
|
2026-02-23 23:03:06 +07:00
|
|
|
|
PROXY_WALLET_ADDRESS=0xYOUR_PROXY_WALLET_ADDRESS_HERE
|
|
|
|
|
|
|
|
|
|
|
|
# ─────────────────────────────────────────────
|
|
|
|
|
|
# POLYGON RPC
|
|
|
|
|
|
# ─────────────────────────────────────────────
|
2026-03-30 21:00:43 +07:00
|
|
|
|
|
|
|
|
|
|
# Public RPC (default, no key required)
|
2026-02-23 23:03:06 +07:00
|
|
|
|
POLYGON_RPC_URL=https://polygon.lava.build
|
|
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# Alternative RPCs:
|
|
|
|
|
|
# POLYGON_RPC_URL=https://polygon-rpc.com
|
|
|
|
|
|
# POLYGON_RPC_URL=https://rpc.ankr.com/polygon
|
|
|
|
|
|
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# ─────────────────────────────────────────────
|
|
|
|
|
|
# POLYMARKET API CREDENTIALS (optional)
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# Leave blank to auto-derive from your private key on first run
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# ─────────────────────────────────────────────
|
2026-02-22 15:38:13 +07:00
|
|
|
|
CLOB_API_KEY=
|
|
|
|
|
|
CLOB_API_SECRET=
|
|
|
|
|
|
CLOB_API_PASSPHRASE=
|
|
|
|
|
|
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# ─────────────────────────────────────────────
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# PROXY (optional — Polymarket API only, NOT Polygon RPC)
|
|
|
|
|
|
# Supports HTTP, HTTPS, and SOCKS5 proxies
|
|
|
|
|
|
# Leave empty to connect directly
|
|
|
|
|
|
# Example: http://user:pass@proxy.example.com:8080
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# ─────────────────────────────────────────────
|
2026-03-30 21:00:43 +07:00
|
|
|
|
PROXY_URL=
|
2026-02-22 15:38:13 +07:00
|
|
|
|
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# ─────────────────────────────────────────────
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# DRY RUN — simulate without placing real orders
|
|
|
|
|
|
# Always test with DRY_RUN=true first!
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# ─────────────────────────────────────────────
|
2026-03-30 21:00:43 +07:00
|
|
|
|
DRY_RUN=true
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
|
|
# MAKER REBATE MM (npm run maker-mm-bot)
|
|
|
|
|
|
# High-frequency market-making on 15m BTC Up/Down markets.
|
|
|
|
|
|
# Places maker limit orders on both YES and NO sides, merges filled
|
|
|
|
|
|
# pairs back to USDC, and captures the bid-ask spread + maker rebate.
|
|
|
|
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
|
|
|
|
|
|
|
|
# Assets to market-make (comma-separated slugs: btc, eth, sol, xrp)
|
|
|
|
|
|
MAKER_MM_ASSETS=btc
|
|
|
|
|
|
|
|
|
|
|
|
# Market duration to target: "5m" or "15m"
|
|
|
|
|
|
MAKER_MM_DURATION=15m
|
|
|
|
|
|
|
|
|
|
|
|
# Number of shares per side per cycle (minimum 5)
|
|
|
|
|
|
# Total USDC deployed per cycle ≈ MAKER_MM_TRADE_SIZE × combined_price
|
|
|
|
|
|
MAKER_MM_TRADE_SIZE=5
|
|
|
|
|
|
|
|
|
|
|
|
# Maximum combined bid (YES + NO) — controls spread profit
|
|
|
|
|
|
# $0.98 combined = $0.02 profit per share when both fill
|
|
|
|
|
|
# Lower = more profit per pair but lower fill rate (e.g. 0.95 = $0.05/share)
|
|
|
|
|
|
MAKER_MM_MAX_COMBINED=0.98
|
|
|
|
|
|
|
|
|
|
|
|
# Reprice check interval (seconds) — how often to check for bid drift
|
|
|
|
|
|
MAKER_MM_REPRICE_SEC=10
|
|
|
|
|
|
|
|
|
|
|
|
# Minimum bid drift (in dollars) before repricing — prevents over-trading
|
|
|
|
|
|
# Default 0.02 = only reprice if best bid moved more than 2 cents
|
|
|
|
|
|
MAKER_MM_REPRICE_THRESHOLD=0.02
|
|
|
|
|
|
|
|
|
|
|
|
# Seconds before market close to force-exit open positions (cut-loss)
|
|
|
|
|
|
MAKER_MM_CUT_LOSS_TIME=60
|
|
|
|
|
|
|
|
|
|
|
|
# Max seconds after market open to enter (entry window)
|
|
|
|
|
|
# After this window, bot waits for the next market
|
|
|
|
|
|
MAKER_MM_ENTRY_WINDOW=45
|
|
|
|
|
|
|
|
|
|
|
|
# How often to poll for new markets (seconds)
|
|
|
|
|
|
MAKER_MM_POLL_INTERVAL=5
|
|
|
|
|
|
|
|
|
|
|
|
# Delay between re-entry cycles within the same market (seconds)
|
|
|
|
|
|
MAKER_MM_REENTRY_DELAY=30
|
|
|
|
|
|
|
2026-03-31 14:19:25 +07:00
|
|
|
|
# Set to false to disable re-entry — bot places one order per market then waits for next
|
|
|
|
|
|
MAKER_MM_REENTRY_ENABLED=true
|
|
|
|
|
|
|
2026-03-31 14:27:55 +07:00
|
|
|
|
# YES bid price range — bot only enters when YES bid is within this range.
|
|
|
|
|
|
# NO bid is derived from MAX_COMBINED - YES bid, and is NOT range-filtered.
|
|
|
|
|
|
# Default (balanced market): 0.30-0.69 — enters near 50/50
|
|
|
|
|
|
# Skewed market mode: 0.10-0.30 — only enters when YES is cheap (e.g. YES=11c, NO=87c)
|
2026-03-30 21:00:43 +07:00
|
|
|
|
MAKER_MM_MIN_PRICE=0.30
|
|
|
|
|
|
MAKER_MM_MAX_PRICE=0.69
|
|
|
|
|
|
|
|
|
|
|
|
# ── Current Market Entry (optional) ─────────────────────────────
|
|
|
|
|
|
# Allow entering markets that are already in progress
|
|
|
|
|
|
# Useful for catching mid-market opportunities
|
|
|
|
|
|
CURRENT_MARKET_ENABLED=true
|
|
|
|
|
|
|
|
|
|
|
|
# Maximum odds (% as decimal) to allow entry into a running market
|
|
|
|
|
|
# 0.70 = skip if either YES or NO is above 70%
|
|
|
|
|
|
CURRENT_MARKET_MAX_ODDS=0.70
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
|
|
# COPY TRADER (npm run bot)
|
|
|
|
|
|
# Mirrors trades from a target trader's Polymarket wallet.
|
|
|
|
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
|
|
|
|
|
|
|
|
# Proxy wallet address of the trader to copy
|
|
|
|
|
|
# Visible on their Polymarket profile URL
|
|
|
|
|
|
TRADER_ADDRESS=0xTRADER_PROXY_WALLET_ADDRESS
|
|
|
|
|
|
|
|
|
|
|
|
# ── Trade Sizing ─────────────────────────────────────────────────
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# SIZE_MODE:
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# "percentage" = SIZE_PERCENT% of MAX_POSITION_SIZE per entry
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# "balance" = SIZE_PERCENT% of your current USDC.e balance per entry
|
|
|
|
|
|
SIZE_MODE=balance
|
|
|
|
|
|
SIZE_PERCENT=10
|
|
|
|
|
|
|
|
|
|
|
|
# Minimum trade size in USDC (skip if calculated size is below this)
|
2026-02-22 15:38:13 +07:00
|
|
|
|
MIN_TRADE_SIZE=1
|
|
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# Maximum total USDC position per market
|
2026-02-23 23:03:06 +07:00
|
|
|
|
MAX_POSITION_SIZE=10
|
|
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# ── Auto Sell ────────────────────────────────────────────────────
|
2026-02-22 15:38:13 +07:00
|
|
|
|
AUTO_SELL_ENABLED=true
|
|
|
|
|
|
AUTO_SELL_PROFIT_PERCENT=10
|
|
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# "market" = sell immediately at market price
|
2026-02-23 23:03:06 +07:00
|
|
|
|
# "limit" = place limit order at trader's sell price
|
2026-02-22 15:38:13 +07:00
|
|
|
|
SELL_MODE=market
|
|
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# ── Intervals ────────────────────────────────────────────────────
|
2026-02-22 15:38:13 +07:00
|
|
|
|
REDEEM_INTERVAL=60
|
2026-02-25 03:18:57 +07:00
|
|
|
|
MIN_MARKET_TIME_LEFT=300
|
2026-02-25 04:30:12 +07:00
|
|
|
|
GTC_FALLBACK_TIMEOUT=60
|
|
|
|
|
|
|
2026-02-23 23:03:06 +07:00
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
|
|
# ORDERBOOK SNIPER (npm run sniper)
|
|
|
|
|
|
# Places 3-tier GTC limit buy orders at panic-dump price levels.
|
|
|
|
|
|
# ══════════════════════════════════════════════════════════════════
|
2026-02-23 23:03:06 +07:00
|
|
|
|
|
|
|
|
|
|
# Comma-separated assets to snipe
|
|
|
|
|
|
SNIPER_ASSETS=eth,sol,xrp
|
|
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# 3-Tier pricing (descending) — orders placed at these prices
|
|
|
|
|
|
SNIPER_TIER1_PRICE=0.03
|
|
|
|
|
|
SNIPER_TIER2_PRICE=0.02
|
|
|
|
|
|
SNIPER_TIER3_PRICE=0.01
|
2026-02-23 23:03:06 +07:00
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# Max total shares to deploy (split across tiers: 20% / 30% / 50%)
|
2026-03-03 14:52:37 +07:00
|
|
|
|
SNIPER_MAX_SHARES=15
|
2026-03-01 16:24:25 +07:00
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# Time-based sizing multiplier (UTC+8). Format: HH:MM-HH:MM:factor,...
|
2026-03-11 12:53:48 +07:00
|
|
|
|
SNIPER_MULTIPLIERS=21:00-00:00:1.41,06:00-12:00:0.85
|
|
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# Rounds to pause an asset after detecting a win (5-min intervals)
|
2026-03-11 12:53:48 +07:00
|
|
|
|
SNIPER_PAUSE_ROUNDS_AFTER_WIN=3
|
|
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
# Active session schedules per asset (UTC+8). Format: HH:MM-HH:MM,...
|
2026-03-01 19:07:57 +07:00
|
|
|
|
SNIPER_SCHEDULE_BTC=19:40-22:40,03:40-06:10
|
|
|
|
|
|
SNIPER_SCHEDULE_ETH=11:40-15:40,16:40-19:40
|
|
|
|
|
|
SNIPER_SCHEDULE_SOL=09:40-12:40,21:40-23:40
|
|
|
|
|
|
SNIPER_SCHEDULE_XRP=18:40-20:40,08:40-09:50
|
|
|
|
|
|
|
2026-03-30 21:00:43 +07:00
|
|
|
|
|
|
|
|
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
|
|
# CLASSIC MARKET MAKER (npm run mm-bot)
|
|
|
|
|
|
# Legacy MM strategy using limit sell orders after one leg fills.
|
|
|
|
|
|
# ══════════════════════════════════════════════════════════════════
|
|
|
|
|
|
MM_ASSETS=btc
|
|
|
|
|
|
MM_DURATION=5m
|
|
|
|
|
|
MM_TRADE_SIZE=5
|
|
|
|
|
|
MM_SELL_PRICE=0.60
|
|
|
|
|
|
MM_CUT_LOSS_TIME=60
|
|
|
|
|
|
MM_MARKET_KEYWORD=Bitcoin Up or Down
|
|
|
|
|
|
MM_ENTRY_WINDOW=45
|
|
|
|
|
|
MM_POLL_INTERVAL=10
|
|
|
|
|
|
MM_RECOVERY_BUY=false
|
|
|
|
|
|
MM_RECOVERY_THRESHOLD=0.70
|
|
|
|
|
|
MM_RECOVERY_SIZE=0
|
|
|
|
|
|
MM_ADAPTIVE_CL=true
|
|
|
|
|
|
MM_ADAPTIVE_MIN_COMBINED=1.20
|
|
|
|
|
|
MM_ADAPTIVE_MONITOR_SEC=5
|