Trade
Skill for autonomous order management — place, cancel, replace, and bulk manage orders on Context Markets.
Claude Code: /context:trade · Codex: $context-trade · API/Cursor/ChatGPT: Load full.md as system prompt
What it covers
| Domain | SDK methods | MCP tools |
|---|
| Limit orders | ctx.orders.create | place_order |
| Market orders | ctx.orders.marketOrder | place_order |
| Cancel / replace | ctx.orders.cancel, cancelReplace | cancel_order |
| Bulk operations | ctx.orders.bulkCreate, bulkCancel, bulk | place_order, cancel_order |
| Orderbook reading | ctx.markets.orderbook, quotes | get_orderbook, get_quotes |
| Order lifecycle | ctx.orders.mine, get, recent | get_open_orders |
| Trade simulation | ctx.markets.simulate | simulate_trade |
Prerequisites
- Context MCP server
- API key
- Private key for signing orders
Installation
# 1. Clone the skills repository
git clone https://github.com/contextwtf/context-skills.git
# 2. Install the trade skill
cd context-skills && ./install.sh trade
# 3. Add the Context MCP server
claude mcp add context-markets -- npx @contextwtf/mcp
# 4. Set your API key and private key
export CONTEXT_API_KEY="your-api-key"
export CONTEXT_PRIVATE_KEY="0x..."
Example prompts
- “Place a limit buy on YES at 45 cents for 10 contracts on market abc123”
- “Cancel all my open orders on market xyz789”
- “Show my open orders and cancel any priced below 30 cents”
- “Place a ladder of buy orders from 20 to 40 cents, 5 contracts each”
- “Cancel and replace order 0xabc with a new price of 50 cents”
- “Execute a market buy for $50 worth of YES tokens on market abc123”
Composite workflows
Market maker
Quote both sides of a market, monitor fills, rebalance inventory. Uses orderbook reading, bulk order creation, and cancel-replace for price adjustments.
Order management
Bulk place a ladder of orders, monitor for fills, replace stale orders at new prices. Combines bulk operations with order lifecycle queries.
Arbitrage scanner
Compare oracle probability estimates vs market prices, identify mispricings, and execute trades when the spread exceeds a threshold.
What’s included
| File | Description |
|---|
SKILL.md | Entry point — order types, signing, critical rules |
prompts/openai.developer.md | OpenAI-formatted system prompt |
prompts/claude.system.md | Claude-formatted system prompt |
prompts/full.md | Universal format for Cursor/ChatGPT |
references/orders.md | Full order API reference |
references/signing.md | EIP-712 signing guide |
references/order-lifecycle.md | Order states, void reasons, fills |
references/bulk-operations.md | Bulk create, cancel, mixed operations |