Polymarket Minimal Trading Python for Openclaw

A streamlined Python trading client for Polymarket that enables authenticated market and limit orders via a decentralized wallet private key.

jvnhaowen
v1.0.0
Mar 24, 2026
0
676
0

Install & Download

1. ClawHub CLI

The fastest way to install a skill directly from the registry.

npx clawhub@latest install autotransactions

2. Manual Installation

Copy the skill folder to one of these locations

Global
~/.openclaw/skills/
Workspace
<project>/skills/

Priority: Workspace > Local > Bundled

3. Prompt Installation

Copy this prompt to OpenClaw to install it automatically.

Help me install autotransactions using Clawhub. If Clawhub is not installed, install it first (npm i -g clawhub).

Prefer to download?

Get the raw skill files in a ZIP archive.

What is Polymarket Minimal Trading Python?

The Polymarket Minimal Trading Python skill is a specialized technical implementation designed for high-efficiency interaction with the Polymarket CLOB (Central Limit Order Book). As a key addition to the Openclaw Skills library, it provides developers and traders with a lightweight, scriptable interface to manage prediction market positions without the overhead of a full GUI.

By leveraging the py-clob-client, this skill ensures secure transaction signing and automated allowance handling for USDC and conditional tokens. It bridges the gap between raw blockchain interactions and high-level trading logic, making it an essential component for those building automated trading bots or custom analytical tools within the Openclaw Skills ecosystem.

Polymarket Minimal Trading Python Use Cases

  • Automating market buy and sell orders based on external data triggers or signals.
  • Placing precise limit orders to capture specific price points in prediction markets.
  • Programmatic management of open orders, including bulk cancellations and status lookups.
  • Integrating Polymarket liquidity and trading capabilities into broader AI agent workflows using Openclaw Skills.

How Polymarket Minimal Trading Python Works

  1. Environment Initialization: The skill checks for a private.env file to securely load the POLYMARKET_PRIVATE_KEY for wallet authentication.
  2. Authentication & Signing: It uses the eth-account library to sign requests, establishing a secure session with the Polymarket API.
  3. Allowance Check: Before executing trades, the client automatically handles token approvals (USDC for buying and conditional tokens for selling).
  4. Order Execution: Based on CLI arguments, the script dispatches market or limit order requests to the Polymarket exchange.
  5. State Management: The skill provides methods to query the order book for active positions or specific order IDs to track execution status.

Polymarket Minimal Trading Python Setup

To get started with this Openclaw Skills module, install the necessary dependencies and configure your environment:

pip install py-clob-client eth-account

# Auto-create private.env if it does not exist
test -f private.env || cat > private.env <<'EOF'
POLYMARKET_PRIVATE_KEY=
EOF

echo "Please edit private.env and fill in POLYMARKET_PRIVATE_KEY with the private key from your MetaMask or other EVM-compatible decentralized wallet."

Polymarket Minimal Trading Python Data Schema & Taxonomy

The skill manages sensitive configuration and interaction data through a structured environment and CLI framework:

Component Type Description
private.env File Stores the POLYMARKET_PRIVATE_KEY for local authentication.
TOKEN_ID Variable The unique identifier for the specific prediction market outcome.
ORDER_ID Variable The unique hash returned by Polymarket to track specific transactions.
scripts/min_buy.py Script The main entry point for all trading operations and queries.

Polymarket Minimal Trading Python Advanced Features

  • Auto-Allowance Authorization: Eliminates manual friction by automatically authorizing USDC and conditional tokens for trades.
  • Bulk Order Management: Features a cancel-all command to flush all open positions across multiple markets instantly.
  • Flexible Auth: Supports both local .env file loading and system-level environment variables for containerized deployments.
  • Universal EVM Support: Compatible with private keys from any standard decentralized wallet like MetaMask.

SKILL.md


Loading

Related Openclaw Skills

METADATA

Github Stars: 0
forks: 0

Featured*