New260+ blocks and 240+ tools are now fully documented
DocumentationReferenceCore BlocksFinance & Payments
Block

Polymarket Block

Browse and analyze Polymarket prediction markets

The Polymarket block lets you access Polymarket prediction market data inside a workflow. Browse markets, events, and prices; track positions, trades, and holder data; search markets; and query CLOB price and orderbook data. Reach for it when a workflow needs live prediction-market signals or on-chain user activity.

Overview

PropertyValue
Typepolymarket
Categorytools
Color#0A0A0A

When to Use

  • Pull a list of active or closed markets or events, with sorting by volume, liquidity, or date.
  • Look up a single market or event by its ID or URL slug.
  • Search markets by keyword and paginate through the results.
  • Track a wallet's open positions, trade history, or on-chain activity by Ethereum address.
  • Query CLOB pricing data: orderbook, price, midpoint, spread, tick size, last trade price, or price history for a token.
  • Inspect token holders or fetch the trader leaderboard by category and time period.

Configuration

Operation

Dropdown (required). Selects which Polymarket query to run. Defaults to Get Markets. All other fields are conditional on this selection.

LabelID
Get Marketsget_markets
Get Marketget_market
Get Eventsget_events
Get Eventget_event
Get Tagsget_tags
Searchsearch
Get Seriesget_series
Get Series by IDget_series_by_id
Get Orderbookget_orderbook
Get Priceget_price
Get Midpointget_midpoint
Get Price Historyget_price_history
Get Last Trade Priceget_last_trade_price
Get Spreadget_spread
Get Tick Sizeget_tick_size
Get Positionsget_positions
Get Tradesget_trades
Get Activityget_activity
Get Leaderboardget_leaderboard
Get Holdersget_holders

Market ID

marketId (short-input, required) — The market condition ID. Shown when operation is Get Market.

Market Slug

marketSlug (short-input) — Market URL slug (e.g. will-trump-win). Shown when operation is Get Market; can be used instead of marketId.

Event ID

eventId (short-input, required) — The event ID. Shown when operation is Get Event.

Event Slug

eventSlug (short-input) — Event URL slug. Shown when operation is Get Event; can be used instead of eventId.

Series ID

seriesId (short-input, required) — The series ID. Shown when operation is Get Series by ID.

Search Query

query (short-input, required) — Full-text search query (e.g. presidential election). Shown when operation is Search.

User Address

user (short-input, required) — Ethereum wallet address (0x-prefixed). Shown when operation is Get Positions, Get Trades, Get Activity, or Get Leaderboard.

Condition ID (positions / trades filter)

market (short-input) — Condition ID to filter positions or trades. Shown when operation is Get Positions or Get Trades.

Event ID (positions / trades filter) — Advanced

positionEventId (short-input, advanced) — Event ID to filter positions or trades. Shown when operation is Get Positions or Get Trades.

Holders Condition ID

holdersMarket (short-input, required) — Comma-separated condition IDs whose holders to retrieve. Shown when operation is Get Holders.

Holders Min Balance — Advanced

holdersMinBalance (short-input, advanced) — Minimum balance threshold (default: 1). Shown when operation is Get Holders.

Token ID

tokenId (short-input, required) — CLOB token ID (from a market's clobTokenIds array). Shown when operation is Get Orderbook, Get Price, Get Midpoint, Get Price History, Get Last Trade Price, Get Spread, or Get Tick Size.

Side

side (dropdown, required) — Order side for the price query. Shown when operation is Get Price.

LabelID
Buybuy
Sellsell

Interval — Advanced

interval (dropdown, advanced) — Duration ending at the current time for price history. Shown when operation is Get Price History.

LabelID
None (use timestamps)`` (empty)
1 Minute1m
1 Hour1h
6 Hours6h
1 Day1d
1 Week1w
Maxmax

Fidelity (minutes) — Advanced

fidelity (short-input, advanced) — Data resolution in minutes (e.g. 60 for hourly). Shown when operation is Get Price History.

Start Timestamp — Advanced

startTs (short-input, advanced) — Start of the price history window as a Unix timestamp (seconds UTC). Shown when operation is Get Price History. Supports AI-assisted generation via wand.

End Timestamp — Advanced

endTs (short-input, advanced) — End of the price history window as a Unix timestamp (seconds UTC). Shown when operation is Get Price History. Supports AI-assisted generation via wand.

Closed Status — Advanced

closed (dropdown, advanced) — Filter markets or events by resolved/open state. Shown when operation is Get Markets or Get Events.

LabelID
All`` (empty)
Open Onlyfalse
Closed Onlytrue

Sort By (Markets) — Advanced

order (dropdown, advanced) — Sort field for market listings. Shown when operation is Get Markets.

LabelID
Default`` (empty)
VolumevolumeNum
LiquidityliquidityNum
Start DatestartDate
End DateendDate
Created AtcreatedAt
Updated AtupdatedAt

Sort By (Events) — Advanced

orderEvents (dropdown, advanced) — Sort field for event listings. Shown when operation is Get Events.

LabelID
Default`` (empty)
Volumevolume
Liquidityliquidity
Start DatestartDate
End DateendDate
Created AtcreatedAt
Updated AtupdatedAt

Sort Order — Advanced

ascending (dropdown, advanced) — Direction for market/event sort. Shown when operation is Get Markets or Get Events.

LabelID
Descendingfalse
Ascendingtrue

Tag ID — Advanced

tagId (short-input, advanced) — Filter markets or events by a specific tag ID. Shown when operation is Get Markets or Get Events.

Size Threshold — Advanced

sizeThreshold (short-input, advanced) — Minimum position size to include. Shown when operation is Get Positions.

Redeemable — Advanced

redeemable (dropdown, advanced) — Filter positions by redeemability. Shown when operation is Get Positions.

LabelID
All`` (empty)
Yestrue
Nofalse

Mergeable — Advanced

mergeable (dropdown, advanced) — Filter positions by mergeability. Shown when operation is Get Positions.

LabelID
All`` (empty)
Yestrue
Nofalse

Sort By (Positions) — Advanced

positionSortBy (short-input, advanced) — Sort field for positions (e.g. current_value). Shown when operation is Get Positions.

Sort Direction (Positions) — Advanced

positionSortDirection (dropdown, advanced) — Sort direction for positions. Shown when operation is Get Positions.

LabelID
Default`` (empty)
AscendingASC
DescendingDESC

Title Filter (Positions) — Advanced

positionTitle (short-input, advanced) — Filter positions by market title substring. Shown when operation is Get Positions.

Side (Trades) — Advanced

tradeSide (dropdown, advanced) — Filter trades by direction. Shown when operation is Get Trades.

LabelID
All`` (empty)
BuyBUY
SellSELL

Taker Only — Advanced

takerOnly (dropdown, advanced) — Restrict results to taker-only trades. Shown when operation is Get Trades.

LabelID
No`` (empty)
Yestrue

Filter Type — Advanced

filterType (dropdown, advanced) — Trade amount filter unit. Shown when operation is Get Trades.

LabelID
None`` (empty)
CashCASH
TokensTOKENS

Min Amount — Advanced

filterAmount (short-input, advanced) — Minimum trade amount (used with Filter Type). Shown when operation is Get Trades.

Activity User — Advanced

activityUser (short-input, advanced) — Additional user address filter. Shown when operation is Get Activity.

Activity Type — Advanced

activityType (short-input, advanced) — Activity type: TRADE, SPLIT, MERGE, REDEEM, REWARD, CONVERSION, MAKER_REBATE. Shown when operation is Get Activity.

Activity Market Filter — Advanced

activityMarket (short-input, advanced) — Comma-separated condition IDs to filter activity. Shown when operation is Get Activity.

Activity Event ID Filter — Advanced

activityEventId (short-input, advanced) — Comma-separated event IDs to filter activity. Shown when operation is Get Activity.

Side (Activity) — Advanced

activitySide (dropdown, advanced) — Direction filter for activity records. Shown when operation is Get Activity.

LabelID
All`` (empty)
BuyBUY
SellSELL

Sort By (Activity) — Advanced

activitySortBy (short-input, advanced) — Sort field (e.g. TIMESTAMP, TOKENS, CASH). Shown when operation is Get Activity.

Sort Direction (Activity) — Advanced

activitySortDirection (dropdown, advanced) — Sort direction for activity. Shown when operation is Get Activity.

LabelID
Descending`` (empty)
AscendingASC

Activity Start Timestamp — Advanced

activityStart (short-input, advanced) — Start of activity window as Unix timestamp. Shown when operation is Get Activity.

Activity End Timestamp — Advanced

activityEnd (short-input, advanced) — End of activity window as Unix timestamp. Shown when operation is Get Activity.

Leaderboard Category — Advanced

leaderboardCategory (short-input, advanced) — Category slug (e.g. politics, sports, crypto). Shown when operation is Get Leaderboard.

Leaderboard Time Period — Advanced

leaderboardTimePeriod (dropdown, advanced) — Time period for leaderboard ranking. Shown when operation is Get Leaderboard.

LabelID
All Time`` (empty)
1 Day1d
1 Week1w
1 Month1m

Leaderboard Order By — Advanced

leaderboardOrderBy (short-input, advanced) — Rank metric (e.g. pnl, vol). Shown when operation is Get Leaderboard.

Leaderboard User Address — Advanced

leaderboardUser (short-input, advanced) — Filter leaderboard to a specific wallet address. Shown when operation is Get Leaderboard.

Leaderboard Username — Advanced

leaderboardUserName (short-input, advanced) — Filter leaderboard to a specific username. Shown when operation is Get Leaderboard.

Limit — Advanced

limit (short-input, advanced) — Maximum number of results (default 50). Applies to: Get Markets, Get Events, Get Tags, Search, Get Series, Get Trades, Get Positions, Get Activity, Get Leaderboard, Get Holders.

Offset — Advanced

offset (short-input, advanced) — Pagination offset (number of records to skip). Applies to: Get Markets, Get Events, Get Tags, Get Series, Get Trades, Get Positions, Get Activity, Get Leaderboard.

Page — Advanced

page (short-input, advanced) — Page number (1-indexed) for search pagination. Shown when operation is Search.

Inputs & Outputs

  • Inputs:

    • operation (string) — Operation to perform
    • marketId (string) — Market ID
    • marketSlug (string) — Market slug
    • eventId (string) — Event ID
    • eventSlug (string) — Event slug
    • seriesId (string) — Series ID
    • query (string) — Search query
    • user (string) — User wallet address
    • market (string) — Condition ID filter
    • tokenId (string) — CLOB Token ID
    • side (string) — Order side
    • interval (string) — Price history interval
    • fidelity (number) — Data resolution in minutes
    • startTs (number) — Start timestamp (Unix)
    • endTs (number) — End timestamp (Unix)
    • limit (string) — Result limit
    • offset (string) — Pagination offset
    • page (string) — Page number for search
  • Outputs:

    • markets (json) — Array of market objects
    • events (json) — Array of event objects
    • tags (json) — Array of tag objects
    • series (json) — Array of series objects or single series
    • market (json) — Single market object
    • event (json) — Single event object
    • orderbook (json) — Orderbook with bids and asks
    • price (number) — Current price
    • midpoint (number) — Midpoint price
    • history (json) — Price history data
    • lastTradePrice (number) — Last trade price
    • spread (number) — Bid-ask spread
    • tickSize (number) — Minimum price increment
    • positions (json) — User positions
    • trades (json) — Trade history
    • activity (json) — User activity
    • leaderboard (json) — Leaderboard entries
    • holders (json) — Token holders
    • results (json) — Search results
    • data (json) — Raw API response data

Tools

The block routes to one of 20 tools depending on the selected operation. All tools call Polymarket public APIs — no API key is required.

Get Markets from Polymarket (polymarket_get_markets) — Retrieves a paginated list of prediction markets from the Gamma API with optional filtering by closed status, tag, sort field, and sort direction.

Get Market from Polymarket (polymarket_get_market) — Retrieves details of a single prediction market by condition ID or URL slug.

Get Events from Polymarket (polymarket_get_events) — Retrieves a paginated list of events from the Gamma API with optional filtering by closed status, tag, sort field, and sort direction.

Get Event from Polymarket (polymarket_get_event) — Retrieves details of a single Polymarket event by ID or URL slug.

Get Tags from Polymarket (polymarket_get_tags) — Retrieves available category tags for filtering markets and events.

Search Polymarket (polymarket_search) — Full-text searches markets, events, and profiles using the Gamma public-search endpoint.

Get Series from Polymarket (polymarket_get_series) — Retrieves a paginated list of series (related market groups).

Get Series by ID from Polymarket (polymarket_get_series_by_id) — Retrieves a single series by its ID.

Get Orderbook from Polymarket (polymarket_get_orderbook) — Retrieves the CLOB order book (bids, asks, tick size) for a specific token.

Get Price from Polymarket (polymarket_get_price) — Retrieves the current best buy or sell price for a specific CLOB token.

Get Midpoint Price from Polymarket (polymarket_get_midpoint) — Retrieves the midpoint between best bid and best ask for a token.

Get Price History from Polymarket (polymarket_get_price_history) — Retrieves historical price data ([{t, p}] entries) for a token over a given interval or timestamp range.

Get Last Trade Price from Polymarket (polymarket_get_last_trade_price) — Retrieves the price and side of the most recent trade for a token.

Get Spread from Polymarket (polymarket_get_spread) — Retrieves the bid-ask spread for a token.

Get Tick Size from Polymarket (polymarket_get_tick_size) — Retrieves the minimum price increment (tick size) for a token.

Get Positions from Polymarket (polymarket_get_positions) — Retrieves open positions held by a wallet address from the Data API, with optional market/event/size filtering and sorting.

Get Trades from Polymarket (polymarket_get_trades) — Retrieves trade history from the Data API, filterable by user, market, event, side, and minimum amount.

Get Activity from Polymarket (polymarket_get_activity) — Retrieves on-chain activity (trades, splits, merges, redemptions, rewards) for a wallet from the Data API.

Get Leaderboard from Polymarket (polymarket_get_leaderboard) — Retrieves the trader leaderboard by profit/loss or volume from the Data API, with category and time-period filters.

Get Market Holders from Polymarket (polymarket_get_holders) — Retrieves the top holders of one or more market tokens from the Data API.

YAML Example

polymarket_1:
  type: polymarket
  name: "Polymarket"
  inputs:
    operation: "search"
    query: "{{start.input}}"
    limit: "20"
  connections:
    outgoing:
      - target: agent_1