Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions SKILL.md
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,12 @@ Dr. Manhattan exposes all trading capabilities as MCP tools. Configure in Claude
- `stop_strategy(session_id, cleanup?)` - Stop a strategy and optionally cancel orders.
- `list_strategy_sessions` - List all active strategy sessions.

**Insider Verification:**
- `fetch_wallet_trades(exchange, wallet_address, market_id?, limit?)` - Fetch all trades for a wallet address.
- `analyze_wallet_performance(exchange, wallet_address, limit?)` - Analyze trading performance and patterns.
- `detect_insider_signals(exchange, wallet_address, market_id?, limit?)` - Detect potential insider trading signals.
- `compare_wallets(exchange, wallet_addresses, limit_per_wallet?)` - Compare trading patterns across multiple wallets.

## Common Workflows

### Find and Analyze a Market
Expand Down Expand Up @@ -168,6 +174,13 @@ Dr. Manhattan exposes all trading capabilities as MCP tools. Configure in Claude
2. `fetch_positions` to see all open positions with unrealized PnL.
3. `calculate_nav` for total portfolio value (cash + positions).

### Verify Insider Trading Activity

1. Use `fetch_wallet_trades` with a wallet address to get trading history.
2. Use `analyze_wallet_performance` to see metrics like win rate, market exposure, and timing patterns.
3. Use `detect_insider_signals` to identify suspicious patterns (market concentration, large trades, one-sided trading).
4. Use `compare_wallets` with multiple addresses to detect coordinated trading between accounts.

## Key Concepts

- **Prices are probabilities** ranging from 0 to 1 (exclusive). A price of 0.65 means the market implies a 65% chance.
Expand All @@ -182,6 +195,8 @@ Dr. Manhattan exposes all trading capabilities as MCP tools. Configure in Claude
uv run python examples/list_all_markets.py polymarket
uv run python examples/spread_strategy.py --exchange polymarket --slug fed-decision
uv run python examples/spike_strategy.py -e opinion -m 813 --spike-threshold 0.02
uv run python examples/verify_insider.py 0xWALLET_ADDRESS --detect-signals
uv run python examples/verify_insider.py --compare 0xWALLET1 0xWALLET2
```

## Data Models
Expand Down
65 changes: 65 additions & 0 deletions dr_manhattan/mcp/server.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def fix_all_loggers():
from .tools import ( # noqa: E402
account_tools,
exchange_tools,
insider_tools,
market_tools,
strategy_tools,
trading_tools,
Expand Down Expand Up @@ -515,6 +516,65 @@ async def list_tools() -> List[Tool]:
"required": ["slug"],
},
),
# Insider verification tools (4)
Tool(
name="fetch_wallet_trades",
description="Fetch all trades for a specific wallet address",
inputSchema={
"type": "object",
"properties": {
"exchange": {"type": "string", "description": "Exchange name (polymarket)"},
"wallet_address": {"type": "string", "description": "Wallet/proxy wallet address"},
"market_id": {"type": "string", "description": "Optional market filter"},
"limit": {"type": "integer", "default": 500, "description": "Max trades to fetch"},
},
"required": ["exchange", "wallet_address"],
},
),
Tool(
name="analyze_wallet_performance",
description="Analyze trading performance and patterns for a wallet",
inputSchema={
"type": "object",
"properties": {
"exchange": {"type": "string"},
"wallet_address": {"type": "string"},
"limit": {"type": "integer", "default": 500},
},
"required": ["exchange", "wallet_address"],
},
),
Tool(
name="detect_insider_signals",
description="Detect potential insider trading signals for a wallet (market concentration, large trades, timing patterns)",
inputSchema={
"type": "object",
"properties": {
"exchange": {"type": "string"},
"wallet_address": {"type": "string"},
"market_id": {"type": "string", "description": "Optional market filter"},
"limit": {"type": "integer", "default": 500},
},
"required": ["exchange", "wallet_address"],
},
),
Tool(
name="compare_wallets",
description="Compare trading patterns across multiple wallets to detect coordinated trading",
inputSchema={
"type": "object",
"properties": {
"exchange": {"type": "string"},
"wallet_addresses": {
"type": "array",
"items": {"type": "string"},
"description": "List of wallet addresses to compare (2-10)",
},
"limit_per_wallet": {"type": "integer", "default": 200},
},
"required": ["exchange", "wallet_addresses"],
},
),
]


Expand Down Expand Up @@ -556,6 +616,11 @@ async def list_tools() -> List[Tool]:
"pause_strategy": (strategy_tools.pause_strategy, True),
"resume_strategy": (strategy_tools.resume_strategy, True),
"get_strategy_metrics": (strategy_tools.get_strategy_metrics, True),
# Insider verification tools (4)
"fetch_wallet_trades": (insider_tools.fetch_wallet_trades, True),
"analyze_wallet_performance": (insider_tools.analyze_wallet_performance, True),
"detect_insider_signals": (insider_tools.detect_insider_signals, True),
"compare_wallets": (insider_tools.compare_wallets, True),
}


Expand Down
Loading
Loading