npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@c0pilot/openclaw-polymarket

v1.0.4

Published

OpenClaw plugin for Polymarket prediction markets - browse markets, place orders, manage positions

Readme

@c0pilot/openclaw-polymarket

OpenClaw plugin for trading on Polymarket prediction markets.

npm version

Features

  • Browse Markets: Search and list active prediction markets
  • View Orderbooks: See current bids/asks and market depth
  • Check Balance: View wallet USDC balance and allowances
  • Track Positions: Monitor open orders and positions
  • Place Orders: Execute limit orders (BUY/SELL)
  • Cancel Orders: Cancel pending orders

Installation

From npm

openclaw plugins install @c0pilot/openclaw-polymarket

From local path

cd /path/to/openclaw-polymarket
npm install
npm run build
openclaw plugins install -l .

Configuration

Option 1: OpenClaw config file

Add to ~/.openclaw/openclaw.json:

{
  "plugins": {
    "entries": {
      "openclaw-polymarket": {
        "enabled": true,
        "config": {
          "privateKey": "0x...",
          "funder": "0x...",
          "readonly": false
        }
      }
    }
  }
}

Or use CLI:

openclaw config set plugins.entries.openclaw-polymarket.config.privateKey "0x..."
openclaw config set plugins.entries.openclaw-polymarket.config.funder "0x..."

Option 2: Environment variables

export POLYMARKET_PRIVATE_KEY="0x..."
export POLYMARKET_FUNDER="0x..."           # Optional
export POLYMARKET_READONLY="false"         # Optional

Configuration Options

| Option | Required | Description | |--------|----------|-------------| | privateKey | Yes | Your wallet private key for signing transactions | | funder | No | Polymarket proxy wallet address. If not set, derived from privateKey | | apiKey | No | API key (auto-derived from privateKey if not set) | | apiSecret | No | API secret (auto-derived from privateKey if not set) | | passphrase | No | API passphrase (auto-derived from privateKey if not set) | | chainId | No | Chain ID (default: 137 for Polygon) | | readonly | No | Disable trading tools (default: false) |

Finding Your Funder Address

Your 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.

  • If funder equals your wallet address: Direct EOA mode
  • If funder differs: Proxy wallet mode (most common)

Available Tools

Read-Only Tools

| Tool | Description | |------|-------------| | polymarket_get_markets | List active prediction markets | | polymarket_get_market | Get details for a specific market | | polymarket_get_orderbook | View order book for a token | | polymarket_get_balance | Check wallet USDC balance | | polymarket_get_positions | View open orders and positions | | polymarket_get_trades | Get recent trade history |

Trading Tools

| Tool | Description | |------|-------------| | polymarket_place_order | Place a limit order (BUY/SELL) | | polymarket_cancel_order | Cancel an open order |

⚠️ Trading tools execute real trades with real funds!

Usage Examples

Find and analyze a market

User: "Find markets about Trump"

Agent uses: polymarket_get_markets(search="trump")
→ Returns list of markets with current prices

Agent uses: polymarket_get_orderbook(token_id="...")
→ Shows bid/ask spread and liquidity

Place a trade

User: "Buy 10 shares of YES at $0.50"

Agent uses: polymarket_get_balance()
→ Confirms sufficient funds

Agent uses: polymarket_place_order(
  token_id="...",
  side="BUY",
  size="10",
  price="0.50"
)
→ Order placed!

Check and close position

User: "Show my positions and sell any profitable ones"

Agent uses: polymarket_get_positions()
→ Shows open orders

Agent uses: polymarket_get_orderbook(token_id="...")
→ Checks current bid price

Agent uses: polymarket_place_order(
  token_id="...",
  side="SELL",
  size="10",
  price="0.85"
)
→ Position closed at profit

Understanding Prices

  • Prices represent probabilities (0 to 1)
  • Price of 0.60 = 60% implied probability
  • YES + NO prices sum to ~1.00
  • Spread = Best Ask - Best Bid

Safety Notes

  1. Start with readonly mode to explore without risk
  2. Minimum order size is 5 shares
  3. Orders may partially fill - check positions after trading
  4. Consider the spread - immediate round-trip will lose the spread

Development

# Install dependencies
npm install

# Build
npm run build

# Watch mode
npm run dev

# Clean build
npm run clean

Related

License

MIT