Skip to main content
The CLI ships with first-class Polymarket support: discover markets by volume or keyword, fund a Polymarket proxy wallet from the smart wallet, place CLOB orders for YES/NO outcomes, and list open positions and orders. Polymarket uses a separate EOA key for CLOB signing, imported once via set-key. The proxy wallet needs a one-time approve call before the first buy. For an enterprise context, this is the surface for hedging operational risk (regulatory events, supply-chain disruptions, demand shocks) at small dollar values within a clear cap.

How it works

Trade flow
1OperatorCLIpolymarket set-key <privateKey> (one-time)
2OperatorCLIpolymarket approve —broadcast (one-time)
3OperatorCLIpolymarket markets —search …
4Smart walletProxy walletFunds the proxy wallet, then buys YES/NO tokens via CLOB
5OperatorCLIpolymarket positions / orders / sell / cancel
The proxy wallet is Polymarket’s per-EOA execution wallet. clob-buy funds it from the smart wallet first, then submits the buy order. sell and order management work directly against the proxy.

One-time setup

set-key stores the EOA private key encrypted in ~/.polygon-agent/. approve is a one-time onchain transaction that authorizes the proxy wallet to spend USDC on Polymarket’s CLOB; without it, the first buy fails.

Commands

markets

Lists active markets sorted by volume.

market

Returns full detail for one market identified by conditionId.

set-key

Imports an EOA private key for Polymarket signing. Stored AES-256-GCM encrypted. Required before any trading commands.

proxy-wallet

Returns the Polymarket proxy wallet address derived from the active EOA. Use this address as the funding destination.

approve

One-time approval before the first clob-buy. Pass --neg-risk to also approve negative-risk markets.

clob-buy

Buy YES or NO tokens via CLOB. Positional args are conditionId, outcome (YES or NO), and USDC to spend.

sell

Sell YES or NO tokens. Positional args are conditionId, outcome, and number of shares.

positions, orders, cancel

positions lists open positions for the proxy wallet. orders lists open CLOB orders for the active EOA. cancel cancels a specific order by ID.

Worked example


Implementation

CLI overview

Topology, safety model, supported chains.

Setup and wallets

Smart wallet is the funding source for the proxy.

Transfers

Move USDC into the smart wallet before trading.

Balances and funding

Confirm USDC available before placing orders.