Are you an LLM? Read llms.txt for a summary of the docs, or llms-full.txt for the full context.
Skip to content

Polymarket

All Polymarket commands live under heat polymarket or heat pm.

Polymarket is a prediction market on Polygon. Heat wraps the Gamma API, CLOB API, Data API, Bridge API, and on-chain CTF contracts.

For the recommended first-time flow, start with Polymarket Onboarding.

What needs an account

Read-only discovery commands do not need a signing account:

  • markets
  • events
  • tags
  • series
  • comments
  • profiles
  • sports
  • status
  • read-only clob pricing and book commands
  • stream orderbook, stream prices, stream midpoints

Trading, account, approval, on-chain, and user stream commands do.

Funding

Signature types

Heat supports:

  • proxy
  • eoa
  • gnosis-safe

Current precedence:

  1. --sig-type
  2. account.protocols.polymarket.signature_type
  3. default proxy

In practice:

  • eoa uses the Heat signer address directly
  • proxy derives the effective Polymarket wallet from the Heat signer address
  • gnosis-safe derives the effective safe wallet from the Heat signer address

Best first commands

heat pm markets list --limit 5
heat pm price <token_id> --side buy
heat pm bridge deposit
heat pm approve check
heat pm buy <token_id> --price 0.55 --size 100 --dry-run

Helper commands

These are the recommended primary path for humans and agents.

price

heat pm price <token_id> --side buy
heat pm price <token_id> --side sell

buy / sell

heat pm buy <token_id> --price 0.55 --size 100
heat pm sell <token_id> --price 0.65 --size 50

Optional --sig-type overrides the Polymarket signature type.

cancel

heat pm cancel <order_id>

orders

heat pm orders
heat pm orders --market <condition_id>

trades

heat pm trades
heat pm trades --market <condition_id>

positions

heat pm positions
heat pm positions --user 0x...
heat pm positions --limit 50

balance

heat pm balance

Markets and discovery

markets

heat pm markets list --limit 10
heat pm markets list --closed true
heat pm markets get <condition_id_or_slug>
heat pm markets search "election" --limit 5
heat pm markets tags <market_id>

events

heat pm events list --limit 10 --active true
heat pm events get <id_or_slug>
heat pm events tags <event_id>

tags

heat pm tags list --limit 50
heat pm tags get <id_or_slug>
heat pm tags related <id> --omit-empty

series

heat pm series list
heat pm series get <id>

comments

heat pm comments list --entity-type market --entity-id <id>
heat pm comments get <comment_id>
heat pm comments by-user <address>

profiles

heat pm profiles get <address>

sports

heat pm sports list
heat pm sports market-types
heat pm sports teams

status

heat pm status

Streaming

Real-time WebSocket streams for market data and user events.

Market data streams (no account required)

These subscribe by token/asset ID and emit events as they happen.

heat pm stream orderbook <token_id>
heat pm stream prices <token_id>
heat pm stream midpoints <token_id>

User streams (requires account)

These subscribe to your authenticated order and trade events. Omit --market to receive events across all markets.

heat pm stream orders
heat pm stream orders --market <condition_id>
heat pm stream trades
heat pm stream trades --market <condition_id>

Optional --sig-type overrides the Polymarket signature type.

CLOB

Lower-level access to Polymarket's order book and authenticated trading.

Pricing and market info

heat pm clob price <token_id> --side buy
heat pm clob midpoint <token_id>
heat pm clob spread <token_id>
heat pm clob book <token_id>
heat pm clob last-trade-price <token_id>
heat pm clob price-history <market> --range 1d
heat pm clob market <condition_id>
heat pm clob markets
heat pm clob tick-size <token_id>
heat pm clob fee-rate <token_id>
heat pm clob neg-risk <token_id>
heat pm clob server-time
heat pm clob geoblock
heat pm clob ok

Order management

heat pm clob limit-order <token_id> --side buy --price 0.55 --size 100
heat pm clob market-order <token_id> --side buy --amount 50
heat pm clob order <order_id>
heat pm clob orders --market <condition_id>
heat pm clob trades --market <condition_id>
heat pm clob cancel-order <order_id>
heat pm clob cancel-market-orders --market <condition_id>
heat pm clob cancel-all

Balance, notifications, rewards

heat pm clob balance-allowance --asset-type collateral
heat pm clob update-balance-allowance
heat pm clob notifications
heat pm clob delete-notifications <comma_separated_ids>
heat pm clob earnings <YYYY-MM-DD>
heat pm clob total-earnings <YYYY-MM-DD>
heat pm clob reward-percentages
heat pm clob current-rewards
heat pm clob raw-rewards <condition_id>
heat pm clob is-order-scoring <order_id>

Data

heat pm data positions --user 0x... --limit 25
heat pm data closed-positions --user 0x...
heat pm data value --user 0x...
heat pm data traded --user 0x...
heat pm data trades --user 0x... --limit 25
heat pm data activity --user 0x... --limit 25
heat pm data holders <condition_ids> --limit 20
heat pm data open-interest <condition_ids>
heat pm data live-volume <event_id>
heat pm data leaderboard --period week --order-by pnl --limit 25
heat pm data builder-leaderboard --period all
heat pm data builder-volume --period month

Bridge

heat pm bridge deposit
heat pm bridge status
heat pm bridge supported-assets

deposit is read-only and returns deposit addresses. You still fund externally.

CTF

heat pm ctf split --collateral 0x... --condition-id 0x... --partition 1,2 --amount 1000
heat pm ctf merge --collateral 0x... --condition-id 0x... --partition 1,2 --amount 1000
heat pm ctf redeem --collateral 0x... --condition-id 0x... --index-sets 1,2
heat pm ctf redeem-neg-risk --condition-id 0x... --amounts 100,200
heat pm ctf condition-id --oracle 0x... --question-id 0x...
heat pm ctf collection-id --condition-id 0x... --index-set 1
heat pm ctf position-id --collateral 0x... --collection-id 0x...

Approve

heat pm approve check
heat pm approve set

approve set sends Polygon transactions and is dangerous.

Polygon RPC

For Polymarket on-chain provider calls, Heat currently uses:

https://polygon.drpc.org