Deploy Polymarket Bot Copy-trading

Deploy a Polymarket copy-trading bot with configurable risk limits.

Deploy Polymarket Bot Copy-trading

MongoDB

mongo:8.0

Just deployed

/data/db

Just deployed

Deploy and Host Polymarket Bot Copy-trading on Railway

Polymarket Bot Copy-trading is an automated trading worker that monitors one or more Polymarket trader addresses and mirrors their actions from your own wallet. You can control risk with configurable sizing strategies (percentage, fixed, adaptive), safety limits, and daily exposure caps—making it easier to follow active traders while keeping spending within strict boundaries.

About Hosting Polymarket Bot Copy-trading

Hosting this bot on Railway deploys a long-running Node.js worker that continuously polls Polymarket’s CLOB API and executes trades from your Polygon wallet. You’ll configure environment variables for trader addresses, your wallet credentials, Polymarket API endpoints, and copy-trade risk settings. A MongoDB database is used to store processed trades and state, preventing duplicate executions and enabling basic auditing. Railway keeps the service running, restarts it on failure, and provides logs for monitoring behavior in real time.

Common Use Cases

  • Automatically mirror a specific high-activity trader while enforcing strict per-trade and daily spend limits.
  • Run the bot in preview mode to observe trade signals and validate configuration before enabling live trading.
  • Operate multiple instances (one per strategy or wallet) to compare risk profiles and performance across traders.

Dependencies for Polymarket Bot Copy-trading Hosting

  • A Polygon wallet (EOA) funded with USDC.e and a small amount of POL/MATIC for gas
  • A MongoDB instance (Railway MongoDB plugin or MongoDB Atlas)

Deployment Dependencies

Implementation Details

Recommended environment variables (example):

PREVIEW_MODE="true" # true = simulate trades only; false = execute live
PRIVATE_KEY="" # your wallet private key (without 0x prefix), sealed for security
USER_ADDRESSES="0x..." # comma separated list of trader addresses to follow
PROXY_WALLET="0x..." # your wallet address matching PRIVATE_KEY
RPC_URL="https://polygon-rpc.com" # Polygon RPC endpoint for blockchain access (preferably use a reliable provider such as Alchemy, Infura, QuickNode, etc., to avoid rate limits)
MONGO_URI="${{MongoDB.MONGO_URL}}" # MongoDB connection string
CLOB_HTTP_URL="https://clob.polymarket.com" # Polymarket CLOB HTTP API base URL
CLOB_WS_URL="wss://ws-subscriptions-clob.polymarket.com/ws" # Polymarket CLOB websocket URL
USDC_CONTRACT_ADDRESS="0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174" # official USDC.e contract on Polygon
COPY_STRATEGY="PERCENTAGE" # strategy type for copying: PERCENTAGE, FIXED or ADAPTIVE
COPY_SIZE="35.0" # amount or percentage to copy per trade (meaning depends on strategy)
MAX_ORDER_SIZE_USD="5.0" # maximum USD value per single copied trade
MIN_ORDER_SIZE_USD="1.0" # minimum USD value per trade to execute
MAX_DAILY_VOLUME_USD="50.0" # max total USD volume the bot should spend per day
MAX_POSITION_SIZE_USD="30.0" # maximum total USD exposure per individual market
FETCH_INTERVAL="1" # seconds between trade checks
TOO_OLD_TIMESTAMP="1" # ignore trades older than this many hours
REQUEST_TIMEOUT_MS="15000" # timeout in ms for API requests
NETWORK_RETRY_LIMIT="5" # number of retry attempts on network errors

Operational tips:

  • Start in PREVIEW_MODE=true to validate sizing and limits without spending funds.
  • Ensure your wallet holds USDC.e (Polygon contract 0x2791...) rather than another USDC variant.
  • Keep per-trade caps conservative when testing (e.g., MAX_ORDER_SIZE_USD=2–5).

Why Deploy Polymarket Bot Copy-trading on Railway?

Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Polymarket Bot Copy-trading on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.


Template Content

More templates in this category

View Template
Telegram JavaScript Bot
A template for Telegram bot in JavaScript using grammY

View Template
Cobalt Tools [Updated Jan ’26]
Cobalt Tools [Jan ’26] (Media Downloader, Converter & Automation) Self Host

View Template
DiscordJS bot
A basic Discord bot written in JavaScript