{
  "schemaVersion": "1.0",
  "item": {
    "slug": "vincentpolymarket",
    "name": "Vincent - Polymarket",
    "source": "tencent",
    "type": "skill",
    "category": "AI 智能",
    "sourceUrl": "https://clawhub.ai/glitch003/vincentpolymarket",
    "canonicalUrl": "https://clawhub.ai/glitch003/vincentpolymarket",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadMode": "redirect",
    "downloadUrl": "/downloads/vincentpolymarket",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=vincentpolymarket",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "installMethod": "Manual import",
    "extraction": "Extract archive",
    "prerequisites": [
      "OpenClaw"
    ],
    "packageFormat": "ZIP package",
    "includedAssets": [
      "SKILL.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",
      "slug": "vincentpolymarket",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-04T09:10:23.070Z",
      "expiresAt": "2026-05-11T09:10:23.070Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=vincentpolymarket",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=vincentpolymarket",
        "contentDisposition": "attachment; filename=\"vincentpolymarket-1.0.70.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "vincentpolymarket"
      },
      "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/vincentpolymarket"
    },
    "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/vincentpolymarket",
    "agentPageUrl": "https://openagent3.xyz/skills/vincentpolymarket/agent",
    "manifestUrl": "https://openagent3.xyz/skills/vincentpolymarket/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/vincentpolymarket/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": "Vincent - Polymarket for agents",
        "body": "Use this skill to create a Polymarket wallet for your agent and trade on prediction markets. Browse markets, place bets, track holdings, and manage orders — all without exposing private keys to the agent. Wallets use Gnosis Safe on Polygon with gasless trading through Polymarket's relayer.\n\nThe agent never sees the private key. All operations are executed server-side. The agent receives a scoped API key that can only perform actions permitted by the wallet owner's policies. The private key never leaves the Vincent server.\n\nAll commands use the @vincentai/cli package. API keys are stored and resolved automatically — you never handle raw keys or file paths."
      },
      {
        "title": "Security Model",
        "body": "This skill is designed for autonomous agent trading with human oversight via server-side controls. Understanding this model is important:\n\nNo environment variables are required because this skill uses agent-first onboarding: the agent creates its own Polymarket wallet at runtime by calling the Vincent API, which returns a scoped API key. There is no pre-existing credential to configure. The CLI stores the returned API key automatically during wallet creation. The config paths where the key is persisted (${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/credentials/agentwallet/ or ./agentwallet/) are declared in this skill's metadata.\n\nThe agent's API key is not a private key. It is a scoped Bearer token that can only execute actions within the policies set by the wallet owner. The Vincent server enforces all policies server-side — the agent cannot bypass them regardless of what it sends. If a trade violates a policy, the server rejects it. If a trade requires approval, the server holds it and notifies the wallet owner via Telegram for out-of-band human approval.\n\nModel invocation is intentionally enabled. The purpose of this skill is to give AI agents autonomous Polymarket trading capabilities. The agent is expected to invoke trading actions (browse markets, place bets, manage positions) on its own, within the boundaries the human operator defines. The human controls what the agent can do through policies (spending limits, approval thresholds) — not by gating individual invocations. The stored key is scoped and policy-constrained — even if another process reads it, it can only perform actions the wallet owner's policies allow, and the owner can revoke it instantly.\n\nAll API calls go exclusively to heyvincent.ai over HTTPS/TLS. No other endpoints, services, or external hosts are contacted. The agent does not read, collect, or transmit any data beyond what is needed for Polymarket wallet operations.\n\nKey lifecycle:\n\nCreation: The agent runs secret create — the CLI stores the API key automatically and returns a keyId and claimUrl.\nClaim: The human operator uses the claim URL to take ownership and configure policies at https://heyvincent.ai.\nRevocation: The wallet owner can revoke the agent's API key at any time from the Vincent frontend. Revoked keys are rejected immediately by the server.\nRe-linking: If the agent loses its API key, the wallet owner generates a one-time re-link token and the agent exchanges it for a new key via secret relink.\nRotation: The wallet owner can revoke the current key and issue a re-link token to rotate credentials at any time."
      },
      {
        "title": "1. Check for Existing Keys",
        "body": "Before creating a new wallet, check if one already exists:\n\nnpx @vincentai/cli@latest secret list --type POLYMARKET_WALLET\n\nIf a key is returned, use its id as the --key-id for all subsequent commands. If no keys exist, create a new wallet."
      },
      {
        "title": "2. Create a Polymarket Wallet",
        "body": "npx @vincentai/cli@latest secret create --type POLYMARKET_WALLET --memo \"My prediction market wallet\"\n\nReturns keyId (use for all future commands), claimUrl (share with the user), and walletAddress (the EOA address; Safe is deployed lazily on first use).\n\nAfter creating, tell the user:\n\n\"Here is your wallet claim URL: <claimUrl>. Use this to claim ownership, set spending policies, and monitor your agent's wallet activity at https://heyvincent.ai.\"\n\nImportant: After creation, the wallet has no funds. The user must send USDC.e (bridged USDC) on Polygon to the Safe address before placing bets."
      },
      {
        "title": "3. Get Balance",
        "body": "npx @vincentai/cli@latest polymarket balance --key-id <KEY_ID>\n\nReturns:\n\nwalletAddress — the Safe address (deployed on first call if needed)\ncollateral.balance — USDC.e balance available for trading\ncollateral.allowance — approved amount for Polymarket contracts\n\nNote: The first balance call triggers Safe deployment and collateral approval (gasless via relayer). This may take 30-60 seconds."
      },
      {
        "title": "4. Fund the Wallet",
        "body": "Before placing bets, the user must send USDC.e to the Safe address:\n\nGet the wallet address from the balance command\nSend USDC.e (bridged USDC, contract 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174) on Polygon to that address\nMinimum $1 required per bet (Polymarket minimum)\n\nDo not send native USDC (0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359). Polymarket only accepts bridged USDC.e."
      },
      {
        "title": "5. Transfer from Vincent EVM Wallet (Alternative Funding Method)",
        "body": "If you have a Vincent EVM wallet with funds, you can transfer directly to your Polymarket wallet using the wallet transfer-between commands (see the wallet skill). Vincent verifies you own both secrets and automatically handles token conversion and cross-chain bridging to get USDC.e on Polygon.\n\n# Preview the transfer first (use your EVM wallet key-id)\nnpx @vincentai/cli@latest wallet transfer-between preview --key-id <EVM_KEY_ID> \\\n  --to-secret-id <POLYMARKET_SECRET_ID> --from-chain 8453 --to-chain 137 \\\n  --token-in 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 --amount 10 \\\n  --token-out 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 --slippage 100\n\n# Execute the transfer\nnpx @vincentai/cli@latest wallet transfer-between execute --key-id <EVM_KEY_ID> \\\n  --to-secret-id <POLYMARKET_SECRET_ID> --from-chain 8453 --to-chain 137 \\\n  --token-in 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 --amount 10 \\\n  --token-out 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 --slippage 100\n\nKey points:\n\nUse your EVM wallet's key-id (not the Polymarket key-id) for these commands\nThe --to-secret-id must be your Polymarket wallet's secret ID\nFor Polymarket destinations, only --to-chain 137 (Polygon) and --token-out 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 (USDC.e) are allowed\nThe server verifies you own both secrets — transfers to other users' wallets are rejected\nFor cross-chain transfers, check status with wallet transfer-between status --key-id <EVM_KEY_ID> --relay-id <RELAY_REQUEST_ID>"
      },
      {
        "title": "6. Browse & Search Markets",
        "body": "# Search markets by keyword (recommended)\nnpx @vincentai/cli@latest polymarket markets --key-id <KEY_ID> --query bitcoin --limit 20\n\n# Search by Polymarket URL or slug\nnpx @vincentai/cli@latest polymarket markets --key-id <KEY_ID> --slug btc-updown-5m-1771380900\n\n# Or use a full Polymarket URL as the slug parameter\nnpx @vincentai/cli@latest polymarket markets --key-id <KEY_ID> --slug https://polymarket.com/event/btc-updown-5m-1771380900\n\n# Get all active markets\nnpx @vincentai/cli@latest polymarket markets --key-id <KEY_ID> --active --limit 50\n\n# Get specific market by condition ID\nnpx @vincentai/cli@latest polymarket market --key-id <KEY_ID> --condition-id <CONDITION_ID>\n\nMarket response includes:\n\nquestion: The market question\noutcomes: Array like [\"Yes\", \"No\"] or [\"Team A\", \"Team B\"]\noutcomePrices: Current prices for each outcome\ntokenIds: Array of token IDs for each outcome — use these for placing bets\nacceptingOrders: Whether the market is open for trading\nclosed: Whether the market has resolved\n\nImportant: Always use the tokenIds array from the market response. Each outcome has a corresponding token ID at the same index. For a \"Yes/No\" market:\n\ntokenIds[0] = \"Yes\" token ID\ntokenIds[1] = \"No\" token ID"
      },
      {
        "title": "7. Get Order Book",
        "body": "npx @vincentai/cli@latest polymarket orderbook --key-id <KEY_ID> --token-id <TOKEN_ID>\n\nReturns bids and asks with prices and sizes. Use this to determine current market prices before placing orders."
      },
      {
        "title": "8. Place a Bet",
        "body": "npx @vincentai/cli@latest polymarket bet --key-id <KEY_ID> --token-id <TOKEN_ID> --side BUY --amount 5 --price 0.55\n\nParameters:\n\n--token-id: The outcome token ID (from market data or order book)\n--side: BUY or SELL\n--amount: For BUY orders, USD amount to spend. For SELL orders, number of shares to sell.\n--price: Optional limit price (0.01 to 0.99). Omit for market order. ALWAYS use a market order unless the user specifies a limit price.\n\nBUY orders:\n\namount is the USD you want to spend (e.g., 5 = $5)\nYou'll receive amount / price shares (e.g., $5 at 0.50 = 10 shares)\nMinimum order is $1\n\nSELL orders:\n\namount is the number of shares to sell\nYou'll receive amount * price USD\nMust own the shares first (from a previous BUY)\n\nImportant timing: After a BUY fills, wait a few seconds before selling. Shares need time to settle on-chain.\n\nIf a trade violates a policy, the server returns an error explaining which policy was triggered. If a trade requires human approval (based on the approval threshold policy), the server returns status: \"pending_approval\" and the wallet owner receives a Telegram notification to approve or deny."
      },
      {
        "title": "9. View Holdings, Open Orders & Trades",
        "body": "# Get current holdings with P&L (recommended for viewing positions)\nnpx @vincentai/cli@latest polymarket holdings --key-id <KEY_ID>\n\n# Get open orders (unfilled limit orders in the order book)\nnpx @vincentai/cli@latest polymarket open-orders --key-id <KEY_ID>\n\n# Filter open orders by market\nnpx @vincentai/cli@latest polymarket open-orders --key-id <KEY_ID> --market <CONDITION_ID>\n\n# Get trade history\nnpx @vincentai/cli@latest polymarket trades --key-id <KEY_ID>\n\nHoldings returns all positions with shares owned, average entry price, current price, and unrealized P&L. This is the best endpoint for:\n\nChecking current positions before placing sell orders\nSetting up stop-loss or take-profit rules\nCalculating total portfolio value and performance\nShowing the user their active bets\n\nOpen Orders returns unfilled limit orders waiting in the order book.\n\nTrades returns historical trade activity."
      },
      {
        "title": "10. Cancel Orders",
        "body": "# Cancel specific order\nnpx @vincentai/cli@latest polymarket cancel-order --key-id <KEY_ID> --order-id <ORDER_ID>\n\n# Cancel all open orders\nnpx @vincentai/cli@latest polymarket cancel-all --key-id <KEY_ID>"
      },
      {
        "title": "11. Redeem Resolved Positions",
        "body": "After a market resolves, winning positions can be redeemed to convert conditional tokens back into USDC.e. Use the holdings command to check which positions have redeemable: true, then call redeem.\n\n# Redeem all redeemable positions\nnpx @vincentai/cli@latest polymarket redeem --key-id <KEY_ID>\n\n# Redeem specific markets by condition ID\nnpx @vincentai/cli@latest polymarket redeem --key-id <KEY_ID> --condition-ids 0xabc123,0xdef456\n\nIf no positions are redeemable, redeemed will be an empty array and no transaction is submitted.\n\nHow it works: Redemption is gasless (executed via Polymarket's relayer through the Safe). For standard markets, it calls redeemPositions on the CTF contract. For negative-risk markets, it calls redeemPositions on the NegRiskAdapter. Both types are handled automatically.\n\nWhen to redeem: Check holdings periodically. After a market resolves, it may take some time before positions become redeemable. Look for redeemable: true in the holdings response."
      },
      {
        "title": "12. Withdraw USDC",
        "body": "Transfer USDC.e from your Polymarket Safe to any Ethereum address on Polygon. This is gasless — executed via Polymarket's relayer.\n\nnpx @vincentai/cli@latest polymarket withdraw --key-id <KEY_ID> --to <RECIPIENT_ADDRESS> --amount <AMOUNT>\n\nParameters:\n\n--to: Recipient Ethereum address (0x..., 42 characters)\n--amount: Amount in USDC (human-readable, e.g. \"100\" = 100 USDC)\n\nResponse:\n\nstatus: \"executed\", \"pending_approval\", or \"denied\"\ntransactionHash: Polygon transaction hash (only if executed)\nwalletAddress: The Safe address that sent the funds\n\nIf the amount exceeds the wallet's USDC balance, the server returns an INSUFFICIENT_BALANCE error. Policy checks (spending limits, approval thresholds) apply to withdrawals the same way they apply to bets."
      },
      {
        "title": "Output Format",
        "body": "CLI commands return JSON to stdout. Market search results:\n\n{\n  \"markets\": [\n    {\n      \"question\": \"Will Bitcoin exceed $100k?\",\n      \"outcomes\": [\"Yes\", \"No\"],\n      \"outcomePrices\": [\"0.65\", \"0.35\"],\n      \"tokenIds\": [\"123456...\", \"789012...\"],\n      \"acceptingOrders\": true\n    }\n  ]\n}\n\nBet placement:\n\n{\n  \"orderId\": \"0x...\",\n  \"status\": \"MATCHED\",\n  \"side\": \"BUY\",\n  \"price\": \"0.55\",\n  \"size\": \"9.09\"\n}\n\nFor trades requiring human approval:\n\n{\n  \"status\": \"pending_approval\",\n  \"message\": \"Transaction requires owner approval via Telegram\"\n}"
      },
      {
        "title": "Error Handling",
        "body": "ErrorCauseResolution401 UnauthorizedInvalid or missing API keyCheck that the key-id is correct; re-link if needed403 Policy ViolationTrade blocked by server-side policyUser must adjust policies at heyvincent.aiINSUFFICIENT_BALANCENot enough USDC.e for the tradeFund the wallet with USDC.e on Polygon429 Rate LimitedToo many requestsWait and retry with backoffpending_approvalTrade exceeds approval thresholdUser will receive Telegram notification to approve/denyNo orderbook existsMarket closed or wrong token IDVerify acceptingOrders: true and use tokenIds[], not conditionIdKey not foundAPI key was revoked or never createdRe-link with a new token from the wallet owner"
      },
      {
        "title": "Policies (Server-Side Enforcement)",
        "body": "The wallet owner controls what the agent can do by setting policies via the claim URL at https://heyvincent.ai. All policies are enforced server-side by the Vincent API — the agent cannot bypass or modify them. If a trade violates a policy, the API rejects it. If a trade triggers an approval threshold, the API holds it and sends the wallet owner a Telegram notification for out-of-band human approval.\n\nPolicyWhat it doesSpending limit (per tx)Max USD value per transactionSpending limit (daily)Max USD value per rolling 24 hoursSpending limit (weekly)Max USD value per rolling 7 daysRequire approvalEvery transaction needs human approval via TelegramApproval thresholdTransactions above a USD amount need human approval via Telegram\n\nBefore the wallet is claimed, the agent can operate without policy restrictions. This is by design: agent-first onboarding allows the agent to begin trading immediately. Once the human operator claims the wallet via the claim URL, they can add any combination of policies to constrain the agent's behavior. The wallet owner can also revoke the agent's API key entirely at any time."
      },
      {
        "title": "Re-linking (Recovering API Access)",
        "body": "If the agent loses its API key, the wallet owner can generate a re-link token from the frontend. The agent then exchanges this token for a new scoped API key.\n\nHow it works:\n\nThe user generates a re-link token from the wallet detail page at https://heyvincent.ai\nThe user gives the token to the agent (e.g. by pasting it in chat)\nThe agent runs the relink command:\n\nnpx @vincentai/cli@latest secret relink --token <TOKEN_FROM_USER>\n\nThe CLI exchanges the token for a new API key, stores it automatically, and returns the new keyId. Use this keyId for all subsequent commands.\n\nImportant: Re-link tokens are one-time use and expire after 10 minutes, so it's safe for users to send you a relink token through chat since you will immediately consume it."
      },
      {
        "title": "Workflow Example",
        "body": "Create wallet:\nnpx @vincentai/cli@latest secret create --type POLYMARKET_WALLET --memo \"Betting wallet\"\n\n\n\nGet Safe address (triggers deployment):\nnpx @vincentai/cli@latest polymarket balance --key-id <KEY_ID>\n# Returns walletAddress — give this to user to fund\n\n\n\nUser sends USDC.e to the Safe address on Polygon\n\n\nSearch for a market:\n# Search by keyword — returns only active, tradeable markets\n# Tip: use short keyword phrases; stop-words like \"or\" can cause empty results\nnpx @vincentai/cli@latest polymarket markets --key-id <KEY_ID> --query \"bitcoin up down\" --active\n\n\n\nCheck order book for the outcome you want:\nnpx @vincentai/cli@latest polymarket orderbook --key-id <KEY_ID> --token-id 123456...\n\n\n\nPlace BUY bet using the correct token ID:\n# tokenId must be from the tokenIds array, NOT the conditionId\nnpx @vincentai/cli@latest polymarket bet --key-id <KEY_ID> --token-id 123456... --side BUY --amount 5 --price 0.55\n\n\n\nWait for settlement (a few seconds)\n\n\nSell position:\nnpx @vincentai/cli@latest polymarket bet --key-id <KEY_ID> --token-id 123456... --side SELL --amount 9.09 --price 0.54\n\n\n\nRedeem after market resolves (if holding through resolution):\n# Check holdings for redeemable positions\nnpx @vincentai/cli@latest polymarket holdings --key-id <KEY_ID>\n# If redeemable: true, redeem to get USDC.e back\nnpx @vincentai/cli@latest polymarket redeem --key-id <KEY_ID>\n\n\n\nWithdraw USDC to another wallet:\nnpx @vincentai/cli@latest polymarket withdraw --key-id <KEY_ID> --to 0xRecipientAddress --amount 50"
      },
      {
        "title": "Important Notes",
        "body": "After any bet or trade, share the user's Polymarket profile link so they can verify and view their positions: https://polymarket.com/profile/<polymarketWalletAddress> (use the wallet's Safe address).\nNo gas needed. All Polymarket transactions are gasless via Polymarket's relayer.\nNever try to access raw secret values. The private key stays server-side — that's the whole point.\nAlways share the claim URL with the user after creating a wallet.\nIf a transaction is rejected, it may be blocked by a server-side policy. Tell the user to check their policy settings at https://heyvincent.ai.\nIf a transaction requires approval, it will return status: \"pending_approval\". The wallet owner will receive a Telegram notification to approve or deny.\n\nSee the Error Handling section above for a full list of common errors and resolutions."
      }
    ],
    "body": "Vincent - Polymarket for agents\n\nUse this skill to create a Polymarket wallet for your agent and trade on prediction markets. Browse markets, place bets, track holdings, and manage orders — all without exposing private keys to the agent. Wallets use Gnosis Safe on Polygon with gasless trading through Polymarket's relayer.\n\nThe agent never sees the private key. All operations are executed server-side. The agent receives a scoped API key that can only perform actions permitted by the wallet owner's policies. The private key never leaves the Vincent server.\n\nAll commands use the @vincentai/cli package. API keys are stored and resolved automatically — you never handle raw keys or file paths.\n\nSecurity Model\n\nThis skill is designed for autonomous agent trading with human oversight via server-side controls. Understanding this model is important:\n\nNo environment variables are required because this skill uses agent-first onboarding: the agent creates its own Polymarket wallet at runtime by calling the Vincent API, which returns a scoped API key. There is no pre-existing credential to configure. The CLI stores the returned API key automatically during wallet creation. The config paths where the key is persisted (${OPENCLAW_STATE_DIR:-$HOME/.openclaw}/credentials/agentwallet/ or ./agentwallet/) are declared in this skill's metadata.\n\nThe agent's API key is not a private key. It is a scoped Bearer token that can only execute actions within the policies set by the wallet owner. The Vincent server enforces all policies server-side — the agent cannot bypass them regardless of what it sends. If a trade violates a policy, the server rejects it. If a trade requires approval, the server holds it and notifies the wallet owner via Telegram for out-of-band human approval.\n\nModel invocation is intentionally enabled. The purpose of this skill is to give AI agents autonomous Polymarket trading capabilities. The agent is expected to invoke trading actions (browse markets, place bets, manage positions) on its own, within the boundaries the human operator defines. The human controls what the agent can do through policies (spending limits, approval thresholds) — not by gating individual invocations. The stored key is scoped and policy-constrained — even if another process reads it, it can only perform actions the wallet owner's policies allow, and the owner can revoke it instantly.\n\nAll API calls go exclusively to heyvincent.ai over HTTPS/TLS. No other endpoints, services, or external hosts are contacted. The agent does not read, collect, or transmit any data beyond what is needed for Polymarket wallet operations.\n\nKey lifecycle:\n\nCreation: The agent runs secret create — the CLI stores the API key automatically and returns a keyId and claimUrl.\nClaim: The human operator uses the claim URL to take ownership and configure policies at https://heyvincent.ai.\nRevocation: The wallet owner can revoke the agent's API key at any time from the Vincent frontend. Revoked keys are rejected immediately by the server.\nRe-linking: If the agent loses its API key, the wallet owner generates a one-time re-link token and the agent exchanges it for a new key via secret relink.\nRotation: The wallet owner can revoke the current key and issue a re-link token to rotate credentials at any time.\nQuick Start\n1. Check for Existing Keys\n\nBefore creating a new wallet, check if one already exists:\n\nnpx @vincentai/cli@latest secret list --type POLYMARKET_WALLET\n\n\nIf a key is returned, use its id as the --key-id for all subsequent commands. If no keys exist, create a new wallet.\n\n2. Create a Polymarket Wallet\nnpx @vincentai/cli@latest secret create --type POLYMARKET_WALLET --memo \"My prediction market wallet\"\n\n\nReturns keyId (use for all future commands), claimUrl (share with the user), and walletAddress (the EOA address; Safe is deployed lazily on first use).\n\nAfter creating, tell the user:\n\n\"Here is your wallet claim URL: <claimUrl>. Use this to claim ownership, set spending policies, and monitor your agent's wallet activity at https://heyvincent.ai.\"\n\nImportant: After creation, the wallet has no funds. The user must send USDC.e (bridged USDC) on Polygon to the Safe address before placing bets.\n\n3. Get Balance\nnpx @vincentai/cli@latest polymarket balance --key-id <KEY_ID>\n\n\nReturns:\n\nwalletAddress — the Safe address (deployed on first call if needed)\ncollateral.balance — USDC.e balance available for trading\ncollateral.allowance — approved amount for Polymarket contracts\n\nNote: The first balance call triggers Safe deployment and collateral approval (gasless via relayer). This may take 30-60 seconds.\n\n4. Fund the Wallet\n\nBefore placing bets, the user must send USDC.e to the Safe address:\n\nGet the wallet address from the balance command\nSend USDC.e (bridged USDC, contract 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174) on Polygon to that address\nMinimum $1 required per bet (Polymarket minimum)\n\nDo not send native USDC (0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359). Polymarket only accepts bridged USDC.e.\n\n5. Transfer from Vincent EVM Wallet (Alternative Funding Method)\n\nIf you have a Vincent EVM wallet with funds, you can transfer directly to your Polymarket wallet using the wallet transfer-between commands (see the wallet skill). Vincent verifies you own both secrets and automatically handles token conversion and cross-chain bridging to get USDC.e on Polygon.\n\n# Preview the transfer first (use your EVM wallet key-id)\nnpx @vincentai/cli@latest wallet transfer-between preview --key-id <EVM_KEY_ID> \\\n  --to-secret-id <POLYMARKET_SECRET_ID> --from-chain 8453 --to-chain 137 \\\n  --token-in 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 --amount 10 \\\n  --token-out 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 --slippage 100\n\n# Execute the transfer\nnpx @vincentai/cli@latest wallet transfer-between execute --key-id <EVM_KEY_ID> \\\n  --to-secret-id <POLYMARKET_SECRET_ID> --from-chain 8453 --to-chain 137 \\\n  --token-in 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913 --amount 10 \\\n  --token-out 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 --slippage 100\n\n\nKey points:\n\nUse your EVM wallet's key-id (not the Polymarket key-id) for these commands\nThe --to-secret-id must be your Polymarket wallet's secret ID\nFor Polymarket destinations, only --to-chain 137 (Polygon) and --token-out 0x2791Bca1f2de4661ED88A30C99A7a9449Aa84174 (USDC.e) are allowed\nThe server verifies you own both secrets — transfers to other users' wallets are rejected\nFor cross-chain transfers, check status with wallet transfer-between status --key-id <EVM_KEY_ID> --relay-id <RELAY_REQUEST_ID>\n6. Browse & Search Markets\n# Search markets by keyword (recommended)\nnpx @vincentai/cli@latest polymarket markets --key-id <KEY_ID> --query bitcoin --limit 20\n\n# Search by Polymarket URL or slug\nnpx @vincentai/cli@latest polymarket markets --key-id <KEY_ID> --slug btc-updown-5m-1771380900\n\n# Or use a full Polymarket URL as the slug parameter\nnpx @vincentai/cli@latest polymarket markets --key-id <KEY_ID> --slug https://polymarket.com/event/btc-updown-5m-1771380900\n\n# Get all active markets\nnpx @vincentai/cli@latest polymarket markets --key-id <KEY_ID> --active --limit 50\n\n# Get specific market by condition ID\nnpx @vincentai/cli@latest polymarket market --key-id <KEY_ID> --condition-id <CONDITION_ID>\n\n\nMarket response includes:\n\nquestion: The market question\noutcomes: Array like [\"Yes\", \"No\"] or [\"Team A\", \"Team B\"]\noutcomePrices: Current prices for each outcome\ntokenIds: Array of token IDs for each outcome — use these for placing bets\nacceptingOrders: Whether the market is open for trading\nclosed: Whether the market has resolved\n\nImportant: Always use the tokenIds array from the market response. Each outcome has a corresponding token ID at the same index. For a \"Yes/No\" market:\n\ntokenIds[0] = \"Yes\" token ID\ntokenIds[1] = \"No\" token ID\n7. Get Order Book\nnpx @vincentai/cli@latest polymarket orderbook --key-id <KEY_ID> --token-id <TOKEN_ID>\n\n\nReturns bids and asks with prices and sizes. Use this to determine current market prices before placing orders.\n\n8. Place a Bet\nnpx @vincentai/cli@latest polymarket bet --key-id <KEY_ID> --token-id <TOKEN_ID> --side BUY --amount 5 --price 0.55\n\n\nParameters:\n\n--token-id: The outcome token ID (from market data or order book)\n--side: BUY or SELL\n--amount: For BUY orders, USD amount to spend. For SELL orders, number of shares to sell.\n--price: Optional limit price (0.01 to 0.99). Omit for market order. ALWAYS use a market order unless the user specifies a limit price.\n\nBUY orders:\n\namount is the USD you want to spend (e.g., 5 = $5)\nYou'll receive amount / price shares (e.g., $5 at 0.50 = 10 shares)\nMinimum order is $1\n\nSELL orders:\n\namount is the number of shares to sell\nYou'll receive amount * price USD\nMust own the shares first (from a previous BUY)\n\nImportant timing: After a BUY fills, wait a few seconds before selling. Shares need time to settle on-chain.\n\nIf a trade violates a policy, the server returns an error explaining which policy was triggered. If a trade requires human approval (based on the approval threshold policy), the server returns status: \"pending_approval\" and the wallet owner receives a Telegram notification to approve or deny.\n\n9. View Holdings, Open Orders & Trades\n# Get current holdings with P&L (recommended for viewing positions)\nnpx @vincentai/cli@latest polymarket holdings --key-id <KEY_ID>\n\n# Get open orders (unfilled limit orders in the order book)\nnpx @vincentai/cli@latest polymarket open-orders --key-id <KEY_ID>\n\n# Filter open orders by market\nnpx @vincentai/cli@latest polymarket open-orders --key-id <KEY_ID> --market <CONDITION_ID>\n\n# Get trade history\nnpx @vincentai/cli@latest polymarket trades --key-id <KEY_ID>\n\n\nHoldings returns all positions with shares owned, average entry price, current price, and unrealized P&L. This is the best endpoint for:\n\nChecking current positions before placing sell orders\nSetting up stop-loss or take-profit rules\nCalculating total portfolio value and performance\nShowing the user their active bets\n\nOpen Orders returns unfilled limit orders waiting in the order book.\n\nTrades returns historical trade activity.\n\n10. Cancel Orders\n# Cancel specific order\nnpx @vincentai/cli@latest polymarket cancel-order --key-id <KEY_ID> --order-id <ORDER_ID>\n\n# Cancel all open orders\nnpx @vincentai/cli@latest polymarket cancel-all --key-id <KEY_ID>\n\n11. Redeem Resolved Positions\n\nAfter a market resolves, winning positions can be redeemed to convert conditional tokens back into USDC.e. Use the holdings command to check which positions have redeemable: true, then call redeem.\n\n# Redeem all redeemable positions\nnpx @vincentai/cli@latest polymarket redeem --key-id <KEY_ID>\n\n# Redeem specific markets by condition ID\nnpx @vincentai/cli@latest polymarket redeem --key-id <KEY_ID> --condition-ids 0xabc123,0xdef456\n\n\nIf no positions are redeemable, redeemed will be an empty array and no transaction is submitted.\n\nHow it works: Redemption is gasless (executed via Polymarket's relayer through the Safe). For standard markets, it calls redeemPositions on the CTF contract. For negative-risk markets, it calls redeemPositions on the NegRiskAdapter. Both types are handled automatically.\n\nWhen to redeem: Check holdings periodically. After a market resolves, it may take some time before positions become redeemable. Look for redeemable: true in the holdings response.\n\n12. Withdraw USDC\n\nTransfer USDC.e from your Polymarket Safe to any Ethereum address on Polygon. This is gasless — executed via Polymarket's relayer.\n\nnpx @vincentai/cli@latest polymarket withdraw --key-id <KEY_ID> --to <RECIPIENT_ADDRESS> --amount <AMOUNT>\n\n\nParameters:\n\n--to: Recipient Ethereum address (0x..., 42 characters)\n--amount: Amount in USDC (human-readable, e.g. \"100\" = 100 USDC)\n\nResponse:\n\nstatus: \"executed\", \"pending_approval\", or \"denied\"\ntransactionHash: Polygon transaction hash (only if executed)\nwalletAddress: The Safe address that sent the funds\n\nIf the amount exceeds the wallet's USDC balance, the server returns an INSUFFICIENT_BALANCE error. Policy checks (spending limits, approval thresholds) apply to withdrawals the same way they apply to bets.\n\nOutput Format\n\nCLI commands return JSON to stdout. Market search results:\n\n{\n  \"markets\": [\n    {\n      \"question\": \"Will Bitcoin exceed $100k?\",\n      \"outcomes\": [\"Yes\", \"No\"],\n      \"outcomePrices\": [\"0.65\", \"0.35\"],\n      \"tokenIds\": [\"123456...\", \"789012...\"],\n      \"acceptingOrders\": true\n    }\n  ]\n}\n\n\nBet placement:\n\n{\n  \"orderId\": \"0x...\",\n  \"status\": \"MATCHED\",\n  \"side\": \"BUY\",\n  \"price\": \"0.55\",\n  \"size\": \"9.09\"\n}\n\n\nFor trades requiring human approval:\n\n{\n  \"status\": \"pending_approval\",\n  \"message\": \"Transaction requires owner approval via Telegram\"\n}\n\nError Handling\nError\tCause\tResolution\n401 Unauthorized\tInvalid or missing API key\tCheck that the key-id is correct; re-link if needed\n403 Policy Violation\tTrade blocked by server-side policy\tUser must adjust policies at heyvincent.ai\nINSUFFICIENT_BALANCE\tNot enough USDC.e for the trade\tFund the wallet with USDC.e on Polygon\n429 Rate Limited\tToo many requests\tWait and retry with backoff\npending_approval\tTrade exceeds approval threshold\tUser will receive Telegram notification to approve/deny\nNo orderbook exists\tMarket closed or wrong token ID\tVerify acceptingOrders: true and use tokenIds[], not conditionId\nKey not found\tAPI key was revoked or never created\tRe-link with a new token from the wallet owner\nPolicies (Server-Side Enforcement)\n\nThe wallet owner controls what the agent can do by setting policies via the claim URL at https://heyvincent.ai. All policies are enforced server-side by the Vincent API — the agent cannot bypass or modify them. If a trade violates a policy, the API rejects it. If a trade triggers an approval threshold, the API holds it and sends the wallet owner a Telegram notification for out-of-band human approval.\n\nPolicy\tWhat it does\nSpending limit (per tx)\tMax USD value per transaction\nSpending limit (daily)\tMax USD value per rolling 24 hours\nSpending limit (weekly)\tMax USD value per rolling 7 days\nRequire approval\tEvery transaction needs human approval via Telegram\nApproval threshold\tTransactions above a USD amount need human approval via Telegram\n\nBefore the wallet is claimed, the agent can operate without policy restrictions. This is by design: agent-first onboarding allows the agent to begin trading immediately. Once the human operator claims the wallet via the claim URL, they can add any combination of policies to constrain the agent's behavior. The wallet owner can also revoke the agent's API key entirely at any time.\n\nRe-linking (Recovering API Access)\n\nIf the agent loses its API key, the wallet owner can generate a re-link token from the frontend. The agent then exchanges this token for a new scoped API key.\n\nHow it works:\n\nThe user generates a re-link token from the wallet detail page at https://heyvincent.ai\nThe user gives the token to the agent (e.g. by pasting it in chat)\nThe agent runs the relink command:\nnpx @vincentai/cli@latest secret relink --token <TOKEN_FROM_USER>\n\n\nThe CLI exchanges the token for a new API key, stores it automatically, and returns the new keyId. Use this keyId for all subsequent commands.\n\nImportant: Re-link tokens are one-time use and expire after 10 minutes, so it's safe for users to send you a relink token through chat since you will immediately consume it.\n\nWorkflow Example\n\nCreate wallet:\n\nnpx @vincentai/cli@latest secret create --type POLYMARKET_WALLET --memo \"Betting wallet\"\n\n\nGet Safe address (triggers deployment):\n\nnpx @vincentai/cli@latest polymarket balance --key-id <KEY_ID>\n# Returns walletAddress — give this to user to fund\n\n\nUser sends USDC.e to the Safe address on Polygon\n\nSearch for a market:\n\n# Search by keyword — returns only active, tradeable markets\n# Tip: use short keyword phrases; stop-words like \"or\" can cause empty results\nnpx @vincentai/cli@latest polymarket markets --key-id <KEY_ID> --query \"bitcoin up down\" --active\n\n\nCheck order book for the outcome you want:\n\nnpx @vincentai/cli@latest polymarket orderbook --key-id <KEY_ID> --token-id 123456...\n\n\nPlace BUY bet using the correct token ID:\n\n# tokenId must be from the tokenIds array, NOT the conditionId\nnpx @vincentai/cli@latest polymarket bet --key-id <KEY_ID> --token-id 123456... --side BUY --amount 5 --price 0.55\n\n\nWait for settlement (a few seconds)\n\nSell position:\n\nnpx @vincentai/cli@latest polymarket bet --key-id <KEY_ID> --token-id 123456... --side SELL --amount 9.09 --price 0.54\n\n\nRedeem after market resolves (if holding through resolution):\n\n# Check holdings for redeemable positions\nnpx @vincentai/cli@latest polymarket holdings --key-id <KEY_ID>\n# If redeemable: true, redeem to get USDC.e back\nnpx @vincentai/cli@latest polymarket redeem --key-id <KEY_ID>\n\n\nWithdraw USDC to another wallet:\n\nnpx @vincentai/cli@latest polymarket withdraw --key-id <KEY_ID> --to 0xRecipientAddress --amount 50\n\nImportant Notes\nAfter any bet or trade, share the user's Polymarket profile link so they can verify and view their positions: https://polymarket.com/profile/<polymarketWalletAddress> (use the wallet's Safe address).\nNo gas needed. All Polymarket transactions are gasless via Polymarket's relayer.\nNever try to access raw secret values. The private key stays server-side — that's the whole point.\nAlways share the claim URL with the user after creating a wallet.\nIf a transaction is rejected, it may be blocked by a server-side policy. Tell the user to check their policy settings at https://heyvincent.ai.\nIf a transaction requires approval, it will return status: \"pending_approval\". The wallet owner will receive a Telegram notification to approve or deny.\n\nSee the Error Handling section above for a full list of common errors and resolutions."
  },
  "trust": {
    "sourceLabel": "tencent",
    "provenanceUrl": "https://clawhub.ai/glitch003/vincentpolymarket",
    "publisherUrl": "https://clawhub.ai/glitch003/vincentpolymarket",
    "owner": "glitch003",
    "version": "1.0.70",
    "license": null,
    "verificationStatus": "Indexed source record"
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/vincentpolymarket",
    "downloadUrl": "https://openagent3.xyz/downloads/vincentpolymarket",
    "agentUrl": "https://openagent3.xyz/skills/vincentpolymarket/agent",
    "manifestUrl": "https://openagent3.xyz/skills/vincentpolymarket/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/vincentpolymarket/agent.md"
  }
}