agentleFS
joinQuantishjoinQuantish/skills/skills/polymarket-trading/SKILL.md

polymarket-trading

Skill13 starsChanged 9 months agoMITView on GitHub

Trade prediction markets on Polymarket via Quantish MCP

3 other projects use a version of this.

Adopted by

Most recently taken up by

  • Other versions3 projects use a version of this.

    Word for word · 0

    None found.

    Edited · 0

    None found.

    Wrote their own version · 3

    1. BlockRunAI/ClawRouter★ 6.7ksame name
    2. BlockRunAI/blockrun-mcp★ 389same name
    3. machina-sports/sports-skills★ 266same name

    How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.

  • In this repository3 other files it gives its agents.

The file

We split this skill into the rules it gives an agent

4 rules. 0 are common, 2 are distinctive, and 2 are very specific to this project.

  • 0

    Common

    Most of the 3 edited versions we read keep these.

  • 2

    Distinctive

    This author's own choices. Worth a look.

  • 2

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Run /quantish-mcp-setup first to connect to the MCP servers.

    line 15
  2. Distinctive:

    If you hold both YES and NO tokens, merge them back to USDC:

    line 202
  3. Very specific:

    Verify fills: - Use get_positions not just order status

    line 230
  4. Distinctive:

    Check balances: - Ensure sufficient USDC before trading

    line 231

“Common” is measured: kept by at least 6 in 10 of the 3 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Polymarket Trading Skill

Complete guide to trading on Polymarket through the Quantish MCP server.

Prerequisites

Run /quantish-mcp-setup first to connect to the MCP servers.

Trading Workflow

1. Check Wallet Status

mcp__quantish__get_wallet_status

Response fields:

  • safeAddress: Your trading wallet (Polygon)
  • safeDeployed: Must be true
  • approvals: All should be true (usdc, ctf, negRisk)
  • isReady: Must be true to trade

2. Check Balances

mcp__quantish__get_balances

Response:

{
  "safe": {
    "address": "0x...",
    "usdc": "10.0",      // Available to trade
    "nativeUsdc": "0.0"  // Circle USDC (different token)
  }
}

3. Find Markets via Discovery

Use the Discovery MCP to search for markets across all platforms.

mcp__quantish-discovery__search_markets
  query: "government shutdown"
  platform: "polymarket"
  limit: 5

Response includes:

{
  "markets": [{
    "platform": "polymarket",
    "conditionId": "0xd5a91c9ee50ba80385283714f2a66b1e16d544a682af2af06a8f57fcf1d0233d",
    "title": "Will the government shutdown last 5 days or more?",
    "prices": [
      {"outcome": "Yes", "price": 0.45, "tokenId": "8008742846..."},
      {"outcome": "No", "price": 0.55, "tokenId": "1122334455..."}
    ]
  }]
}

Key fields:

  • conditionId: Market identifier (0x...) - needed for place_order
  • tokenId: Outcome token ID (long number) - needed for place_order
  • prices[].outcome: "Yes" or "No"
  • prices[].price: Current price (0.01-0.99)

4. Check Orderbook (IMPORTANT - DO THIS FIRST)

mcp__quantish__get_orderbook
  tokenId: "8008742846391096366381429238657491392199916771102623264605530168655505543184"

Response shows:

  • bids: Buy orders (sorted low to high)
  • asks: Sell orders (sorted high to low)
  • Best bid = highest bid price
  • Best ask = lowest ask price

ALWAYS check orderbook before placing orders to get best price.

5. Get Current Price

mcp__quantish__get_price
  tokenId: "8008742846391096366381429238657491392199916771102623264605530168655505543184"

Returns midpointPrice between best bid/ask.

6. Place Order

mcp__quantish__place_order
  conditionId: "0xd5a91c9ee50ba80385283714f2a66b1e16d544a682af2af06a8f57fcf1d0233d"
  tokenId: "8008742846391096366381429238657491392199916771102623264605530168655505543184"
  side: "BUY"
  price: 0.45
  size: 4

Parameters:

ParamTypeDescription
conditionIdstringMarket ID (from search)
tokenIdstringYES or NO token ID
side"BUY" or "SELL"Direction
pricenumberLimit price 0.01-0.99
sizenumberNumber of shares
orderTypestring"GTC" (default), "FOK", "FAK", "GTD"

Order Types:

  • GTC: Good Till Cancelled - rests on book, crosses spread if price allows
  • FOK: Fill Or Kill - must fill entirely or fails
  • FAK: Fill And Kill - fills what it can, cancels rest
  • GTD: Good Till Date - requires expiration timestamp

Cost calculation: price × size = USDC cost

Response:

{
  "success": true,
  "orderId": "f3a665c9-...",
  "status": "LIVE",  // or "FILLED"
  "message": "Order is live: BUY 4 shares at $0.45"
}

7. Check Positions

mcp__quantish__get_positions

Response:

{
  "positions": [{
    "outcome": "Yes",
    "size": 4,
    "avgPrice": 0.45,
    "currentPrice": 0.43,
    "currentValue": 1.72,
    "pnl": -0.08,
    "marketTitle": "Will the government shutdown last 5 days or more?"
  }]
}

8. Check Orders

mcp__quantish__get_orders
  status: "LIVE"  // optional: PENDING, LIVE, FILLED, CANCELLED, FAILED

9. Cancel Order

mcp__quantish__cancel_order
  orderId: "f3a665c9-..."

10. Sync Order Status

mcp__quantish__sync_order_status
  orderId: "f3a665c9-..."

Note: May show sizeMatched: 0 due to API lag even if filled. Use get_positions to confirm.

11. Claim Winnings (After Market Resolves)

mcp__quantish__get_claimable_winnings
mcp__quantish__claim_winnings
  positionId: "..."  // optional, claims all if omitted

Advanced Operations

Merge Tokens (Exit Position at $1)

If you hold both YES and NO tokens, merge them back to USDC:

mcp__quantish__merge_tokens
  conditionId: "0x..."

Transfer USDC

mcp__quantish__transfer_usdc
  toAddress: "0x..."
  amount: 5.0

Get Deposit Addresses

mcp__quantish__get_deposit_addresses

Supports deposits from Ethereum, Polygon, Arbitrum, Optimism, Base, Solana, and Bitcoin.

Best Practices

  1. Always check orderbook first - Know the spread before placing orders
  2. Use limit orders - GTC orders get price improvement
  3. Start small - $1-2 trades until comfortable
  4. Verify fills - Use get_positions not just order status
  5. Check balances - Ensure sufficient USDC before trading

Error Handling

ErrorCauseFix
"not enough balance"Insufficient USDCDeposit more or reduce size
"order failed"Price movedCheck orderbook, adjust price
"invalid token"Wrong tokenIdGet fresh market data

Example: Complete Trade Flow

1. get_wallet_status → Confirm ready
2. get_balances → Check USDC
3. search_markets → Find market
4. get_orderbook → See bid/ask spread
5. place_order → Execute trade
6. get_positions → Verify fill

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.