{
  "schemaVersion": "1.0",
  "item": {
    "slug": "polymarket-sdk",
    "name": "polymarket-sdk",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/tyhouch/polymarket-sdk",
    "canonicalUrl": "https://clawhub.ai/tyhouch/polymarket-sdk",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/polymarket-sdk",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=polymarket-sdk",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.md",
      "references/api_reference.md"
    ],
    "primaryDoc": "SKILL.md",
    "quickSetup": [
      "Download the package from Yavira.",
      "Extract the archive and review SKILL.md first.",
      "Import or place the package into your OpenClaw setup."
    ],
    "agentAssist": {
      "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
      "steps": [
        "Download the package from Yavira.",
        "Extract it into a folder your agent can access.",
        "Paste one of the prompts below and point your agent at the extracted folder."
      ],
      "prompts": [
        {
          "label": "New install",
          "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
        },
        {
          "label": "Upgrade existing",
          "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
        }
      ]
    },
    "sourceHealth": {
      "source": "tencent",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-07T17:22:31.273Z",
      "expiresAt": "2026-05-14T17:22:31.273Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=afrexai-annual-report",
        "contentDisposition": "attachment; filename=\"afrexai-annual-report-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null
      },
      "scope": "source",
      "summary": "Source download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this source.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/polymarket-sdk"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    },
    "downloadPageUrl": "https://openagent3.xyz/downloads/polymarket-sdk",
    "agentPageUrl": "https://openagent3.xyz/skills/polymarket-sdk/agent",
    "manifestUrl": "https://openagent3.xyz/skills/polymarket-sdk/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/polymarket-sdk/agent.md"
  },
  "agentAssist": {
    "summary": "Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.",
    "steps": [
      "Download the package from Yavira.",
      "Extract it into a folder your agent can access.",
      "Paste one of the prompts below and point your agent at the extracted folder."
    ],
    "prompts": [
      {
        "label": "New install",
        "body": "I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Tell me what you changed and call out any manual steps you could not complete."
      },
      {
        "label": "Upgrade existing",
        "body": "I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Summarize what changed and any follow-up checks I should run."
      }
    ]
  },
  "documentation": {
    "source": "clawhub",
    "primaryDoc": "SKILL.md",
    "sections": [
      {
        "title": "Polymarket US",
        "body": "Trade and browse prediction markets via the Polymarket US API using the Python SDK."
      },
      {
        "title": "Setup",
        "body": "Ensure the SDK is installed:\n\npip install polymarket-us\n\nAPI keys are needed only for trading/portfolio endpoints. Generate at https://polymarket.us/developer\n\nStore credentials as environment variables:\n\nPOLYMARKET_KEY_ID — API key UUID\nPOLYMARKET_SECRET_KEY — Ed25519 private key (base64)"
      },
      {
        "title": "Usage",
        "body": "Write and execute Python scripts using the polymarket_us SDK. For full API details, read references/api_reference.md."
      },
      {
        "title": "Public Data (no auth)",
        "body": "from polymarket_us import PolymarketUS\nclient = PolymarketUS()\n\n# Search markets\nresults = client.search.query({\"query\": \"bitcoin\", \"limit\": 5})\n\n# Browse trending markets\nmarkets = client.markets.list({\"limit\": 10, \"orderBy\": [\"volumeNum\"], \"orderDirection\": \"desc\"})\n\n# Check price\nbbo = client.markets.bbo(\"market-slug\")\n\nclient.close()"
      },
      {
        "title": "Trading (auth required)",
        "body": "import os\nfrom polymarket_us import PolymarketUS\n\nclient = PolymarketUS(\n    key_id=os.environ[\"POLYMARKET_KEY_ID\"],\n    secret_key=os.environ[\"POLYMARKET_SECRET_KEY\"],\n)\n\n# Check balance\nbalances = client.account.balances()\n\n# View positions\npositions = client.portfolio.positions()\n\n# Preview then place order\npreview = client.orders.preview({\"request\": {\n    \"marketSlug\": \"some-market\",\n    \"intent\": \"ORDER_INTENT_BUY_LONG\",\n    \"type\": \"ORDER_TYPE_LIMIT\",\n    \"price\": {\"value\": \"0.55\", \"currency\": \"USD\"},\n    \"quantity\": 100,\n}})\n\n# Place order (ALWAYS confirm with user before executing)\norder = client.orders.create({\n    \"marketSlug\": \"some-market\",\n    \"intent\": \"ORDER_INTENT_BUY_LONG\",\n    \"type\": \"ORDER_TYPE_LIMIT\",\n    \"price\": {\"value\": \"0.55\", \"currency\": \"USD\"},\n    \"quantity\": 100,\n    \"tif\": \"TIME_IN_FORCE_GOOD_TILL_CANCEL\",\n})\n\nclient.close()"
      },
      {
        "title": "Key Rules",
        "body": "Always preview orders before placing — show the user what they're about to trade\nAlways confirm with the user before placing any order — never auto-trade\nPrice is always the YES side — to buy NO at $0.40, set price to $0.60 (1.00 - 0.40)\nIn market slugs: first team = YES, second team = NO\nValid price range: 0.001 to 0.999\nHandle errors gracefully — catch AuthenticationError, BadRequestError, RateLimitError, etc."
      },
      {
        "title": "Formatting Results",
        "body": "When presenting market data to the user:\n\nShow market title/question clearly\nDisplay YES/NO prices as percentages (e.g., 55¢ = 55% implied probability)\nFor positions, show P&L and current value\nKeep it conversational — this is prediction markets, make it fun"
      }
    ],
    "body": "Polymarket US\n\nTrade and browse prediction markets via the Polymarket US API using the Python SDK.\n\nSetup\n\nEnsure the SDK is installed:\n\npip install polymarket-us\n\n\nAPI keys are needed only for trading/portfolio endpoints. Generate at https://polymarket.us/developer\n\nStore credentials as environment variables:\n\nPOLYMARKET_KEY_ID — API key UUID\nPOLYMARKET_SECRET_KEY — Ed25519 private key (base64)\nUsage\n\nWrite and execute Python scripts using the polymarket_us SDK. For full API details, read references/api_reference.md.\n\nPublic Data (no auth)\nfrom polymarket_us import PolymarketUS\nclient = PolymarketUS()\n\n# Search markets\nresults = client.search.query({\"query\": \"bitcoin\", \"limit\": 5})\n\n# Browse trending markets\nmarkets = client.markets.list({\"limit\": 10, \"orderBy\": [\"volumeNum\"], \"orderDirection\": \"desc\"})\n\n# Check price\nbbo = client.markets.bbo(\"market-slug\")\n\nclient.close()\n\nTrading (auth required)\nimport os\nfrom polymarket_us import PolymarketUS\n\nclient = PolymarketUS(\n    key_id=os.environ[\"POLYMARKET_KEY_ID\"],\n    secret_key=os.environ[\"POLYMARKET_SECRET_KEY\"],\n)\n\n# Check balance\nbalances = client.account.balances()\n\n# View positions\npositions = client.portfolio.positions()\n\n# Preview then place order\npreview = client.orders.preview({\"request\": {\n    \"marketSlug\": \"some-market\",\n    \"intent\": \"ORDER_INTENT_BUY_LONG\",\n    \"type\": \"ORDER_TYPE_LIMIT\",\n    \"price\": {\"value\": \"0.55\", \"currency\": \"USD\"},\n    \"quantity\": 100,\n}})\n\n# Place order (ALWAYS confirm with user before executing)\norder = client.orders.create({\n    \"marketSlug\": \"some-market\",\n    \"intent\": \"ORDER_INTENT_BUY_LONG\",\n    \"type\": \"ORDER_TYPE_LIMIT\",\n    \"price\": {\"value\": \"0.55\", \"currency\": \"USD\"},\n    \"quantity\": 100,\n    \"tif\": \"TIME_IN_FORCE_GOOD_TILL_CANCEL\",\n})\n\nclient.close()\n\nKey Rules\nAlways preview orders before placing — show the user what they're about to trade\nAlways confirm with the user before placing any order — never auto-trade\nPrice is always the YES side — to buy NO at $0.40, set price to $0.60 (1.00 - 0.40)\nIn market slugs: first team = YES, second team = NO\nValid price range: 0.001 to 0.999\nHandle errors gracefully — catch AuthenticationError, BadRequestError, RateLimitError, etc.\nFormatting Results\n\nWhen presenting market data to the user:\n\nShow market title/question clearly\nDisplay YES/NO prices as percentages (e.g., 55¢ = 55% implied probability)\nFor positions, show P&L and current value\nKeep it conversational — this is prediction markets, make it fun"
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/tyhouch/polymarket-sdk",
    "publisherUrl": "https://clawhub.ai/tyhouch/polymarket-sdk",
    "owner": "tyhouch",
    "version": "1.0.0",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/polymarket-sdk",
    "downloadUrl": "https://openagent3.xyz/downloads/polymarket-sdk",
    "agentUrl": "https://openagent3.xyz/skills/polymarket-sdk/agent",
    "manifestUrl": "https://openagent3.xyz/skills/polymarket-sdk/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/polymarket-sdk/agent.md"
  }
}