Skip to main content

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

DomainSDK methodsMCP tools
Limit ordersctx.orders.createplace_order
Market ordersctx.orders.marketOrderplace_order
Cancel / replacectx.orders.cancel, cancelReplacecancel_order
Bulk operationsctx.orders.bulkCreate, bulkCancel, bulkplace_order, cancel_order
Orderbook readingctx.markets.orderbook, quotesget_orderbook, get_quotes
Order lifecyclectx.orders.mine, get, recentget_open_orders
Trade simulationctx.markets.simulatesimulate_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

FileDescription
SKILL.mdEntry point — order types, signing, critical rules
prompts/openai.developer.mdOpenAI-formatted system prompt
prompts/claude.system.mdClaude-formatted system prompt
prompts/full.mdUniversal format for Cursor/ChatGPT
references/orders.mdFull order API reference
references/signing.mdEIP-712 signing guide
references/order-lifecycle.mdOrder states, void reasons, fills
references/bulk-operations.mdBulk create, cancel, mixed operations