polymarket-clob-auth-trade

Installation
SKILL.md

Polymarket Trading & Authentication Pipeline

You are an AI agent implementing a trading bot (Rust) for Polymarket. Trading requires a two-level authentication flow. Follow this pipeline strictly.

Step 1: L1 Auth (Obtain API Keys)

  • Create an EIP-712 signature using the wallet's private key.
  • EIP-712 Domain: name="Polymarket CTF Exchange", version="1", chainId=137 (must be Polygon).
  • Send headers POLY_ADDRESS, POLY_SIGNATURE, POLY_TIMESTAMP, POLY_NONCE to generate/retrieve POLY_API_KEY, secret, and passphrase.

Step 2: L2 Auth (HMAC-SHA256 for Trading)

Every POST/DELETE request to the CLOB (e.g. /order) requires an L2 signature.

  • Algorithm: HMAC-SHA256 using your API secret.
  • String to sign: timestamp + method + path + body.
  • Pass the result in the POLY_SIGNATURE header along with POLY_API_KEY and POLY_PASSPHRASE.

Step 3: Order Construction & EIP-712 Signing

Related skills
Installs
12
GitHub Stars
2
First Seen
Feb 22, 2026