Back to list
KevinGastelum

interacting-with-polymarket

by KevinGastelum

0🍴 0📅 Jan 18, 2026

SKILL.md


name: interacting-with-polymarket description: Manages interactions with the Polymarket API (CLOB/Gamma) to fetch markets, odds, and order books. Use when the user wants to get betting data or trade programmatically.

Interacting with Polymarket

When to use this skill

  • User asks to "fetch markets" or "get odds" from Polymarket.
  • User needs to understand the Polymarket CLOB (Central Limit Order Book) API.
  • User wants to check liquidity, volume, or open interest for specific events.
  • Debugging API authentication or rate limits related to Polymarket.

Workflow

  • Identify Endpoint: Determine if we need Basic Market Data (Gamma API) or Trading/Orderbook Data (CLOB API).
  • Auth Check: If trading or fetching private data, verify POLY_API_KEY, POLY_SECRET, and POLY_PASSPHRASE are in .env.
  • Fetch: Use the worker (Go) for high-performance scraping or model (Python) for ad-hoc analysis.
  • Parse: Ensure types match the strict schemas in worker/internal/polymarket/types.go (if exists) or create them.

Instructions

1. API Selection Heuristic

  • Gamma API (GraphQL/REST): Use for discovering markets, getting historical prices, and reading resolved states. No auth usually required for public data.
    • Endpoint: https://gamma-api.polymarket.com/query
  • CLOB API: Use for placing orders, getting precise order book depth, and account balances.
    • Endpoint: https://clob.polymarket.com/

2. Common Operations (Go Example)

When implementing in the worker:

// Construct the request with proper headers
req, _ := http.NewRequest("GET", "https://clob.polymarket.com/markets/" + tokenID, nil)
req.Header.Add("Content-Type", "application/json")
// ... handle response

3. Data Structures

Polymarket uses large integers for token amounts (Wei). Always handle decimals carefully.

  • TokenID: String (hex)
  • OutcomeIndex: Integer (0 or 1 usually for Binary markets)

Resources

Score

Total Score

40/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon