polymarket-clob-auth-trade

Polymarket Trading & Authentication Pipeline

Safety Notice

This listing is imported from skills.sh public index metadata. Review upstream SKILL.md and repository scripts before running.

Copy this and send it to your AI assistant to learn

Install skill "polymarket-clob-auth-trade" with this command: npx skills add lubluniky/polyclaude/lubluniky-polyclaude-polymarket-clob-auth-trade

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

Build the Order struct.

CRITICAL TYPING RULES:

  • token_id obtained from Gamma API as a string ("217426..." ) must be cast to U256 for the EIP-712 signature.

  • signature_type : set 0 for EOA (standalone wallet), 1 for POLY_PROXY (Magic Link), or 2 for GNOSIS_SAFE.

  • expiration : u64 unix timestamp, or 0 for Good Till Cancelled.

Step 4: Place Order

Source Transparency

This detail page is rendered from real SKILL.md content. Trust labels are metadata-based hints, not a safety guarantee.

Related Skills

Related by shared tags or category signals.

General

polymarket-ws-streaming

No summary provided by upstream source.

Repository SourceNeeds Review
General

image-gen

Generate AI images from text prompts. Triggers on: "生成图片", "画一张", "AI图", "generate image", "配图", "create picture", "draw", "visualize", "generate an image".

Archived SourceRecently Updated
General

explainer

Create explainer videos with narration and AI-generated visuals. Triggers on: "解说视频", "explainer video", "explain this as a video", "tutorial video", "introduce X (video)", "解释一下XX(视频形式)".

Archived SourceRecently Updated
General

asr

Transcribe audio files to text using local speech recognition. Triggers on: "转录", "transcribe", "语音转文字", "ASR", "识别音频", "把这段音频转成文字".

Archived SourceRecently Updated