{"_id":"@c0pilot/openclaw-polymarket","_rev":"5-ab0c9359a3e10d5c2a1b2d88b7380658","name":"@c0pilot/openclaw-polymarket","dist-tags":{"latest":"1.0.4"},"versions":{"1.0.0":{"name":"@c0pilot/openclaw-polymarket","version":"1.0.0","keywords":["openclaw","polymarket","prediction-markets","trading","crypto","polygon","ai-agent"],"author":{"name":"c0pilot"},"license":"MIT","_id":"@c0pilot/openclaw-polymarket@1.0.0","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/c0pilot/openclaw-polymarket#readme","bugs":{"url":"https://github.com/c0pilot/openclaw-polymarket/issues"},"dist":{"shasum":"b0a7b53d274c8a91870aa4ca169d5680437cb453","tarball":"https://registry.npmjs.org/@c0pilot/openclaw-polymarket/-/openclaw-polymarket-1.0.0.tgz","fileCount":11,"integrity":"sha512-Nvl69j0mfHYAv1B1L3NTkgv4wvHuqN7LqUJS6fJVLHyJ0XPRc1XNPPNpJ60uoyud9sy6q5vZp1wOIDoOQKdkXA==","signatures":[{"sig":"MEYCIQCw/ogLMCHwZGxSwT2cYSky+fKZ1joFzQNcsMkpTD8u1AIhAPVNjbH0xzqCbJiF1PjdpLfWD1spgke4/nfE5hsd+WyY","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49373},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"1eb46ea09509ef28af519bbd08354bcbdc7b8a82","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"openclaw":{"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/c0pilot/openclaw-polymarket.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenClaw plugin for Polymarket prediction markets - browse markets, place orders, manage positions","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@sinclair/typebox":"^0.32.0","@c0pilot/mcp-polymarket":"^1.0.0","@polymarket/clob-client":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"openclaw":"*"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-polymarket_1.0.0_1770233382542_0.579433577348921","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@c0pilot/openclaw-polymarket","version":"1.0.1","keywords":["openclaw","polymarket","prediction-markets","trading","crypto","polygon","ai-agent"],"author":{"name":"c0pilot"},"license":"MIT","_id":"@c0pilot/openclaw-polymarket@1.0.1","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/c0pilot/openclaw-polymarket#readme","bugs":{"url":"https://github.com/c0pilot/openclaw-polymarket/issues"},"dist":{"shasum":"1c2c471d069aa3207aaeb464215f2e9fa6ad14ec","tarball":"https://registry.npmjs.org/@c0pilot/openclaw-polymarket/-/openclaw-polymarket-1.0.1.tgz","fileCount":11,"integrity":"sha512-Axdj0JbgJEk7f0va9+rJ3vj5XNWE0ht4xIgaVyEe3AY+RH3ykqTD3G9gItEkb10ewedRrUdI/FRAs0TkL/AhRQ==","signatures":[{"sig":"MEUCIQD8ihACHb4tIkKp8dzIxvAExgBkdSQXj90Hfb8RypM4xwIgfBxrj5iGaNWXE9SIYVTRpvoBX7zBE9vzqekjXLgTL0Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49223},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"e4d1f1f8a550e970439660faf28fc6ad0737a170","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"openclaw":{"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/c0pilot/openclaw-polymarket.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenClaw plugin for Polymarket prediction markets - browse markets, place orders, manage positions","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@sinclair/typebox":"^0.32.0","@c0pilot/mcp-polymarket":"^1.0.0","@polymarket/clob-client":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"openclaw":"*"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-polymarket_1.0.1_1770233779913_0.04923302251452255","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@c0pilot/openclaw-polymarket","version":"1.0.2","keywords":["openclaw","polymarket","prediction-markets","trading","crypto","polygon","ai-agent"],"author":{"name":"c0pilot"},"license":"MIT","_id":"@c0pilot/openclaw-polymarket@1.0.2","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/c0pilot/openclaw-polymarket#readme","bugs":{"url":"https://github.com/c0pilot/openclaw-polymarket/issues"},"dist":{"shasum":"5ea87e52c2a0d0f4faa5b98e0c51a3d91f5a8612","tarball":"https://registry.npmjs.org/@c0pilot/openclaw-polymarket/-/openclaw-polymarket-1.0.2.tgz","fileCount":11,"integrity":"sha512-dTgvhCpEpGPiacXxAJMrn3g5/dJIFc3MoL29Hp38J3VnBXK4bGnCBmw5TW/23agEtuCvUERQ7iMr3ZirPM96aA==","signatures":[{"sig":"MEUCIF76hzQsSdtL2bN5YKOIs4PjoaDvTQ4WIiNSvqYoUiWyAiEAvEI0Se7bMIGtut03OztZ0oi4T8ESDn5yuezaWHDW34c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49231},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"e6d31b8c9e4ecefd68bdc56af1663d3c91d2576e","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"openclaw":{"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/c0pilot/openclaw-polymarket.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenClaw plugin for Polymarket prediction markets - browse markets, place orders, manage positions","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@sinclair/typebox":"^0.32.0","@c0pilot/mcp-polymarket":"^1.0.0","@polymarket/clob-client":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"openclaw":"*"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-polymarket_1.0.2_1770233863904_0.007349497475025002","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@c0pilot/openclaw-polymarket","version":"1.0.3","keywords":["openclaw","polymarket","prediction-markets","trading","crypto","polygon","ai-agent"],"author":{"name":"c0pilot"},"license":"MIT","_id":"@c0pilot/openclaw-polymarket@1.0.3","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"homepage":"https://github.com/unsanction/openclaw-polymarket#readme","bugs":{"url":"https://github.com/unsanction/openclaw-polymarket/issues"},"dist":{"shasum":"276d721d44f78e75a8864178781176f37eb70365","tarball":"https://registry.npmjs.org/@c0pilot/openclaw-polymarket/-/openclaw-polymarket-1.0.3.tgz","fileCount":11,"integrity":"sha512-BiD4bj7B5h96WQmMPHgRPcBd8U3zsDFkFSDEEswbnRUn2KFLPkogoThJfKory07yygP/pikEaysMfCWYJ/Ek0Q==","signatures":[{"sig":"MEQCIDeq9M99XcO7tPpwV+28yRq6EPiP3/ADhMc3DnkkA72ZAiBzk1KqZ3BOJQTJNdxVtthIo2oOkEBrEVnA2V0mUfhywA==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49424},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18.0.0"},"gitHead":"f124922d79bd856e5b6c516831dfae12c16c5383","scripts":{"dev":"tsc --watch","build":"tsc","clean":"rm -rf dist","prepublishOnly":"npm run build"},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"openclaw":{"extensions":["./dist/index.js"]},"repository":{"url":"git+https://github.com/unsanction/openclaw-polymarket.git","type":"git"},"_npmVersion":"11.7.0","description":"OpenClaw plugin for Polymarket prediction markets - browse markets, place orders, manage positions","directories":{},"_nodeVersion":"24.5.0","dependencies":{"@sinclair/typebox":"^0.32.0","@c0pilot/mcp-polymarket":"^1.0.0","@polymarket/clob-client":"^5.2.1"},"_hasShrinkwrap":false,"devDependencies":{"typescript":"^5.3.0","@types/node":"^20.0.0"},"peerDependencies":{"openclaw":"*"},"_npmOperationalInternal":{"tmp":"tmp/openclaw-polymarket_1.0.3_1770234317612_0.4275232685067911","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@c0pilot/openclaw-polymarket","version":"1.0.4","description":"OpenClaw plugin for Polymarket prediction markets - browse markets, place orders, manage positions","type":"module","main":"dist/index.js","types":"dist/index.d.ts","scripts":{"build":"tsc","dev":"tsc --watch","clean":"rm -rf dist","prepublishOnly":"npm run build"},"keywords":["openclaw","polymarket","prediction-markets","trading","crypto","polygon","ai-agent"],"author":{"name":"c0pilot"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/unsanction/openclaw-polymarket.git"},"homepage":"https://github.com/unsanction/openclaw-polymarket#readme","bugs":{"url":"https://github.com/unsanction/openclaw-polymarket/issues"},"engines":{"node":">=18.0.0"},"dependencies":{"@c0pilot/mcp-polymarket":"file:../mcp-polymarket-openclaw","@polymarket/clob-client":"^5.2.1","@sinclair/typebox":"^0.32.0"},"devDependencies":{"@types/node":"^20.0.0","typescript":"^5.3.0"},"peerDependencies":{"openclaw":"*"},"openclaw":{"extensions":["./dist/index.js"]},"gitHead":"7bb963e3030396932acc683dacbaadc78fa43bc8","_id":"@c0pilot/openclaw-polymarket@1.0.4","_nodeVersion":"24.5.0","_npmVersion":"11.7.0","dist":{"integrity":"sha512-BVd294aX45hK3GnnJjq3XRxAd+wFdiVEFbLdkrVxtg6zwEliyeHKFF0i1gTnpn4gaG6xseZdU+rCfHF6QLp01A==","shasum":"2c2ae509ffbedc58cfc0ed8f162031036a44daf7","tarball":"https://registry.npmjs.org/@c0pilot/openclaw-polymarket/-/openclaw-polymarket-1.0.4.tgz","fileCount":11,"unpackedSize":59894,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCICJHXW/Vi25HnzBX9CcX8EzDTv2ilXgX8ALciD63q69yAiBf51J+DtbPC7oFCJ2+a+Cb+dD4u5AliMF3i8bRjq1cRA=="}]},"_npmUser":{"name":"c0pilot","email":"5349983@gmail.com"},"directories":{},"maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/openclaw-polymarket_1.0.4_1770411050909_0.19696897150827097"},"_hasShrinkwrap":false}},"time":{"created":"2026-02-04T19:29:42.454Z","modified":"2026-02-06T20:50:51.195Z","1.0.0":"2026-02-04T19:29:42.686Z","1.0.1":"2026-02-04T19:36:20.090Z","1.0.2":"2026-02-04T19:37:44.064Z","1.0.3":"2026-02-04T19:45:17.811Z","1.0.4":"2026-02-06T20:50:51.073Z"},"bugs":{"url":"https://github.com/unsanction/openclaw-polymarket/issues"},"author":{"name":"c0pilot"},"license":"MIT","homepage":"https://github.com/unsanction/openclaw-polymarket#readme","keywords":["openclaw","polymarket","prediction-markets","trading","crypto","polygon","ai-agent"],"repository":{"type":"git","url":"git+https://github.com/unsanction/openclaw-polymarket.git"},"description":"OpenClaw plugin for Polymarket prediction markets - browse markets, place orders, manage positions","maintainers":[{"name":"c0pilot","email":"5349983@gmail.com"}],"readme":"# @c0pilot/openclaw-polymarket\n\nOpenClaw plugin for trading on [Polymarket](https://polymarket.com) prediction markets.\n\n[![npm version](https://badge.fury.io/js/@c0pilot/openclaw-polymarket.svg)](https://www.npmjs.com/package/@c0pilot/openclaw-polymarket)\n\n## Features\n\n- **Browse Markets**: Search and list active prediction markets\n- **View Orderbooks**: See current bids/asks and market depth\n- **Check Balance**: View wallet USDC balance and allowances\n- **Track Positions**: Monitor open orders and positions\n- **Place Orders**: Execute limit orders (BUY/SELL)\n- **Cancel Orders**: Cancel pending orders\n\n## Installation\n\n### From npm\n\n```bash\nopenclaw plugins install @c0pilot/openclaw-polymarket\n```\n\n### From local path\n\n```bash\ncd /path/to/openclaw-polymarket\nnpm install\nnpm run build\nopenclaw plugins install -l .\n```\n\n## Configuration\n\n### Option 1: OpenClaw config file\n\nAdd to `~/.openclaw/openclaw.json`:\n\n```json\n{\n  \"plugins\": {\n    \"entries\": {\n      \"openclaw-polymarket\": {\n        \"enabled\": true,\n        \"config\": {\n          \"privateKey\": \"0x...\",\n          \"funder\": \"0x...\",\n          \"readonly\": false\n        }\n      }\n    }\n  }\n}\n```\n\nOr use CLI:\n\n```bash\nopenclaw config set plugins.entries.openclaw-polymarket.config.privateKey \"0x...\"\nopenclaw config set plugins.entries.openclaw-polymarket.config.funder \"0x...\"\n```\n\n### Option 2: Environment variables\n\n```bash\nexport POLYMARKET_PRIVATE_KEY=\"0x...\"\nexport POLYMARKET_FUNDER=\"0x...\"           # Optional\nexport POLYMARKET_READONLY=\"false\"         # Optional\n```\n\n### Configuration Options\n\n| Option | Required | Description |\n|--------|----------|-------------|\n| `privateKey` | Yes | Your wallet private key for signing transactions |\n| `funder` | No | Polymarket proxy wallet address. If not set, derived from privateKey |\n| `apiKey` | No | API key (auto-derived from privateKey if not set) |\n| `apiSecret` | No | API secret (auto-derived from privateKey if not set) |\n| `passphrase` | No | API passphrase (auto-derived from privateKey if not set) |\n| `chainId` | No | Chain ID (default: 137 for Polygon) |\n| `readonly` | No | Disable trading tools (default: false) |\n\n### Finding Your Funder Address\n\nYour Polymarket \"funder\" address is your proxy wallet - the address shown on polymarket.com when you're logged in. If you've deposited funds through Polymarket's UI, they're held in this proxy wallet.\n\n- If `funder` equals your wallet address: Direct EOA mode\n- If `funder` differs: Proxy wallet mode (most common)\n\n## Available Tools\n\n### Read-Only Tools\n\n| Tool | Description |\n|------|-------------|\n| `polymarket_get_markets` | List active prediction markets |\n| `polymarket_get_market` | Get details for a specific market |\n| `polymarket_get_orderbook` | View order book for a token |\n| `polymarket_get_balance` | Check wallet USDC balance |\n| `polymarket_get_positions` | View open orders and positions |\n| `polymarket_get_trades` | Get recent trade history |\n\n### Trading Tools\n\n| Tool | Description |\n|------|-------------|\n| `polymarket_place_order` | Place a limit order (BUY/SELL) |\n| `polymarket_cancel_order` | Cancel an open order |\n\n⚠️ **Trading tools execute real trades with real funds!**\n\n## Usage Examples\n\n### Find and analyze a market\n\n```\nUser: \"Find markets about Trump\"\n\nAgent uses: polymarket_get_markets(search=\"trump\")\n→ Returns list of markets with current prices\n\nAgent uses: polymarket_get_orderbook(token_id=\"...\")\n→ Shows bid/ask spread and liquidity\n```\n\n### Place a trade\n\n```\nUser: \"Buy 10 shares of YES at $0.50\"\n\nAgent uses: polymarket_get_balance()\n→ Confirms sufficient funds\n\nAgent uses: polymarket_place_order(\n  token_id=\"...\",\n  side=\"BUY\",\n  size=\"10\",\n  price=\"0.50\"\n)\n→ Order placed!\n```\n\n### Check and close position\n\n```\nUser: \"Show my positions and sell any profitable ones\"\n\nAgent uses: polymarket_get_positions()\n→ Shows open orders\n\nAgent uses: polymarket_get_orderbook(token_id=\"...\")\n→ Checks current bid price\n\nAgent uses: polymarket_place_order(\n  token_id=\"...\",\n  side=\"SELL\",\n  size=\"10\",\n  price=\"0.85\"\n)\n→ Position closed at profit\n```\n\n## Understanding Prices\n\n- Prices represent probabilities (0 to 1)\n- Price of 0.60 = 60% implied probability\n- YES + NO prices sum to ~1.00\n- Spread = Best Ask - Best Bid\n\n## Safety Notes\n\n1. **Start with readonly mode** to explore without risk\n2. **Minimum order size is 5 shares**\n3. **Orders may partially fill** - check positions after trading\n4. **Consider the spread** - immediate round-trip will lose the spread\n\n## Development\n\n```bash\n# Install dependencies\nnpm install\n\n# Build\nnpm run build\n\n# Watch mode\nnpm run dev\n\n# Clean build\nnpm run clean\n```\n\n## Related\n\n- [@c0pilot/mcp-polymarket](https://www.npmjs.com/package/@c0pilot/mcp-polymarket) - Core Polymarket CLOB client library\n- [GitHub](https://github.com/unsanction/openclaw-polymarket)\n\n## License\n\nMIT\n","readmeFilename":"README.md"}