AptlyStar

Polymarket

Access prediction markets data from Polymarket

Polymarket is a decentralized prediction markets platform where users can trade on the outcome of future events using blockchain technology. Polymarket provides a comprehensive API, enabling developers and agents to access live market data, event listings, price information, and orderbook statistics to power data-driven workflows and AI automations.

With Polymarket’s API and Aptlystar integration, you can enable agents to programmatically retrieve prediction market information, explore open markets and associated events, analyze historical price data, and access orderbooks and market midpoints. This creates new possibilities for research, automated analysis, and developing intelligent agents that react to real-time event probabilities derived from market prices.

Key features of the Polymarket integration include:

  • Market Listing & Filtering: List all current or historical prediction markets, filter by tag, sort, and paginate through results.
  • Market Detail: Retrieve details for a single market by market ID or slug, including its outcomes and status.
  • Event Listings: Access lists of Polymarket events and detailed event information.
  • Orderbook & Price Data: Analyze the orderbook, get the latest market prices, view the midpoint, or obtain historical price information for any market.
  • Automation Ready: Build agents or tools that react programmatically to market developments, changing odds, or specific event outcomes.

By using these documented API endpoints, you can seamlessly integrate Polymarket’s rich on-chain prediction market data into your own AI workflows, dashboards, research tools, and trading automations.

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

Retrieve a list of prediction markets from Polymarket with optional filtering

Input

ParameterTypeRequiredDescription
closedstringNoFilter by closed status (true/false). Use false for open markets only.
orderstringNoSort field (e.g., volumeNum, liquidityNum, startDate, endDate, createdAt)
ascendingstringNoSort direction (true for ascending, false for descending)
tagIdstringNoFilter by tag ID
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

Retrieve details of a specific prediction market by ID or slug

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

Retrieve a list of events from Polymarket with optional filtering

Input

ParameterTypeRequiredDescription
closedstringNoFilter by closed status (true/false). Use false for open events only.
orderstringNoSort field (e.g., volume, liquidity, startDate, endDate, createdAt)
ascendingstringNoSort direction (true for ascending, false for descending)
tagIdstringNoFilter by tag ID
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

Retrieve details of a specific event by ID or slug

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

Retrieve available tags for filtering markets from Polymarket

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

Search for markets, events, and profiles on Polymarket

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.
cachestringNoEnable caching (true/false)
eventsStatusstringNoFilter events by status
limitPerTypestringNoLimit results per type (markets, events, profiles)
eventsTagstringNoFilter by event tags (comma-separated)
sortstringNoSort field
ascendingstringNoSort direction (true for ascending, false for descending)
searchTagsstringNoInclude tags in search results (true/false)
searchProfilesstringNoInclude profiles in search results (true/false)
recurrencestringNoFilter by recurrence type
excludeTagIdstringNoExclude events with these tag IDs (comma-separated)
keepClosedMarketsstringNoInclude closed markets in results (0 or 1)

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

Retrieve series (related market groups) from Polymarket

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

Retrieve a specific series (related market group) by ID from Polymarket

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

Retrieve the order book summary for a specific token

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

Retrieve the market price for a specific token and side

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

Retrieve the midpoint price for a specific token

Input

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

Output

ParameterTypeDescription
midpointstringMidpoint price

polymarket_get_price_history

Retrieve historical price data for a specific market token

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.
fidelitynumberNoData resolution in minutes (e.g., 60 for hourly)
startTsnumberNoStart timestamp (Unix seconds UTC)
endTsnumberNoEnd timestamp (Unix seconds UTC)

Output

ParameterTypeDescription
historyarrayArray of price history entries
↳ tnumberUnix timestamp
↳ pnumberPrice at timestamp

polymarket_get_last_trade_price

Retrieve the last trade price for a specific token

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

Retrieve the bid-ask spread for a specific token

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

Retrieve the minimum tick size for a specific token

Input

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

Output

ParameterTypeDescription
tickSizestringMinimum tick size

polymarket_get_positions

Retrieve user positions from Polymarket

Input

ParameterTypeRequiredDescription
userstringYesUser wallet address
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.
sizeThresholdstringNoMinimum position size threshold (default: 1)
redeemablestringNoFilter for redeemable positions only (true/false)
mergeablestringNoFilter for mergeable positions only (true/false)
sortBystringNoSort field (TOKENS, CURRENT, INITIAL, CASHPNL, PERCENTPNL, TITLE, RESOLVING, PRICE, AVGPRICE)
sortDirectionstringNoSort direction (ASC or DESC)
titlestringNoSearch filter by title
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

Retrieve trade history from Polymarket

Input

ParameterTypeRequiredDescription
userstringNoUser wallet address to filter trades
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.
sidestringNoTrade direction filter (BUY or SELL)
takerOnlystringNoFilter for taker trades only (true/false, default: true)
filterTypestringNoFilter type (CASH or TOKENS) - requires filterAmount
filterAmountstringNoFilter amount threshold - requires filterType
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
userstringYesUser wallet address (0x-prefixed)
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
startnumberNoStart timestamp (Unix seconds)
endnumberNoEnd timestamp (Unix seconds)
sortBystringNoSort field: TIMESTAMP, TOKENS, or CASH (default: TIMESTAMP)
sortDirectionstringNoSort direction: ASC or DESC (default: DESC)
sidestringNoTrade side filter: BUY or SELL (only applies to trades)

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

Retrieve trader leaderboard rankings by profit/loss or volume

Input

ParameterTypeRequiredDescription
categorystringNoCategory filter: OVERALL, POLITICS, SPORTS, CRYPTO, CULTURE, MENTIONS, WEATHER, ECONOMICS, TECH, FINANCE (default: OVERALL)
timePeriodstringNoTime period: DAY, WEEK, MONTH, ALL (default: DAY)
orderBystringNoOrder by: PNL or VOL (default: PNL)
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.
userstringNoFilter by specific user wallet address
userNamestringNoFilter by username

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

Retrieve top holders of a specific market token

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.
minBalancestringNoMinimum balance threshold (default: 1)

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