polymarket-paper-trader
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
| PM_TRADER_ACCOUNT | No | Named account to operate on (for multi-account support) | |
| PM_TRADER_DATA_DIR | No | Path to the data directory (default: ~/.pm-trader) |
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {
"listChanged": false
} |
| prompts | {
"listChanged": false
} |
| resources | {
"subscribe": false,
"listChanged": false
} |
| experimental | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| init_accountB | Initialize a paper trading account with starting balance (USD). Creates a new account or resets an existing one. |
| get_balanceA | Get current account balance (cash, reserved/available cash), positions value, and P&L. |
| reset_accountA | Reset account — deletes all trades, positions, and balance. |
| search_marketsC | Search Polymarket for markets matching a query string. |
| list_marketsC | List active Polymarket markets sorted by volume or liquidity. |
| get_marketA | Get detailed info for a specific market by slug or condition ID. |
| get_order_bookA | Get the live order book for a market outcome (asks and bids). |
| get_tagsA | Get all market categories/tags for filtering. |
| get_markets_by_tagB | List markets in a specific category/tag. |
| get_eventC | Get event details — a group of related markets. |
| watch_pricesC | Watch live midpoint prices for one or more markets. slugs: comma-separated market slugs or condition IDs outcomes: comma-separated outcomes (default: "yes") |
| buyB | Buy shares in a Polymarket outcome. Spends amount_usd to buy at best available prices. order_type: "fok" (fill-or-kill) or "fak" (fill-and-kill, allows partial). |
| sellB | Sell shares in a Polymarket outcome. Sells shares at best available prices. order_type: "fok" (fill-or-kill) or "fak" (fill-and-kill, allows partial). |
| portfolioB | Get all open positions with live prices and unrealized P&L. |
| historyC | Get recent trade history. |
| place_limit_orderB | Place a limit order that stays open until filled or cancelled/expired. side: "buy" or "sell" limit_price: target price between 0 and 1 order_type: "gtc" (stays open until cancelled) or "gtd" (expires at timestamp) expires_at: ISO timestamp for GTD orders (required if order_type="gtd") |
| list_ordersC | List all pending limit orders. |
| cancel_orderA | Cancel a pending limit order by ID. |
| cancel_all_ordersB | Cancel all pending limit orders at once. |
| check_ordersB | Check all pending limit orders against live prices and execute fills. Call this periodically to trigger limit order evaluation. |
| statsC | Get performance analytics: win rate, ROI, profit, max drawdown. |
| stats_cardA | Get a shareable stats card — ready to post on X, Telegram, Discord, etc. Returns a formatted card showing ROI, Sharpe, win rate, P&L. format: "tweet" (X/Twitter optimized), "markdown" (chat apps), "plain" (no formatting) |
| leaderboard_entryC | Generate a verifiable leaderboard entry for ranking and PK. Returns standardized JSON with ROI%, Sharpe, win rate, trade count, max drawdown, and account metadata. Designed for fair comparison: includes starting balance, total trades, and account age. |
| share_contentA | Generate shareable content optimized for a specific platform and template. platform: "twitter" (X), "telegram", "discord", "plain" template: "performance" (stats overview), "milestone" (achievement), "daily" (daily report with positions) Each platform gets appropriately formatted content with hashtags and install CTA. |
| pk_cardA | Generate a head-to-head PK comparison card between two accounts. Compares ROI, Sharpe, win rate, trades, and tier. Outputs a tweet-ready card with winner announcement. Great for rivalry and sharing. |
| leaderboard_cardA | Generate a Top 10 leaderboard card from all local accounts. Ranks all qualified accounts (10+ trades) by ROI%. If accounts is provided (comma-separated), only include those accounts. Otherwise scans all accounts in ~/.pm-trader/. |
| pk_battleA | Run two strategies head-to-head in a PK battle. Both start with the same balance. Each strategy runs independently, then results are compared with a PK card and winner announced. strategy_a/b: dotted Python path like "examples.momentum.run" name_a/b: display names for the PK card |
| resolveB | Resolve a market's positions, paying out $1/share for winning outcome. |
| resolve_allC | Resolve all open positions in closed/resolved markets. |
| backtestB | Run a backtest with historical price data. data_path: path to CSV or JSON file with historical prices strategy_path: dotted Python path to strategy function (e.g. "mymod.my_strategy") balance: starting balance (USD) spread: synthetic order book spread depth: synthetic order book depth per level |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
| trading_playbook | The full pm-trader trading methodology and workflow guide. |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
| trading_playbook | The full pm-trader trading methodology and workflow guide. |
TDQS
Scored across 30 tools
Core trading tools are mostly distinct, but there is real overlap between get_balance and portfolio (both surface positions and P&L), and the cluster of stats_card, leaderboard_card, pk_card, leaderboard_entry, and share_content all produce shareable performance content. Descriptions help, but an agent could easily choose the wrong analytics/presentation tool.
There are consistent subfamilies like get_market/get_order_book/get_event and list_orders/cancel_order/cancel_all_orders, but the overall set mixes bare verbs (buy, sell, resolve), nouns (portfolio, history, stats), and noun_noun compounds (leaderboard_card, pk_battle). No single naming convention governs the full surface.
With 30 tools, the server is over-scoped for a paper trading tool; many of the card/share/leaderboard tools could be consolidated into fewer general-purpose tools. The core trading functionality is solid, but the surface feels padded with social and vanity-format variants.
The paper trading lifecycle is well covered: account init/reset/balance, market data, market orders, limit orders, positions/history, resolution, and backtesting. Minor gaps exist such as no deposit/withdraw or order modification, but agents can complete real trading workflows without dead ends.