AACFlow

Polymarket

Access prediction markets data from Polymarket

Usage Instructions

Integrate Polymarket prediction markets into the workflow. Can get markets, market, events, event, tags, series, orderbook, price, midpoint, price history, last trade price, spread, tick size, positions, trades, activity, leaderboard, holders, and search.

Tools

polymarket_get_markets

Input

ParameterTypeRequiredDescription
closedstringNoNo description
orderstringNoNo description
ascendingstringNoNo description
tagIdstringNoNo description
limitstringNoNumber of results per page (e.g., "25"). Max: 50.
offsetstringNoNumber of results to skip for pagination (e.g., "50").

Output

ParameterTypeDescription
marketsarrayArray of market objects
idstringMarket ID
questionstringMarket question
conditionIdstringCondition ID
slugstringMarket slug
endDatestringEnd date
imagestringMarket image URL
outcomesstringOutcomes JSON string
outcomePricesstringOutcome prices JSON string
volumestringTotal volume
liquiditystringTotal liquidity
activebooleanWhether market is active
closedbooleanWhether market is closed
volumeNumnumberVolume as number
liquidityNumnumberLiquidity as number
clobTokenIdsarrayCLOB token IDs

polymarket_get_market

Input

ParameterTypeRequiredDescription
marketIdstringNoThe market ID (e.g., "0x1234...abcd" condition ID format). Required if slug is not provided.
slugstringNoThe market slug (e.g., "will-trump-win"). URL-friendly identifier. Required if marketId is not provided.

Output

ParameterTypeDescription
marketobjectMarket object with details
idstringMarket ID
questionstringMarket question
conditionIdstringCondition ID
slugstringMarket slug
resolutionSourcestringResolution source
endDatestringEnd date
startDatestringStart date
imagestringMarket image URL
iconstringMarket icon URL
descriptionstringMarket description
outcomesstringOutcomes JSON string
outcomePricesstringOutcome prices JSON string
volumestringTotal volume
liquiditystringTotal liquidity
activebooleanWhether market is active
closedbooleanWhether market is closed
archivedbooleanWhether market is archived
volumeNumnumberVolume as number
liquidityNumnumberLiquidity as number
clobTokenIdsarrayCLOB token IDs
acceptingOrdersbooleanWhether accepting orders
negRiskbooleanWhether negative risk

polymarket_get_events

Input

ParameterTypeRequiredDescription
closedstringNoNo description
orderstringNoNo description
ascendingstringNoNo description
tagIdstringNoNo description
limitstringNoNumber of results per page (e.g., "25"). Max: 50.
offsetstringNoNumber of results to skip for pagination (e.g., "50").

Output

ParameterTypeDescription
eventsarrayArray of event objects
idstringEvent ID
tickerstringEvent ticker
slugstringEvent slug
titlestringEvent title
descriptionstringEvent description
startDatestringStart date
endDatestringEnd date
imagestringEvent image URL
iconstringEvent icon URL
activebooleanWhether event is active
closedbooleanWhether event is closed
archivedbooleanWhether event is archived
liquiditynumberTotal liquidity
volumenumberTotal volume
marketsarrayArray of markets in this event

polymarket_get_event

Input

ParameterTypeRequiredDescription
eventIdstringNoThe event ID (e.g., "12345" or UUID format). Required if slug is not provided.
slugstringNoThe event slug (e.g., "2024-presidential-election"). URL-friendly identifier. Required if eventId is not provided.

Output

ParameterTypeDescription
eventobjectEvent object with details
idstringEvent ID
tickerstringEvent ticker
slugstringEvent slug
titlestringEvent title
descriptionstringEvent description
startDatestringStart date
creationDatestringCreation date
endDatestringEnd date
imagestringEvent image URL
iconstringEvent icon URL
activebooleanWhether event is active
closedbooleanWhether event is closed
archivedbooleanWhether event is archived
liquiditynumberTotal liquidity
volumenumberTotal volume
openInterestnumberOpen interest
commentCountnumberComment count
marketsarrayArray of markets in this event

polymarket_get_tags

Input

ParameterTypeRequiredDescription
limitstringNoNumber of results per page (e.g., "25"). Max: 50.
offsetstringNoNumber of results to skip for pagination (e.g., "50").

Output

ParameterTypeDescription
tagsarrayArray of tag objects
idstringTag ID
labelstringTag label
slugstringTag slug
createdAtstringCreation timestamp
updatedAtstringLast update timestamp

Input

ParameterTypeRequiredDescription
querystringYesSearch query term (e.g., "presidential election", "bitcoin price").
limitstringNoNumber of results per page (e.g., "25"). Max: 50.
pagestringNoPage number for pagination (e.g., "2"). 1-indexed.
cachestringNoNo description
eventsStatusstringNoNo description
limitPerTypestringNoNo description
eventsTagstringNoNo description
sortstringNoNo description
ascendingstringNoNo description
searchTagsstringNoNo description
searchProfilesstringNoNo description
recurrencestringNoNo description
excludeTagIdstringNoNo description
keepClosedMarketsstringNoNo description

Output

ParameterTypeDescription
resultsobjectSearch results containing markets, events, tags, and profiles arrays
marketsarrayArray of matching market objects
eventsarrayArray of matching event objects
tagsarrayArray of matching tag objects
profilesarrayArray of matching profile objects

polymarket_get_series

Input

ParameterTypeRequiredDescription
limitstringNoNumber of results per page (e.g., "25"). Max: 50.
offsetstringNoNumber of results to skip for pagination (e.g., "50").

Output

ParameterTypeDescription
seriesarrayArray of series objects
idstringSeries ID
tickerstringSeries ticker
slugstringSeries slug
titlestringSeries title
seriesTypestringSeries type
recurrencestringRecurrence pattern
imagestringSeries image URL
iconstringSeries icon URL
activebooleanWhether series is active
closedbooleanWhether series is closed
archivedbooleanWhether series is archived
featuredbooleanWhether series is featured
volumenumberTotal volume
liquiditynumberTotal liquidity
eventCountnumberNumber of events in series

polymarket_get_series_by_id

Input

ParameterTypeRequiredDescription
seriesIdstringYesThe series ID (e.g., "12345" or UUID format).

Output

ParameterTypeDescription
seriesobjectSeries object with details
idstringSeries ID
tickerstringSeries ticker
slugstringSeries slug
titlestringSeries title
seriesTypestringSeries type
recurrencestringRecurrence pattern
imagestringSeries image URL
iconstringSeries icon URL
activebooleanWhether series is active
closedbooleanWhether series is closed
archivedbooleanWhether series is archived
featuredbooleanWhether series is featured
volumenumberTotal volume
liquiditynumberTotal liquidity
commentCountnumberComment count
eventCountnumberNumber of events in series
eventsarrayArray of events in this series

polymarket_get_orderbook

Input

ParameterTypeRequiredDescription
tokenIdstringYesThe CLOB token ID from market clobTokenIds array (e.g., "71321045679252212594626385532706912750332728571942532289631379312455583992563").

Output

ParameterTypeDescription
orderbookobjectOrder book with bids and asks arrays
marketstringMarket identifier
asset_idstringAsset token ID
hashstringOrder book hash
timestampstringTimestamp
bidsarrayBid orders
pricestringBid price
sizestringBid size
asksarrayAsk orders
pricestringAsk price
sizestringAsk size
min_order_sizestringMinimum order size
tick_sizestringTick size
neg_riskbooleanWhether negative risk

polymarket_get_price

Input

ParameterTypeRequiredDescription
tokenIdstringYesThe CLOB token ID from market clobTokenIds array (e.g., "71321045679252212594626385532706912750332728571942532289631379312455583992563").
sidestringYesOrder side: "buy" or "sell".

Output

ParameterTypeDescription
pricestringMarket price

polymarket_get_midpoint

Input

ParameterTypeRequiredDescription
tokenIdstringYesThe CLOB token ID from market clobTokenIds array (e.g., "71321045679252212594626385532706912750332728571942532289631379312455583992563").

Output

ParameterTypeDescription
midpointstringMidpoint price

polymarket_get_price_history

Input

ParameterTypeRequiredDescription
tokenIdstringYesThe CLOB token ID from market clobTokenIds array (e.g., "71321045679252212594626385532706912750332728571942532289631379312455583992563").
intervalstringNoDuration ending at current time (1m, 1h, 6h, 1d, 1w, max). Mutually exclusive with startTs/endTs.
fidelitynumberNoNo description
startTsnumberNoNo description
endTsnumberNoNo description

Output

ParameterTypeDescription
historyarrayArray of price history entries
tnumberUnix timestamp
pnumberPrice at timestamp

polymarket_get_last_trade_price

Input

ParameterTypeRequiredDescription
tokenIdstringYesThe CLOB token ID from market clobTokenIds array (e.g., "71321045679252212594626385532706912750332728571942532289631379312455583992563").

Output

ParameterTypeDescription
pricestringLast trade price
sidestringSide of the last trade (BUY or SELL)

polymarket_get_spread

Input

ParameterTypeRequiredDescription
tokenIdstringYesThe CLOB token ID from market clobTokenIds array (e.g., "71321045679252212594626385532706912750332728571942532289631379312455583992563").

Output

ParameterTypeDescription
spreadobjectSpread value between bid and ask
spreadstringThe spread value

polymarket_get_tick_size

Input

ParameterTypeRequiredDescription
tokenIdstringYesThe CLOB token ID from market clobTokenIds array (e.g., "71321045679252212594626385532706912750332728571942532289631379312455583992563").

Output

ParameterTypeDescription
tickSizestringMinimum tick size

polymarket_get_positions

Input

ParameterTypeRequiredDescription
userstringYesNo description
marketstringNoCondition IDs to filter positions (e.g., "0x1234...abcd,0x5678...efgh"). Mutually exclusive with eventId.
eventIdstringNoEvent ID to filter positions (e.g., "12345"). Mutually exclusive with market.
sizeThresholdstringNoNo description
redeemablestringNoNo description
mergeablestringNoNo description
sortBystringNoSort field (TOKENS, CURRENT, INITIAL, CASHPNL, PERCENTPNL, TITLE, RESOLVING, PRICE, AVGPRICE)
sortDirectionstringNoNo description
titlestringNoNo description
limitstringNoNumber of results per page (e.g., "25").
offsetstringNoNumber of results to skip for pagination (e.g., "50").

Output

ParameterTypeDescription
positionsarrayArray of position objects
proxyWalletstringProxy wallet address
assetstringAsset token ID
conditionIdstringCondition ID
sizenumberPosition size
avgPricenumberAverage price
initialValuenumberInitial value
currentValuenumberCurrent value
cashPnlnumberCash profit/loss
percentPnlnumberPercent profit/loss
totalBoughtnumberTotal bought
realizedPnlnumberRealized profit/loss
percentRealizedPnlnumberPercent realized profit/loss
curPricenumberCurrent price
redeemablebooleanWhether position is redeemable
mergeablebooleanWhether position is mergeable
titlestringMarket title
slugstringMarket slug
iconstringMarket icon URL
eventSlugstringEvent slug
outcomestringOutcome name
outcomeIndexnumberOutcome index
oppositeOutcomestringOpposite outcome name
oppositeAssetstringOpposite asset token ID
endDatestringEnd date
negativeRiskbooleanWhether negative risk

polymarket_get_trades

Input

ParameterTypeRequiredDescription
userstringNoNo description
marketstringNoMarket/condition ID to filter trades (e.g., "0x1234...abcd"). Mutually exclusive with eventId.
eventIdstringNoEvent ID to filter trades (e.g., "12345"). Mutually exclusive with market.
sidestringNoNo description
takerOnlystringNoNo description
filterTypestringNoNo description
filterAmountstringNoNo description
limitstringNoNumber of results per page (e.g., "50"). Default: 100, max: 10000.
offsetstringNoNumber of results to skip for pagination (e.g., "100").

Output

ParameterTypeDescription
tradesarrayArray of trade objects
proxyWalletstringProxy wallet address
sidestringTrade side (BUY or SELL)
assetstringAsset token ID
conditionIdstringCondition ID
sizenumberTrade size
pricenumberTrade price
timestampnumberUnix timestamp
titlestringMarket title
slugstringMarket slug
iconstringMarket icon URL
eventSlugstringEvent slug
outcomestringOutcome name
outcomeIndexnumberOutcome index
namestringTrader name
pseudonymstringTrader pseudonym
biostringTrader bio
profileImagestringProfile image URL
profileImageOptimizedstringOptimized profile image URL
transactionHashstringTransaction hash

polymarket_get_activity

Retrieve on-chain activity for a user including trades, splits, merges, redemptions, rewards, and conversions

Input

ParameterTypeRequiredDescription
userstringYesNo description
limitstringNoMaximum results to return (e.g., "50"). Default: 100, max: 500.
offsetstringNoNumber of results to skip for pagination (e.g., "100"). Default: 0, max: 10000.
marketstringNoComma-separated condition IDs (e.g., "0x1234...abcd,0x5678...efgh"). Mutually exclusive with eventId.
eventIdstringNoComma-separated event IDs (e.g., "12345,67890"). Mutually exclusive with market.
typestringNoActivity type filter: TRADE, SPLIT, MERGE, REDEEM, REWARD, CONVERSION, MAKER_REBATE
startnumberNoNo description
endnumberNoNo description
sortBystringNoNo description
sortDirectionstringNoNo description
sidestringNoNo description

Output

ParameterTypeDescription
activityarrayArray of activity entries
proxyWalletstringUser proxy wallet address
timestampnumberUnix timestamp of activity
conditionIdstringMarket condition ID
typestringActivity type (TRADE, SPLIT, MERGE, REDEEM, REWARD, CONVERSION)
sizenumberSize in tokens
usdcSizenumberSize in USDC
transactionHashstringBlockchain transaction hash
pricenumberPrice (for trades)
assetstringAsset/token ID
sidestringTrade side (BUY/SELL)
outcomeIndexnumberOutcome index
titlestringMarket title
slugstringMarket slug
iconstringMarket icon URL
eventSlugstringEvent slug
outcomestringOutcome name
namestringUser display name
pseudonymstringUser pseudonym
biostringUser bio
profileImagestringUser profile image URL
profileImageOptimizedstringOptimized profile image URL

polymarket_get_leaderboard

Input

ParameterTypeRequiredDescription
categorystringNoCategory filter: OVERALL, POLITICS, SPORTS, CRYPTO, CULTURE, MENTIONS, WEATHER, ECONOMICS, TECH, FINANCE (default: OVERALL)
timePeriodstringNoNo description
orderBystringNoNo description
limitstringNoNumber of results to return (e.g., "10"). Range: 1-50, default: 25.
offsetstringNoNumber of results to skip for pagination (e.g., "25"). Range: 0-1000, default: 0.
userstringNoNo description
userNamestringNoNo description

Output

ParameterTypeDescription
leaderboardarrayArray of leaderboard entries
rankstringLeaderboard rank position
proxyWalletstringUser proxy wallet address
userNamestringUser display name
volnumberTrading volume
pnlnumberProfit and loss
profileImagestringUser profile image URL
xUsernamestringTwitter/X username
verifiedBadgebooleanWhether user has verified badge

polymarket_get_holders

Input

ParameterTypeRequiredDescription
marketstringYesComma-separated list of condition IDs (e.g., "0x1234...abcd" or "0x1234...abcd,0x5678...efgh").
limitstringNoNumber of holders to return (e.g., "10"). Range: 0-20, default: 20.
minBalancestringNoNo description

Output

ParameterTypeDescription
holdersarrayArray of market holder groups by token
tokenstringToken/asset ID
holdersarrayArray of holders for this token
proxyWalletstringHolder wallet address
biostringHolder bio
assetstringAsset ID
pseudonymstringHolder pseudonym
amountnumberAmount held
displayUsernamePublicbooleanWhether username is publicly displayed
outcomeIndexnumberOutcome index
namestringHolder display name
profileImagestringProfile image URL
profileImageOptimizedstringOptimized profile image URL

On this page

Start building today
Trusted by over 100,000 builders.
The SaaS platform to build AI agents and run your agentic workforce.
Get started