Polymarket trade
Skill helebest/holo-polymarket/plugins/holo-polymarket/skills/polymarket-trade
Trade on Polymarket prediction markets through the official CLOB API — buy and sell outcome shares (market or limit orders), preview costs, check collateral balance, list open orders, and cancel orders. Every order is dry-run by default and requires an explicit confirmation token to execute. Use when the user wants to place, preview, or cancel real Polymarket trades. For read-only market research, probabilities, positions, and history, use the polymarket-query skill instead.From its SKILL.md
npx -y skills add helebest/holo-polymarket --skill polymarket-tradeAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 0 stars0 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
SKILL.md
5.4 KB, ~1.3k tokens by cl100k_base, as published. Nobody here has run it
Polymarket Trade
Place and manage real trades on Polymarket via the official CLOB API.
This skill can spend real money. Every order command is dry-run by default: it resolves the market, validates the order, previews the cost, and prints a confirmation token — but sends nothing. Executing requires both
--executeand--confirm <token>.
Setup
pip install -r <skill-dir>/scripts/requirements.txt
Market data, dry-run previews, and whoami work with no packages installed.
Live placement / cancellation / balance reads need py-clob-client-v2.
Provide credentials in a gitignored KEY=VALUE file (see
references/credentials.md). They are looked up
agent-neutrally: POLYMARKET_* env vars, then $POLYMARKET_CREDENTIALS_FILE,
then ./.credentials, ~/.config/holo-polymarket/credentials, and finally
~/.openclaw/credentials/polymarket_credentials.
Set POLYMARKET_FUNDER to your proxy wallet (the address holding funds and
positions — for email/Magic logins it differs from the signer) and
POLYMARKET_SIGNATURE_TYPE to match your wallet (1 email/Magic, 2 browser).
Otherwise balance / positions resolve to the empty signer EOA. See
references/credentials.md and
references/trading.md.
Verify what was loaded (no secrets are printed):
python3 <skill-dir>/scripts/trade.py whoami
Commands
# Inspect a market: token ids, outcomes, tick size, min size, indicative prices
python3 <skill-dir>/scripts/trade.py market <market-slug>
# Limit BUY 10 shares of YES at 0.40 (dry-run preview)
python3 <skill-dir>/scripts/trade.py buy <market-slug> yes --limit 0.40 --shares 10
# Market BUY: spend 25 USDC on YES (amount is USDC for BUY)
python3 <skill-dir>/scripts/trade.py buy <market-slug> yes --amount 25
# Market SELL: sell 50 shares of YES (amount is SHARES for SELL)
python3 <skill-dir>/scripts/trade.py sell <market-slug> yes --amount 50
# Execute: copy the confirm_token printed by the dry-run
python3 <skill-dir>/scripts/trade.py buy <market-slug> yes --limit 0.40 --shares 10 \
--execute --confirm <token>
# Account + order management (needs API credentials)
python3 <skill-dir>/scripts/trade.py balance
python3 <skill-dir>/scripts/trade.py orders
python3 <skill-dir>/scripts/trade.py positions [address]
python3 <skill-dir>/scripts/trade.py cancel <order-id> # dry-run
python3 <skill-dir>/scripts/trade.py cancel <order-id> --execute --confirm <token>
python3 <skill-dir>/scripts/trade.py cancel --all --execute --confirm <token>
You can target a CLOB token id directly with --token-id <id> instead of
<market-slug> <outcome> (useful for offline previews).
Order semantics (important)
- Market BUY
--amountis USDC to spend; shares received ≈ amount / price. - Market SELL
--amountis shares to sell; USDC received ≈ amount × price. - Limit orders use
--limit <price 0..1>and--shares <n>; price must be a multiple of the market's tick size. - Order type:
--order-type GTC|GTD|FOK|FAKoverrides the default (GTCfor limit,FOKfor market). It is bound into the confirm token, so changing it re-previews. See references/trading.md for what each type means.
Safety model
- No state-changing action is sent without
--execute— this coversbuy,sell, andcancel. --executealso requires--confirm <token>, where the token is the deterministic value printed by the matching dry-run. For orders the token is bound to the full order — side, token id, price/amount, size, tick size, neg-risk flag, and order type — so changing any of them changes the token and a stale confirmation cannot execute a different order.cancelprints and requires its own token: a single cancel binds it to the order id, andcancel --allbinds it to a snapshot of the currently-open order ids (listed live and shown in the preview), so a stale--allconfirmation can't cancel orders placed since you previewed. Previewing--alltherefore needs API credentials.- Order size must be positive, and limit prices are validated against the market tick size; sizes below the market minimum produce a warning.
- Resolve the outcome explicitly (
yes/no/label/index) — do not assume index 0 is "Yes" for every market. - Before a live order, the funded wallet is sanity-checked: if
signature_typeis a proxy type (1/2/3) butfunderresolves to the bare signer EOA, execution is refused (setPOLYMARKET_FUNDERto your proxy) so an order can't silently target an empty wallet. The dry-run surfaces this as a warning.
See references/trading.md for how Polymarket CLOB trading works (CLOB V2, pUSD collateral, wallet/funder model, neg-risk markets, allowances) and the current migration caveats.
What ships with it: 8 files
56.1 KB alongside SKILL.md, 5 of them executable
references/
- credentials.md7.1 KB
- trading.md4.6 KB
scripts/
- clob.pyruns10.9 KB
- credentials.pyruns8.5 KB
- __init__.pyruns40 B
- market_data.pyruns5.0 KB
- requirements.txt317 B
- trade.pyruns19.8 KB