A Professional Polymarket Crypto Market Trading Agent - Designed for high-frequency trading strategies on short-duration prediction markets, leveraging precise timing and configurable entry rules.
Polymarket Crypto Market Bot
A Professional Polymarket Crypto Market Trading Agent : Designed for high-frequency trading strategies on short-duration prediction markets, leveraging precise timing and configurable entry rules.
Features
- Real-time monitoring of market orderbooks with 1-second granularity
- Configurable entry rules:
- Supports proxy wallets and secure private key management via
.env - Modular design for multiple assets (BTC, ETH, SOL, XRP)
- Easily extensible for advanced trading strategies
Requirements
- Node.js >= 20
- NPM >= 9
- Polygon wallet with USDC funding
- Polymarket account with access to the CLOB API
Installation
git clone https://github.com/PolyStrategy/Polymarket-Crypto-Market-Bot
cd Polymarket-Crypto-Market-Bot
npm install
Setup
- Copy
.env.exampleto.env:
cp .env.example .env
- Configure
.envwith your credentials:
POLYMARKETPRIVATEKEY=YOURPRIVATEKEY
PROXYWALLETADDRESS=0x6031b6eed1c97e853c6e0f03ad3ce3529351f96d
RPC_URL=https://polygon-mainnet.g.alchemy.com/v2/xxxxxx
- Update
config.tomlwith your trading strategy:
[market]
market_coin = "btc"
market_period = "5"
[trade_1] entry = [ { min = 10, max = 500, entryremainingsecdown = 1, entryremainingsecup = 2, amount = 5 }, { min = 20, max = 500, entryremainingsecdown = 2, entryremainingsecup = 3, amount = 5 }, { min = 40, max = 500, entryremainingsecdown = 3, entryremainingsecup = 5, amount = 5 }, ]
[monitor] proxywalletaddress = "0x6031b6eed1c97e853c6e0f03ad3ce3529351f96d" market_slug = "btc-updown-15m-1769634900"
Usage
node index.js
Bot Workflow:
- Fetch market orderbook data every second
- Calculate remaining seconds until the round ends
- Evaluate entry rules for price and timing
- Place YES/NO orders automatically when conditions are satisfied
Notes
- ⚠️ Polymarket requires EIP‑712 signed orders for secure execution
- ⚠️ Ensure your proxy wallet has sufficient USDC balance
- ⚠️ Polling is used; consider WebSocket integration for ultra-low latency
- ⚠️ High-risk strategy: test extensively before real capital deployment
Recommended Enhancements
- Real-time WebSocket market subscriptions for lower latency
- Automatic cancellation of stale or unfilled orders
- Multi-market trading support
- Advanced strategies including dynamic thresholds, hedging, and trailing exits
License
MIT License