Polymarket Query
A read-only skill for researching Polymarket prediction markets (it never places orders). It covers two needs:
- Market research: hot events, search, event detail, historical price and probability/volume trends.
- Positions & whale tracking: leaderboard, any address's positions and P&L, and trade history.
To actually buy/sell (place orders, cancel, balances, order management), use the
polymarket-tradeskill.
Quick start
- Check the environment:
bash,curl,jq, and access togamma-api.polymarket.com/data-api.polymarket.com/clob.polymarket.com. - Pick a task type: market info / whales & positions / historical trends.
- Run the matching command:
bash <skill-dir>/scripts/polymarket.sh <command> [args...].
Full command list: references/commands.md. Troubleshooting: references/troubleshooting.md.
Choosing a command
- Quick market heat:
hot [limit]. - Find markets by keyword:
search <keyword> [limit]. - Inspect an event by slug (with tokens):
detail <event-slug>. - Track top traders / check positions:
leaderboard(aliaslb) →positions(aliaspos) →trades.- Only open positions:
positions <address> [limit] --active. - Your own wallet: with
POLYMARKET_FUNDER(orFUNDER) set,positions/tradesdefault to it when no address is given. Use your proxy wallet address (the one holding funds/positions), not the signer/EOA.
- Only open positions:
- Time-series review:
- Probability table:
history - Start/end change summary:
trend - Volume changes:
volume-trend
- Probability table:
- File export: add
--format csv|jsonand optional--out <file>tohistory/trend/volume-trend.
Minimal examples
# 1) Hot markets
bash <skill-dir>/scripts/polymarket.sh hot 5
# 2) Search + detail
bash <skill-dir>/scripts/polymarket.sh search bitcoin 5
bash <skill-dir>/scripts/polymarket.sh detail fed-decision-in-march-885
# 3) Whale & position tracking
bash <skill-dir>/scripts/polymarket.sh lb 10 pnl week
bash <skill-dir>/scripts/polymarket.sh pos 0xc257ea... 10
bash <skill-dir>/scripts/polymarket.sh pos 0xc257ea... 10 --active # open only
bash <skill-dir>/scripts/polymarket.sh trades 0xc257ea... 10
# 4) Historical trends + export
bash <skill-dir>/scripts/polymarket.sh history fed-decision-in-march-885 2025-01-01 2025-01-31 1d
bash <skill-dir>/scripts/polymarket.sh trend fed-decision-in-march-885 2025-01-01 2025-01-31 --format csv
bash <skill-dir>/scripts/polymarket.sh volume-trend fed-decision-in-march-885 2025-01-01 2025-01-31 --format json --out /tmp/volume.json
Parameter rules: from/to are YYYY-MM-DD; interval is 1h / 4h / 1d.
Common failures
- Missing dependencies: install
curl/jq. - Network failures: check API reachability and timeouts; raise
CURL_TIMEOUTif needed. In a proxy environment,HTTPS_PROXYis auto-detected. - Historical price failures: check
POLYMARKET_BEARER_TOKENor a credentials file (see below). - Argument errors: re-check command usage and the date format (
YYYY-MM-DD).
Credentials (only the historical-price endpoint needs one)
The historical-price endpoint may require a bearer token. It is resolved in this order (agent-neutral, not tied to any runtime):
POLYMARKET_BEARER_TOKENenvironment variable- the file named by
POLYMARKET_CREDENTIALS_FILE ./.credentialsin the project directory (should be gitignored)~/.config/holo-polymarket/credentials~/.openclaw/credentials/polymarket_credentials(legacy fallback)
The credentials file is KEY=VALUE and supports the BEARER_TOKEN / TOKEN
fields.
The same file (or env) may also provide POLYMARKET_FUNDER / FUNDER — your own
proxy wallet address. When set, positions / trades default to it if no
address is given on the command line. This is the only identity the query skill
reads; everything else here is read-only and public.
Trading boundary
This skill is read-only and never places orders. For buying/selling,
cancelling, balances, and order management, use the polymarket-trade skill
(built on the official CLOB API).