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

probable-trader

v1.0.0

Published

CLI for trading prediction markets on Probable Markets (BSC)

Readme

Probable Markets Trading Skill

An OpenClaw Skill that wraps the Probable Markets prediction market on BNB Chain (BSC). Enables agents to onboard wallets, discover markets, view orderbooks, place/cancel orders, track positions, and generate audit reports.

Built on top of opinion_clob_sdk — the official Probable Markets / Opinion Labs Python SDK.

Features

  • One-command onboarding — auto-generates API key via L1 EIP-712 auth
  • Full trading lifecycle — place/cancel limit & market orders, split/merge/redeem
  • Safety by default — dry-run mode, --confirm required for all transactions, secret masking
  • Audit logging — every action logged to local SQLite
  • Real-time streaming — WebSocket orderbook & execution report subscriptions
  • Agent-native — all output as structured JSON (ActionResult envelope)

Quick Start

# 1. Install dependencies
pip install opinion_clob_sdk websockets httpx

# 2. Set your private key
export PROB_PRIVATE_KEY="0xYOUR_PRIVATE_KEY"
export PROB_RPC_URL="https://bsc-dataseed.binance.org"

# 3. Register on probable.markets (connect wallet), then set proxy wallet
export PROB_MULTI_SIG_ADDR="0xYOUR_PROXY_WALLET"

# 4. Auto-generate API key
python3 scripts/prob.py onboard --confirm --json

# 5. Enable trading approvals (on-chain)
python3 scripts/prob.py setup --confirm --json

# 6. Start trading
python3 scripts/prob.py market list --status activated --json
python3 scripts/prob.py book <token_id> --json
python3 scripts/prob.py order place --market-id <M> --token-id <T> --side BUY --price 0.55 --amount 100 --confirm --json

CLI Commands

prob.py config {show,init}              # Configuration management
prob.py doctor                          # Health check
prob.py onboard [--confirm]             # Generate API key (L1 auth)
prob.py setup [--confirm]               # Enable trading (on-chain approvals)

prob.py market {list,get,search}        # Market discovery
prob.py book <token_id>                 # Orderbook snapshot
prob.py price <token_id>                # Latest price
prob.py history <token_id>              # Price history
prob.py fee-rates <token_id>            # Fee rates

prob.py order {place,get,list,cancel,cancel-all}   # Order management
prob.py positions [--market-id M]       # My positions
prob.py trades [--market-id M]          # My trades
prob.py balance                         # My balances

prob.py split --market-id M --amount A [--confirm]   # Split collateral
prob.py merge --market-id M --amount A [--confirm]   # Merge tokens
prob.py redeem --market-id M [--confirm]             # Redeem resolved

prob.py ws book <token_id> [--duration N]   # Stream orderbook
prob.py ws user [--duration N]              # Stream execution reports
prob.py report daily [--format json|markdown|both]   # Trading report

Global flags: --json (JSON output), --confirm (execute), --dry-run (preview)

Project Structure

marketskill/
├── SKILL.md                 # OpenClaw skill definition
├── scripts/
│   ├── prob.py              # CLI entry point
│   └── lib/
│       ├── config.py        # Env var + config file loading
│       ├── client_wrapper.py # Wraps opinion_clob_sdk.Client
│       ├── onboard.py       # L1 auth + API key generation
│       ├── safety.py        # Dry-run, confirmation, secret masking
│       ├── db.py            # SQLite audit log + cache
│       ├── ws_client.py     # WebSocket client
│       └── report.py        # Daily report generator
├── schemas/                 # JSON schemas (config, order intent, output)
├── references/              # API, WebSocket, and onboarding docs
└── examples/                # Example interactions

Safety Model

| Feature | Behavior | |---------|----------| | Default mode | Dry-run — shows what would happen without executing | | Transactions | Require --confirm flag (orders, cancel, split, merge, redeem, setup) | | Secrets | Private keys and API secrets masked in all output | | Audit | Every action logged to .probable/probable.db (SQLite) | | Output | Standardized JSON envelope with success, error, request_id, timestamp |

Key Contracts (BSC Mainnet)

| Contract | Address | |----------|---------| | ConditionalTokens | 0xAD1a38cEc043e70E83a3eC30443dB285ED10D774 | | MultiSend | 0x998739BFdAAdde7C933B942a68053933098f9EDa | | FeeManager | 0xC9063Dc52dEEfb518E5b6634A6b8D624bc5d7c36 |

Requirements

  • Python 3.10+
  • opinion_clob_sdk (v0.4.3+)
  • websockets, httpx
  • BNB Chain wallet with BNB (gas) and USDT (trading)

License

MIT