# Send polymarket-sdk to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- 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.
## Suggested prompts
### New install

```text
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.
```
### Upgrade existing

```text
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.
```
## Machine-readable fields
```json
{
  "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": {
    "downloadUrl": "/downloads/polymarket-sdk",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=polymarket-sdk",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "SKILL.md",
      "references/api_reference.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "polymarket-sdk",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-12T13:10:52.551Z",
      "expiresAt": "2026-05-19T13:10:52.551Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=polymarket-sdk",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=polymarket-sdk",
        "contentDisposition": "attachment; filename=\"polymarket-sdk-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "polymarket-sdk"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "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."
      ]
    }
  },
  "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"
  }
}
```
## Documentation

### Polymarket US

Trade and browse prediction markets via the Polymarket US API using the Python SDK.

### Setup

Ensure the SDK is installed:

pip install polymarket-us

API keys are needed only for trading/portfolio endpoints. Generate at https://polymarket.us/developer

Store credentials as environment variables:

POLYMARKET_KEY_ID — API key UUID
POLYMARKET_SECRET_KEY — Ed25519 private key (base64)

### Usage

Write and execute Python scripts using the polymarket_us SDK. For full API details, read references/api_reference.md.

### Public Data (no auth)

from polymarket_us import PolymarketUS
client = PolymarketUS()

# Search markets
results = client.search.query({"query": "bitcoin", "limit": 5})

# Browse trending markets
markets = client.markets.list({"limit": 10, "orderBy": ["volumeNum"], "orderDirection": "desc"})

# Check price
bbo = client.markets.bbo("market-slug")

client.close()

### Trading (auth required)

import os
from polymarket_us import PolymarketUS

client = PolymarketUS(
    key_id=os.environ["POLYMARKET_KEY_ID"],
    secret_key=os.environ["POLYMARKET_SECRET_KEY"],
)

# Check balance
balances = client.account.balances()

# View positions
positions = client.portfolio.positions()

# Preview then place order
preview = client.orders.preview({"request": {
    "marketSlug": "some-market",
    "intent": "ORDER_INTENT_BUY_LONG",
    "type": "ORDER_TYPE_LIMIT",
    "price": {"value": "0.55", "currency": "USD"},
    "quantity": 100,
}})

# Place order (ALWAYS confirm with user before executing)
order = client.orders.create({
    "marketSlug": "some-market",
    "intent": "ORDER_INTENT_BUY_LONG",
    "type": "ORDER_TYPE_LIMIT",
    "price": {"value": "0.55", "currency": "USD"},
    "quantity": 100,
    "tif": "TIME_IN_FORCE_GOOD_TILL_CANCEL",
})

client.close()

### Key Rules

Always preview orders before placing — show the user what they're about to trade
Always confirm with the user before placing any order — never auto-trade
Price is always the YES side — to buy NO at $0.40, set price to $0.60 (1.00 - 0.40)
In market slugs: first team = YES, second team = NO
Valid price range: 0.001 to 0.999
Handle errors gracefully — catch AuthenticationError, BadRequestError, RateLimitError, etc.

### Formatting Results

When presenting market data to the user:

Show market title/question clearly
Display YES/NO prices as percentages (e.g., 55¢ = 55% implied probability)
For positions, show P&L and current value
Keep it conversational — this is prediction markets, make it fun
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: tyhouch
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-12T13:10:52.551Z
- Expires at: 2026-05-19T13:10:52.551Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/polymarket-sdk)
- [Send to Agent page](https://openagent3.xyz/skills/polymarket-sdk/agent)
- [JSON manifest](https://openagent3.xyz/skills/polymarket-sdk/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/polymarket-sdk/agent.md)
- [Download page](https://openagent3.xyz/downloads/polymarket-sdk)