Claude Code Plugins

Community-maintained marketplace

Feedback

polymarket-trading

@Niller2005/PolyFlup
7
0

Polymarket-specific terminology, trading strategies, and API reference.

Install Skill

1Download skill
2Enable skills in Claude

Open claude.ai/settings/capabilities and find the "Skills" section

3Upload to Claude

Click "Upload skill" and select the downloaded ZIP file

Note: Please verify skill by going through its instructions before using it.

SKILL.md

name polymarket-trading
description Polymarket-specific terminology, trading strategies, and API reference.

Terminology & Concepts

  • Exit Plan: Automated limit sell at $0.99 placed as soon as position opens.
  • Hedged Reversal: Holding both UP and DOWN positions simultaneously when trend flips.
  • Midpoint Stop Loss: Market sell triggered by midpoint price dropping to/below $0.30.
  • Scale-In: Adding capital to winning positions via Market Orders (FAK).
  • Underdog: Side trading below $0.50. Requires >40% confidence for entry.
  • Tick Size: Minimum price increment allowed for a market (e.g., 0.01 or 0.001).

Strategy Nuances

Exit Plan Optimization

  • Smart Exit Pricing:
    • High confidence trades (โ‰ฅ85%): Use $0.999 exit price for maximum profit
    • Standard trades: Use $0.99 exit price (configurable via EXIT_PRICE_TARGET)
    • Only apply 0.999 for winning positions (UP side with price โ‰ฅ entry OR DOWN side with price โ‰ค entry)
  • Immediate Placement: Exit plans placed immediately after position fill (no age requirement)
  • Real-Time Size Validation: Exit order size validated every 1-second cycle
  • Repair Logic:
    • Automatic repair if exit order size mismatches database size
    • Uses 0.05 share threshold to prevent infinite repair loops from exchange rounding
    • Cancels incorrect order and places new one with correct size
  • Adoption Logic: Discovers and adopts existing SELL orders on exchange to prevent duplicates

Scale-In Strategy (Dynamic)

  • Default SCALE_IN_TIME_LEFT: 450s (7.5 minutes)
  • Dynamic early entry timing based on confidence (edge) and midpoint price:
    • 12m left: edge >= 90% and price >= $0.80
    • 9m left: edge >= 80% and price >= $0.70
    • 7m left: edge >= 70% and price >= $0.65
  • Uses Market Orders (FAK) to ensure immediate fills
  • Multiplier: 1.5x (adds 150% more capital, creating 2.5x total position)

Signal Bonuses

  • Trend Agreement Bonus: 1.1x multiplier if Binance and Polymarket trends align
  • Lead/Lag Bonus: 1.2x bonus or 0.8x penalty based on cross-exchange consistency

Technical Requirements

  • Precision: Use strict 0.0001 threshold for balance syncing
  • Minimum Size: Polymarket enforces a 5.0 share minimum for limit orders
  • Rounding: Use truncate_float(value, 2) for all order sizes to match exchange precision

Fees & Rebates (15-Minute Crypto Markets)

  • Taker Fees: Applied ONLY to 15-minute crypto markets.
  • Fee Deduction:
    • BUY: Fee is taken in Tokens from the proceeds.
    • SELL: Fee is taken in USDC from the proceeds.
  • Effective Rates:
    • Buying: Peaks at ~1.6% at $0.50 price.
    • Selling: Peaks at ~3.7% at $0.30 price. Selling is generally more expensive because USDC is taken directly.
  • Fee Precision: Rounded to 4 decimal places (min 0.0001 USDC). Small trades at extremes might be fee-free.
  • Maker Rebates: Distributed daily in USDC to makers who provide liquidity that gets filled.
  • Strategy Implications:
    • Prefer Maker orders (Limit orders that add liquidity) to avoid fees and potentially earn rebates.
    • Selling at low prices as a taker is particularly costly.

Common Code Patterns

Market Data

from src.trading.orders import get_midpoint, get_spread, check_liquidity
# Get accurate midpoint price
price = get_midpoint(token_id)
# Check if liquidity is good
if check_liquidity(token_id, size=100, warn_threshold=0.05):
    # Safe to trade

Order Placement

from src.trading.orders import place_batch_orders, place_market_order
# Batch Orders
results = place_batch_orders(orders)
# Market Sell
result = place_market_order(token_id, amount=10.0, side="SELL", order_type="FAK")

Standard Emoji Guide

Position Monitoring

  • ๐Ÿ‘€ Monitoring positions
  • ๐Ÿ“ˆ UP side position (winning if PnL positive)
  • ๐Ÿ“‰ DOWN side position (winning if PnL positive)
  • ๐Ÿ“ฆ Position size display
  • ๐Ÿงฎ PnL percentage display

Position Status

  • โฐ Exit plan active (limit sell order placed)
  • โณ Exit plan pending (waiting for conditions)
  • โญ๏ธ Exit skipped (position below MIN_SIZE threshold)
  • ๐Ÿ“Š Scaled in position indicator

Order Lifecycle

  • ๐Ÿš€ Trade execution / Entry
  • ๐ŸŽฏ Limit order placement
  • โœ… Success / Order filled
  • ๐Ÿงน Order cancellation
  • โŒ Error/Failure

Risk Management

  • ๐Ÿ›‘ Stop loss triggered
  • ๐Ÿ”„ Reversal / Trend flip
  • โš ๏ธ Warning / Validation issue
  • ๐Ÿ”ง Position repair/sync

System

  • ๐Ÿ’ฐ Money/Balance/Settlement
  • ๐ŸŒ Geographic restriction
  • ๐ŸงŸ Ghost trade detection