@apicity/polymarket
Polymarket API provider — Gamma, Data, and CLOB market-data/trading endpoints.
Runtime dependencies:
viem@^2.52.2— EIP-712 order signing for the CLOB trading endpointszod@^4.6.6— request schemas attached to every POST endpoint as.schema
Installation
npm install @apicity/polymarket
# or
pnpm add @apicity/polymarket
Quick Start
import { createPolymarket } from "@apicity/polymarket";
const polymarket = createPolymarket();
Unsupported Upstream Paths
The current Polymarket OpenAPI specs mark some paths as x-excluded; @apicity/polymarket intentionally does not expose wrappers for those unsupported surfaces. That includes Gamma administrative/private paths such as team detail, event pagination/results/comment-count, market information and abridged POST endpoints, series summaries, and private profile lookups, plus Data /revisions and /other.
API Reference
108 endpoints across 3 groups. Each method mirrors an upstream URL path.
clob
DELETE polymarket.clob.auth.apiKey
DELETE https://clob.polymarket.com/auth/api-key
Cost tier: cheap
const res = await polymarket.delete.clob.auth.apiKey();
DELETE polymarket.clob.auth.builderApiKey
DELETE https://clob.polymarket.com/auth/builder-api-key
Cost tier: cheap
const res = await polymarket.delete.clob.auth.builderApiKey();
DELETE polymarket.clob.cancelAll
DELETE https://clob.polymarket.com/cancel-all
Cost tier: cheap
const res = await polymarket.delete.clob.cancelAll();
DELETE polymarket.clob.cancelMarketOrders
DELETE https://clob.polymarket.com/cancel-market-orders
Cost tier: cheap
const res = await polymarket.delete.clob.cancelMarketOrders({ /* ... */ });
DELETE polymarket.clob.notifications
DELETE https://clob.polymarket.com/notifications{query}
Cost tier: cheap
const res = await polymarket.delete.clob.notifications({ /* ... */ });
DELETE polymarket.clob.order
DELETE https://clob.polymarket.com/order
Cost tier: cheap
const res = await polymarket.delete.clob.order({ /* ... */ });
DELETE polymarket.clob.orders
DELETE https://clob.polymarket.com/orders
Cost tier: cheap
const res = await polymarket.delete.clob.orders({ /* ... */ });
GET polymarket.clob.auth.apiKeys
GET https://clob.polymarket.com/auth/api-keys
Cost tier: cheap
const res = await polymarket.get.clob.auth.apiKeys({ /* ... */ });
GET polymarket.clob.auth.banStatus.closedOnly
GET https://clob.polymarket.com/auth/ban-status/closed-only
Cost tier: cheap
const res = await polymarket.get.clob.auth.banStatus.closedOnly();
GET polymarket.clob.auth.builderApiKey
GET https://clob.polymarket.com/auth/builder-api-key
Cost tier: cheap
const res = await polymarket.get.clob.auth.builderApiKey();
GET polymarket.clob.auth.deriveApiKey
GET https://clob.polymarket.com/auth/derive-api-key
Cost tier: cheap
const res = await polymarket.get.clob.auth.deriveApiKey({ /* ... */ });
GET polymarket.clob.balanceAllowance
GET https://clob.polymarket.com/balance-allowance{query}
Cost tier: cheap
const res = await polymarket.get.clob.balanceAllowance({ /* ... */ });
GET polymarket.clob.balanceAllowance.update
GET https://clob.polymarket.com/balance-allowance/update{query}
Cost tier: cheap
const res = await polymarket.get.clob.balanceAllowance.update({ /* ... */ });
GET polymarket.clob.book
GET https://clob.polymarket.com/book{query}
Cost tier: cheap
const res = await polymarket.get.clob.book({ /* ... */ });
GET polymarket.clob.books
GET https://clob.polymarket.com/books{query}
Cost tier: cheap
const res = await polymarket.get.clob.books({ /* ... */ });
GET polymarket.clob.builderTrades
GET https://clob.polymarket.com/builder/trades{query}
Cost tier: cheap
const res = await polymarket.get.clob.builderTrades({ /* ... */ });
GET polymarket.clob.clobMarkets
GET https://clob.polymarket.com/clob-markets/{conditionId}
Cost tier: cheap
const res = await polymarket.get.clob.clobMarkets({ /* ... */ });
GET polymarket.clob.data.order
GET https://clob.polymarket.com/data/order/{orderID}
Cost tier: cheap
const res = await polymarket.get.clob.data.order({ /* ... */ });
GET polymarket.clob.data.orders
GET https://clob.polymarket.com/data/orders{query}
Cost tier: cheap
const res = await polymarket.get.clob.data.orders({ /* ... */ });
GET polymarket.clob.data.trades
GET https://clob.polymarket.com/data/trades{query}
Cost tier: cheap
const res = await polymarket.get.clob.data.trades({ /* ... */ });
GET polymarket.clob.feeRate
GET https://clob.polymarket.com/fee-rate/{tokenId}
Cost tier: cheap
const res = await polymarket.get.clob.feeRate({ /* ... */ });
GET polymarket.clob.feeRateByQuery
GET https://clob.polymarket.com/fee-rate{query}
Cost tier: cheap
const res = await polymarket.get.clob.feeRateByQuery({ /* ... */ });
GET polymarket.clob.lastTradePrice
GET https://clob.polymarket.com/last-trade-price{query}
Cost tier: cheap
const res = await polymarket.get.clob.lastTradePrice({ /* ... */ });
GET polymarket.clob.lastTradesPrices
GET https://clob.polymarket.com/last-trades-prices{query}
Cost tier: cheap
const res = await polymarket.get.clob.lastTradesPrices({ /* ... */ });
GET polymarket.clob.marketLiveActivity
GET https://clob.polymarket.com/markets/live-activity/{conditionId}
Cost tier: cheap
const res = await polymarket.get.clob.marketLiveActivity({ /* ... */ });
GET polymarket.clob.markets
GET https://clob.polymarket.com/markets/{paramsOrConditionIdOrSignal}
Cost tier: cheap
Legacy compatibility: current public market discovery is documented on the Gamma
/marketspages. The CLOB/marketscompatibility path is retained for existing callers and is documented by the CLOB OpenAPI spec.
const res = await polymarket.get.clob.markets({ /* ... */ });
GET polymarket.clob.marketsByToken
GET https://clob.polymarket.com/markets-by-token/{tokenId}
Cost tier: cheap
const res = await polymarket.get.clob.marketsByToken({ /* ... */ });
GET polymarket.clob.midpoint
GET https://clob.polymarket.com/midpoint{query}
Cost tier: cheap
const res = await polymarket.get.clob.midpoint({ /* ... */ });
GET polymarket.clob.midpoints
GET https://clob.polymarket.com/midpoints{query}
Cost tier: cheap
const res = await polymarket.get.clob.midpoints({ /* ... */ });
GET polymarket.clob.negRisk
GET https://clob.polymarket.com/neg-risk/{tokenId}
Cost tier: cheap
const res = await polymarket.get.clob.negRisk({ /* ... */ });
GET polymarket.clob.negRiskByQuery
GET https://clob.polymarket.com/neg-risk{query}
Cost tier: cheap
const res = await polymarket.get.clob.negRiskByQuery({ /* ... */ });
GET polymarket.clob.notifications
GET https://clob.polymarket.com/notifications{query}
Cost tier: cheap
const res = await polymarket.get.clob.notifications({ /* ... */ });
GET polymarket.clob.orderScoring
GET https://clob.polymarket.com/order-scoring{query}
Cost tier: cheap
const res = await polymarket.get.clob.orderScoring({ /* ... */ });
GET polymarket.clob.ordersScoring
GET https://clob.polymarket.com/orders-scoring{query}
Cost tier: cheap
const res = await polymarket.get.clob.ordersScoring({ /* ... */ });
GET polymarket.clob.price
GET https://clob.polymarket.com/price{query}
Cost tier: cheap
const res = await polymarket.get.clob.price({ /* ... */ });
GET polymarket.clob.prices
GET https://clob.polymarket.com/prices{query}
Cost tier: cheap
const res = await polymarket.get.clob.prices({ /* ... */ });
GET polymarket.clob.pricesHistory
GET https://clob.polymarket.com/prices-history{query}
Cost tier: cheap
const res = await polymarket.get.clob.pricesHistory({ /* ... */ });
GET polymarket.clob.rebates.current
GET https://clob.polymarket.com/rebates/current{query}
Cost tier: cheap
const res = await polymarket.get.clob.rebates.current({ /* ... */ });
GET polymarket.clob.rewards.markets.byCondition
GET https://clob.polymarket.com/rewards/markets/{conditionId}{query}
Cost tier: cheap
const res = await polymarket.get.clob.rewards.markets.byCondition({ /* ... */ });
GET polymarket.clob.rewards.markets.current
GET https://clob.polymarket.com/rewards/markets/current{query}
Cost tier: cheap
const res = await polymarket.get.clob.rewards.markets.current({ /* ... */ });
GET polymarket.clob.rewards.markets.multi
GET https://clob.polymarket.com/rewards/markets/multi{query}
Cost tier: cheap
const res = await polymarket.get.clob.rewards.markets.multi({ /* ... */ });
GET polymarket.clob.rewards.user
GET https://clob.polymarket.com/rewards/user{query}
Cost tier: cheap
const res = await polymarket.get.clob.rewards.user({ /* ... */ });
GET polymarket.clob.rewards.userMarkets
GET https://clob.polymarket.com/rewards/user/markets{query}
Cost tier: cheap
const res = await polymarket.get.clob.rewards.userMarkets({ /* ... */ });
GET polymarket.clob.rewards.userPercentages
GET https://clob.polymarket.com/rewards/user/percentages{query}
Cost tier: cheap
const res = await polymarket.get.clob.rewards.userPercentages({ /* ... */ });
GET polymarket.clob.rewards.userTotal
GET https://clob.polymarket.com/rewards/user/total{query}
Cost tier: cheap
const res = await polymarket.get.clob.rewards.userTotal({ /* ... */ });
GET polymarket.clob.samplingMarkets
GET https://clob.polymarket.com/sampling-markets{query}
Cost tier: cheap
const res = await polymarket.get.clob.samplingMarkets({ /* ... */ });
GET polymarket.clob.samplingSimplifiedMarkets
GET https://clob.polymarket.com/sampling-simplified-markets{query}
Cost tier: cheap
const res = await polymarket.get.clob.samplingSimplifiedMarkets({ /* ... */ });
GET polymarket.clob.simplifiedMarkets
GET https://clob.polymarket.com/simplified-markets{query}
Cost tier: cheap
const res = await polymarket.get.clob.simplifiedMarkets({ /* ... */ });
GET polymarket.clob.spread
GET https://clob.polymarket.com/spread{query}
Cost tier: cheap
const res = await polymarket.get.clob.spread({ /* ... */ });
GET polymarket.clob.tickSize
GET https://clob.polymarket.com/tick-size/{tokenId}
Cost tier: cheap
const res = await polymarket.get.clob.tickSize({ /* ... */ });
GET polymarket.clob.tickSizeByQuery
GET https://clob.polymarket.com/tick-size{query}
Cost tier: cheap
const res = await polymarket.get.clob.tickSizeByQuery({ /* ... */ });
GET polymarket.clob.time
GET https://clob.polymarket.com/time
Cost tier: cheap
const res = await polymarket.get.clob.time();
POST polymarket.clob.auth.apiKey
POST https://clob.polymarket.com/auth/api-key
Cost tier: cheap
const res = await polymarket.post.clob.auth.apiKey({ /* ... */ });
POST polymarket.clob.auth.builderApiKey
POST https://clob.polymarket.com/auth/builder-api-key
Cost tier: cheap
const res = await polymarket.post.clob.auth.builderApiKey();
POST polymarket.clob.batchPricesHistory
POST https://clob.polymarket.com/batch-prices-history
Cost tier: cheap
const res = await polymarket.post.clob.batchPricesHistory({ /* ... */ });
POST polymarket.clob.books
POST https://clob.polymarket.com/books
Cost tier: cheap
const res = await polymarket.post.clob.books({ /* ... */ });
POST polymarket.clob.heartbeats
POST https://clob.polymarket.com/heartbeats
Cost tier: cheap
const res = await polymarket.post.clob.heartbeats();
POST polymarket.clob.lastTradesPrices
POST https://clob.polymarket.com/last-trades-prices
Cost tier: cheap
const res = await polymarket.post.clob.lastTradesPrices({ /* ... */ });
POST polymarket.clob.marketsLiveActivity
POST https://clob.polymarket.com/markets/live-activity
Cost tier: cheap
const res = await polymarket.post.clob.marketsLiveActivity({ /* ... */ });
POST polymarket.clob.midpoints
POST https://clob.polymarket.com/midpoints
Cost tier: cheap
const res = await polymarket.post.clob.midpoints({ /* ... */ });
POST polymarket.clob.order
POST https://clob.polymarket.com/order
Cost tier: cheap
const res = await polymarket.post.clob.order({ /* ... */ });
POST polymarket.clob.orders
POST https://clob.polymarket.com/orders
Cost tier: cheap
const res = await polymarket.post.clob.orders({ /* ... */ });
POST polymarket.clob.ordersScoring
POST https://clob.polymarket.com/orders-scoring
Cost tier: cheap
const res = await polymarket.post.clob.ordersScoring({ /* ... */ });
POST polymarket.clob.placeOrder
POST https://clob.polymarket.com/order
Cost tier: cheap
const res = await polymarket.post.clob.placeOrder({ /* ... */ });
POST polymarket.clob.prices
POST https://clob.polymarket.com/prices
Cost tier: cheap
const res = await polymarket.post.clob.prices({ /* ... */ });
POST polymarket.clob.spreads
POST https://clob.polymarket.com/spreads
Cost tier: cheap
const res = await polymarket.post.clob.spreads({ /* ... */ });
POST polymarket.clob.v1.heartbeats
POST https://clob.polymarket.com/v1/heartbeats
Cost tier: cheap
const res = await polymarket.post.clob.v1.heartbeats({ /* ... */ });
PUT polymarket.clob.balanceAllowance
PUT https://clob.polymarket.com/balance-allowance{query}
Cost tier: cheap
const res = await polymarket.put.clob.balanceAllowance({ /* ... */ });
data
GET polymarket.data.accounting.snapshot
GET https://data-api.polymarket.com/v1/accounting/snapshot{query}
Cost tier: cheap
const res = await polymarket.get.data.accounting.snapshot({ /* ... */ });
GET polymarket.data.activity
GET https://data-api.polymarket.com/activity{query}
Cost tier: cheap
const res = await polymarket.get.data.activity({ /* ... */ });
GET polymarket.data.activity.combos
GET https://data-api.polymarket.com/v1/activity/combos{query}
Cost tier: cheap
const res = await polymarket.get.data.activity.combos({ /* ... */ });
GET polymarket.data.builders.leaderboard
GET https://data-api.polymarket.com/v1/builders/leaderboard{query}
Cost tier: cheap
const res = await polymarket.get.data.builders.leaderboard({ /* ... */ });
GET polymarket.data.builders.volume
GET https://data-api.polymarket.com/v1/builders/volume{query}
Cost tier: cheap
const res = await polymarket.get.data.builders.volume({ /* ... */ });
GET polymarket.data.closedPositions
GET https://data-api.polymarket.com/closed-positions{query}
Cost tier: cheap
const res = await polymarket.get.data.closedPositions({ /* ... */ });
GET polymarket.data.health
GET https://data-api.polymarket.com/
Cost tier: cheap
const res = await polymarket.get.data.health();
GET polymarket.data.holders
GET https://data-api.polymarket.com/holders{query}
Cost tier: cheap
const res = await polymarket.get.data.holders({ /* ... */ });
GET polymarket.data.leaderboard
GET https://data-api.polymarket.com/v1/leaderboard{query}
Cost tier: cheap
const res = await polymarket.get.data.leaderboard({ /* ... */ });
GET polymarket.data.liveVolume
GET https://data-api.polymarket.com/live-volume{query}
Cost tier: cheap
const res = await polymarket.get.data.liveVolume({ /* ... */ });
GET polymarket.data.marketPositions
GET https://data-api.polymarket.com/v1/market-positions{query}
Cost tier: cheap
const res = await polymarket.get.data.marketPositions({ /* ... */ });
GET polymarket.data.oi
GET https://data-api.polymarket.com/oi{query}
Cost tier: cheap
const res = await polymarket.get.data.oi({ /* ... */ });
GET polymarket.data.positions
GET https://data-api.polymarket.com/positions{query}
Cost tier: cheap
const res = await polymarket.get.data.positions({ /* ... */ });
GET polymarket.data.positions.combos
GET https://data-api.polymarket.com/v1/positions/combos{query}
Cost tier: cheap
const res = await polymarket.get.data.positions.combos({ /* ... */ });
GET polymarket.data.traded
GET https://data-api.polymarket.com/traded{query}
Cost tier: cheap
const res = await polymarket.get.data.traded({ /* ... */ });
GET polymarket.data.trades
GET https://data-api.polymarket.com/trades{query}
Cost tier: cheap
const res = await polymarket.get.data.trades({ /* ... */ });
GET polymarket.data.value
GET https://data-api.polymarket.com/value{query}
Cost tier: cheap
const res = await polymarket.get.data.value({ /* ... */ });
gamma
GET polymarket.gamma.comments
GET https://gamma-api.polymarket.com/comments/{paramsOrIdOrSignal}
Cost tier: cheap
const res = await polymarket.get.gamma.comments({ /* ... */ });
GET polymarket.gamma.comments.byUser
GET https://gamma-api.polymarket.com/comments/user_address/{address}{query}
Cost tier: cheap
const res = await polymarket.get.gamma.comments.byUser({ /* ... */ });
GET polymarket.gamma.events
GET https://gamma-api.polymarket.com/events/{paramsOrIdOrSignal}
Cost tier: cheap
Deprecated upstream: the replay fixture for the list form
GET /events?...returnedDeprecation: true,Sunset: Fri, 01 May 2026 00:00:00 GMT, andWarning: 299 - "use /events/keyset". This compatibility method remains for existing bare-array/eventscallers; preferpolymarket.gamma.events.keyset()for new paginated event lists.
const res = await polymarket.get.gamma.events({ /* ... */ });
GET polymarket.gamma.events.keyset
GET https://gamma-api.polymarket.com/events/keyset{query}
Cost tier: cheap
const res = await polymarket.get.gamma.events.keyset({ /* ... */ });
GET polymarket.gamma.events.slug
GET https://gamma-api.polymarket.com/events/slug/{slug}
Cost tier: cheap
const res = await polymarket.get.gamma.events.slug({ /* ... */ });
GET polymarket.gamma.events.tags
GET https://gamma-api.polymarket.com/events/{id}/tags
Cost tier: cheap
const res = await polymarket.get.gamma.events.tags({ /* ... */ });
GET polymarket.gamma.markets
GET https://gamma-api.polymarket.com/markets/{paramsOrIdOrSignal}
Cost tier: cheap
const res = await polymarket.get.gamma.markets({ /* ... */ });
GET polymarket.gamma.markets.keyset
GET https://gamma-api.polymarket.com/markets/keyset{query}
Cost tier: cheap
const res = await polymarket.get.gamma.markets.keyset({ /* ... */ });
GET polymarket.gamma.markets.slug
GET https://gamma-api.polymarket.com/markets/slug/{slug}
Cost tier: cheap
const res = await polymarket.get.gamma.markets.slug({ /* ... */ });
GET polymarket.gamma.markets.tags
GET https://gamma-api.polymarket.com/markets/{id}/tags
Cost tier: cheap
const res = await polymarket.get.gamma.markets.tags({ /* ... */ });
GET polymarket.gamma.publicProfile
GET https://gamma-api.polymarket.com/public-profile{query}
Cost tier: cheap
const res = await polymarket.get.gamma.publicProfile({ /* ... */ });
GET polymarket.gamma.search
GET https://gamma-api.polymarket.com/public-search{query}
Cost tier: cheap
const res = await polymarket.get.gamma.search({ /* ... */ });
GET polymarket.gamma.series
GET https://gamma-api.polymarket.com/series/{paramsOrIdOrSignal}
Cost tier: cheap
const res = await polymarket.get.gamma.series({ /* ... */ });
GET polymarket.gamma.sports
GET https://gamma-api.polymarket.com/sports
Cost tier: cheap
const res = await polymarket.get.gamma.sports();
GET polymarket.gamma.sports.marketTypes
GET https://gamma-api.polymarket.com/sports/market-types
Cost tier: cheap
const res = await polymarket.get.gamma.sports.marketTypes();
GET polymarket.gamma.status
GET https://gamma-api.polymarket.com/status
Cost tier: cheap
const res = await polymarket.get.gamma.status();
GET polymarket.gamma.tags
GET https://gamma-api.polymarket.com/tags/{paramsOrIdOrSignal}
Cost tier: cheap
const res = await polymarket.get.gamma.tags({ /* ... */ });
GET polymarket.gamma.tags.relatedTags
GET https://gamma-api.polymarket.com/tags/{id}/related-tags{query}
Cost tier: cheap
const res = await polymarket.get.gamma.tags.relatedTags({ /* ... */ });
GET polymarket.gamma.tags.relatedTags.slug
GET https://gamma-api.polymarket.com/tags/slug/{slug}/related-tags{query}
Cost tier: cheap
const res = await polymarket.get.gamma.tags.relatedTags.slug({ /* ... */ });
GET polymarket.gamma.tags.relatedTags.tags
GET https://gamma-api.polymarket.com/tags/{id}/related-tags/tags{query}
Cost tier: cheap
const res = await polymarket.get.gamma.tags.relatedTags.tags({ /* ... */ });
GET polymarket.gamma.tags.relatedTags.tags.slug
GET https://gamma-api.polymarket.com/tags/slug/{slug}/related-tags/tags{query}
Cost tier: cheap
const res = await polymarket.get.gamma.tags.relatedTags.tags.slug({ /* ... */ });
GET polymarket.gamma.tags.slug
GET https://gamma-api.polymarket.com/tags/slug/{slug}
Cost tier: cheap
const res = await polymarket.get.gamma.tags.slug({ /* ... */ });
GET polymarket.gamma.teams
GET https://gamma-api.polymarket.com/teams{query}
Cost tier: cheap
const res = await polymarket.get.gamma.teams({ /* ... */ });
Part of the apicity monorepo.
License
MIT — see LICENSE.