fashionmascherine-svg/dsh-polymarket-knowhow0

dsh-polymarket-knowhow

DeepSeek Harness plugin: complete Polymarket API coverage — market data tools, authenticated trading tools, WebSocket stream service, and an embedded Polymarket knowhow skill

包名
dsh-polymarket-knowhow
版本
0.1.0
许可证
NOASSERTION
最近更新
2026年8月22日

安装

$npx -p @deepseek-ai/dsh dsh plugin --profile web add github:fashionmascherine-svg/dsh-polymarket-knowhow

Configuration

Defaults are sensible (public endpoints, no credentials, trading off). Override any field from your profile's cordis.patch.yml:

- id: polymarket-service
  config:
    timeoutMs: 20000
    maxRetries: 3
    trading:
      enabled: true
      # Explicit creds… (or leave empty to read POLY_API_KEY / POLY_SECRET /
      # POLY_PASSPHRASE / POLY_ADDRESS from the environment)
      apiKey: ''
      secret: ''
      passphrase: ''
      address: ''        # funder/proxy wallet address
      signatureType: 2   # 0 EOA · 1 POLY_PROXY · 2 GNOSIS_SAFE
    perps:
      enabled: false     # reads POLYMARKET_PROXY / POLYMARKET_SECRET env
    stream:
      enabled: false
      assetIds: []       # CLOB token ids to subscribe at startup
    skills: true         # register the embedded knowhow skill

- id: polymarket-stream
  disabled: false         # rows can be toggled individually

Trading setup

  1. Create L2 API credentials once (any method):
    • py-clob-client: ClobClient(host, key=pk, chain_id=137).create_or_derive_api_creds(), or
    • install @polymarket/clob-client into the profile and use its createOrDeriveApiKey().
  2. Put the four values in config or POLY_* environment variables.
  3. For order placement, also make the SDK resolvable and set POLY_PRIVATE_KEY:
dsh plugin --profile my-profile add @polymarket/clob-client

Read-only account tools (orders, trades, cancels, balances, heartbeat) work without the SDK — they sign requests with Node's built-in HMAC (L2 headers POLY_ADDRESS/SIGNATURE/TIMESTAMP/API_KEY/PASSPHRASE).

⚠️ Trading is real money. Heartbeats cancel all open orders after a >10s lapse; FOK/FAK BUY amount is dollars, SELL is shares. Read knowledge/order-patterns.md first.