@相片/市场
Polymarket API供应商——Gamma、Data和CLOB市场数据/交易终点.
运行时间依赖性 :
viem@^2.52.2- 为CLOB交易端点签署EIP-712订单zod@^4.6.6- 请求在每一个 POST 端点上附加计划.schema
安装
npm install @apicity/polymarket
# or
pnpm add @apicity/polymarket
快速启动
import { createPolymarket } from "@apicity/polymarket";
const polymarket = createPolymarket();
不支持的上游路径
当前 Polymarket OpenAPI 规格将一些路径标记为 x-excluded· ; @apicity/polymarket 故意不暴露这些无支持的表面的包装. 这包括Gamma 行政/私人路径,如团队细节、事件标记/结果/评论 -- -- 计数、市场信息和简略的 POST 端点、系列摘要和私人概况查看,以及数据 /revisions 财务报告和审定财务报表 /other。 。 。 .
API 参考
108个端点跨出3个组. 每个方法都映射出上游的 URL 路径 .
块
DELETE polymarket.clob.auth.apiKey
DELETE https://clob.polymarket.com/auth/api-key
成本等级 : cheap
const res = await polymarket.delete.clob.auth.apiKey();
DELETE polymarket.clob.auth.builderApiKey
DELETE https://clob.polymarket.com/auth/builder-api-key
成本等级 : cheap
const res = await polymarket.delete.clob.auth.builderApiKey();
DELETE polymarket.clob.cancelAll
DELETE https://clob.polymarket.com/cancel-all
成本等级 : cheap
const res = await polymarket.delete.clob.cancelAll();
DELETE polymarket.clob.cancelMarketOrders
DELETE https://clob.polymarket.com/cancel-market-orders
成本等级 : cheap
const res = await polymarket.delete.clob.cancelMarketOrders({ /* ... */ });
DELETE polymarket.clob.notifications
DELETE https://clob.polymarket.com/notifications{query}
成本等级 : cheap
const res = await polymarket.delete.clob.notifications({ /* ... */ });
DELETE polymarket.clob.order
DELETE https://clob.polymarket.com/order
成本等级 : cheap
const res = await polymarket.delete.clob.order({ /* ... */ });
DELETE polymarket.clob.orders
DELETE https://clob.polymarket.com/orders
成本等级 : cheap
const res = await polymarket.delete.clob.orders({ /* ... */ });
GET polymarket.clob.auth.apiKeys
GET https://clob.polymarket.com/auth/api-keys
成本等级 : 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
成本等级 : cheap
const res = await polymarket.get.clob.auth.banStatus.closedOnly();
GET polymarket.clob.auth.builderApiKey
GET https://clob.polymarket.com/auth/builder-api-key
成本等级 : cheap
const res = await polymarket.get.clob.auth.builderApiKey();
GET polymarket.clob.auth.deriveApiKey
GET https://clob.polymarket.com/auth/derive-api-key
成本等级 : cheap
const res = await polymarket.get.clob.auth.deriveApiKey({ /* ... */ });
GET polymarket.clob.balanceAllowance
GET https://clob.polymarket.com/balance-allowance{query}
成本等级 : cheap
const res = await polymarket.get.clob.balanceAllowance({ /* ... */ });
GET polymarket.clob.balanceAllowance.update
GET https://clob.polymarket.com/balance-allowance/update{query}
成本等级 : cheap
const res = await polymarket.get.clob.balanceAllowance.update({ /* ... */ });
GET polymarket.clob.book
GET https://clob.polymarket.com/book{query}
成本等级 : cheap
const res = await polymarket.get.clob.book({ /* ... */ });
GET polymarket.clob.books
GET https://clob.polymarket.com/books{query}
成本等级 : cheap
const res = await polymarket.get.clob.books({ /* ... */ });
GET polymarket.clob.builderTrades
GET https://clob.polymarket.com/builder/trades{query}
成本等级 : cheap
const res = await polymarket.get.clob.builderTrades({ /* ... */ });
GET polymarket.clob.clobMarkets
GET https://clob.polymarket.com/clob-markets/{conditionId}
成本等级 : cheap
const res = await polymarket.get.clob.clobMarkets({ /* ... */ });
GET polymarket.clob.data.order
GET https://clob.polymarket.com/data/order/{orderID}
成本等级 : cheap
const res = await polymarket.get.clob.data.order({ /* ... */ });
GET polymarket.clob.data.orders
GET https://clob.polymarket.com/data/orders{query}
成本等级 : cheap
const res = await polymarket.get.clob.data.orders({ /* ... */ });
GET polymarket.clob.data.trades
GET https://clob.polymarket.com/data/trades{query}
成本等级 : cheap
const res = await polymarket.get.clob.data.trades({ /* ... */ });
GET polymarket.clob.feeRate
GET https://clob.polymarket.com/fee-rate/{tokenId}
成本等级 : cheap
const res = await polymarket.get.clob.feeRate({ /* ... */ });
GET polymarket.clob.feeRateByQuery
GET https://clob.polymarket.com/fee-rate{query}
成本等级 : cheap
const res = await polymarket.get.clob.feeRateByQuery({ /* ... */ });
GET polymarket.clob.lastTradePrice
GET https://clob.polymarket.com/last-trade-price{query}
成本等级 : cheap
const res = await polymarket.get.clob.lastTradePrice({ /* ... */ });
GET polymarket.clob.lastTradesPrices
GET https://clob.polymarket.com/last-trades-prices{query}
成本等级 : cheap
const res = await polymarket.get.clob.lastTradesPrices({ /* ... */ });
GET polymarket.clob.marketLiveActivity
GET https://clob.polymarket.com/markets/live-activity/{conditionId}
成本等级 : cheap
const res = await polymarket.get.clob.marketLiveActivity({ /* ... */ });
GET polymarket.clob.markets
GET https://clob.polymarket.com/markets/{paramsOrConditionIdOrSignal}
成本等级 : cheap
遗产兼容性 : 目前公共市场的发现记录在伽马河上
/markets页面。 连锁店/markets兼容性路径被保留给现有的呼叫者,并由CLOB OpenAPI spec来记录.
const res = await polymarket.get.clob.markets({ /* ... */ });
GET polymarket.clob.marketsByToken
GET https://clob.polymarket.com/markets-by-token/{tokenId}
成本等级 : cheap
const res = await polymarket.get.clob.marketsByToken({ /* ... */ });
GET polymarket.clob.midpoint
GET https://clob.polymarket.com/midpoint{query}
成本等级 : cheap
const res = await polymarket.get.clob.midpoint({ /* ... */ });
GET polymarket.clob.midpoints
GET https://clob.polymarket.com/midpoints{query}
成本等级 : cheap
const res = await polymarket.get.clob.midpoints({ /* ... */ });
GET polymarket.clob.negRisk
GET https://clob.polymarket.com/neg-risk/{tokenId}
成本等级 : cheap
const res = await polymarket.get.clob.negRisk({ /* ... */ });
GET polymarket.clob.negRiskByQuery
GET https://clob.polymarket.com/neg-risk{query}
成本等级 : cheap
const res = await polymarket.get.clob.negRiskByQuery({ /* ... */ });
GET polymarket.clob.notifications
GET https://clob.polymarket.com/notifications{query}
成本等级 : cheap
const res = await polymarket.get.clob.notifications({ /* ... */ });
GET polymarket.clob.orderScoring
GET https://clob.polymarket.com/order-scoring{query}
成本等级 : cheap
const res = await polymarket.get.clob.orderScoring({ /* ... */ });
GET polymarket.clob.ordersScoring
GET https://clob.polymarket.com/orders-scoring{query}
成本等级 : cheap
const res = await polymarket.get.clob.ordersScoring({ /* ... */ });
GET polymarket.clob.price
GET https://clob.polymarket.com/price{query}
成本等级 : cheap
const res = await polymarket.get.clob.price({ /* ... */ });
GET polymarket.clob.prices
GET https://clob.polymarket.com/prices{query}
成本等级 : cheap
const res = await polymarket.get.clob.prices({ /* ... */ });
GET polymarket.clob.pricesHistory
GET https://clob.polymarket.com/prices-history{query}
成本等级 : cheap
const res = await polymarket.get.clob.pricesHistory({ /* ... */ });
GET polymarket.clob.rebates.current
GET https://clob.polymarket.com/rebates/current{query}
成本等级 : cheap
const res = await polymarket.get.clob.rebates.current({ /* ... */ });
GET polymarket.clob.rewards.markets.byCondition
GET https://clob.polymarket.com/rewards/markets/{conditionId}{query}
成本等级 : 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}
成本等级 : 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}
成本等级 : cheap
const res = await polymarket.get.clob.rewards.markets.multi({ /* ... */ });
GET polymarket.clob.rewards.user
GET https://clob.polymarket.com/rewards/user{query}
成本等级 : cheap
const res = await polymarket.get.clob.rewards.user({ /* ... */ });
GET polymarket.clob.rewards.userMarkets
GET https://clob.polymarket.com/rewards/user/markets{query}
成本等级 : cheap
const res = await polymarket.get.clob.rewards.userMarkets({ /* ... */ });
GET polymarket.clob.rewards.userPercentages
GET https://clob.polymarket.com/rewards/user/percentages{query}
成本等级 : cheap
const res = await polymarket.get.clob.rewards.userPercentages({ /* ... */ });
GET polymarket.clob.rewards.userTotal
GET https://clob.polymarket.com/rewards/user/total{query}
成本等级 : cheap
const res = await polymarket.get.clob.rewards.userTotal({ /* ... */ });
GET polymarket.clob.samplingMarkets
GET https://clob.polymarket.com/sampling-markets{query}
成本等级 : cheap
const res = await polymarket.get.clob.samplingMarkets({ /* ... */ });
GET polymarket.clob.samplingSimplifiedMarkets
GET https://clob.polymarket.com/sampling-simplified-markets{query}
成本等级 : cheap
const res = await polymarket.get.clob.samplingSimplifiedMarkets({ /* ... */ });
GET polymarket.clob.simplifiedMarkets
GET https://clob.polymarket.com/simplified-markets{query}
成本等级 : cheap
const res = await polymarket.get.clob.simplifiedMarkets({ /* ... */ });
GET polymarket.clob.spread
GET https://clob.polymarket.com/spread{query}
成本等级 : cheap
const res = await polymarket.get.clob.spread({ /* ... */ });
GET polymarket.clob.tickSize
GET https://clob.polymarket.com/tick-size/{tokenId}
成本等级 : cheap
const res = await polymarket.get.clob.tickSize({ /* ... */ });
GET polymarket.clob.tickSizeByQuery
GET https://clob.polymarket.com/tick-size{query}
成本等级 : cheap
const res = await polymarket.get.clob.tickSizeByQuery({ /* ... */ });
GET polymarket.clob.time
GET https://clob.polymarket.com/time
成本等级 : cheap
const res = await polymarket.get.clob.time();
POST polymarket.clob.auth.apiKey
POST https://clob.polymarket.com/auth/api-key
成本等级 : cheap
const res = await polymarket.post.clob.auth.apiKey({ /* ... */ });
POST polymarket.clob.auth.builderApiKey
POST https://clob.polymarket.com/auth/builder-api-key
成本等级 : cheap
const res = await polymarket.post.clob.auth.builderApiKey();
POST polymarket.clob.batchPricesHistory
POST https://clob.polymarket.com/batch-prices-history
成本等级 : cheap
const res = await polymarket.post.clob.batchPricesHistory({ /* ... */ });
POST polymarket.clob.books
POST https://clob.polymarket.com/books
成本等级 : cheap
const res = await polymarket.post.clob.books({ /* ... */ });
POST polymarket.clob.heartbeats
POST https://clob.polymarket.com/heartbeats
成本等级 : cheap
const res = await polymarket.post.clob.heartbeats();
POST polymarket.clob.lastTradesPrices
POST https://clob.polymarket.com/last-trades-prices
成本等级 : cheap
const res = await polymarket.post.clob.lastTradesPrices({ /* ... */ });
POST polymarket.clob.marketsLiveActivity
POST https://clob.polymarket.com/markets/live-activity
成本等级 : cheap
const res = await polymarket.post.clob.marketsLiveActivity({ /* ... */ });
POST polymarket.clob.midpoints
POST https://clob.polymarket.com/midpoints
成本等级 : cheap
const res = await polymarket.post.clob.midpoints({ /* ... */ });
POST polymarket.clob.order
POST https://clob.polymarket.com/order
成本等级 : cheap
const res = await polymarket.post.clob.order({ /* ... */ });
POST polymarket.clob.orders
POST https://clob.polymarket.com/orders
成本等级 : cheap
const res = await polymarket.post.clob.orders({ /* ... */ });
POST polymarket.clob.ordersScoring
POST https://clob.polymarket.com/orders-scoring
成本等级 : cheap
const res = await polymarket.post.clob.ordersScoring({ /* ... */ });
POST polymarket.clob.placeOrder
POST https://clob.polymarket.com/order
成本等级 : cheap
const res = await polymarket.post.clob.placeOrder({ /* ... */ });
POST polymarket.clob.prices
POST https://clob.polymarket.com/prices
成本等级 : cheap
const res = await polymarket.post.clob.prices({ /* ... */ });
POST polymarket.clob.spreads
POST https://clob.polymarket.com/spreads
成本等级 : cheap
const res = await polymarket.post.clob.spreads({ /* ... */ });
POST polymarket.clob.v1.heartbeats
POST https://clob.polymarket.com/v1/heartbeats
成本等级 : cheap
const res = await polymarket.post.clob.v1.heartbeats({ /* ... */ });
PUT polymarket.clob.balanceAllowance
PUT https://clob.polymarket.com/balance-allowance{query}
成本等级 : cheap
const res = await polymarket.put.clob.balanceAllowance({ /* ... */ });
数据
GET polymarket.data.accounting.snapshot
GET https://data-api.polymarket.com/v1/accounting/snapshot{query}
成本等级 : cheap
const res = await polymarket.get.data.accounting.snapshot({ /* ... */ });
GET polymarket.data.activity
GET https://data-api.polymarket.com/activity{query}
成本等级 : cheap
const res = await polymarket.get.data.activity({ /* ... */ });
GET polymarket.data.activity.combos
GET https://data-api.polymarket.com/v1/activity/combos{query}
成本等级 : cheap
const res = await polymarket.get.data.activity.combos({ /* ... */ });
GET polymarket.data.builders.leaderboard
GET https://data-api.polymarket.com/v1/builders/leaderboard{query}
成本等级 : cheap
const res = await polymarket.get.data.builders.leaderboard({ /* ... */ });
GET polymarket.data.builders.volume
GET https://data-api.polymarket.com/v1/builders/volume{query}
成本等级 : cheap
const res = await polymarket.get.data.builders.volume({ /* ... */ });
GET polymarket.data.closedPositions
GET https://data-api.polymarket.com/closed-positions{query}
成本等级 : cheap
const res = await polymarket.get.data.closedPositions({ /* ... */ });
GET polymarket.data.health
GET https://data-api.polymarket.com/
成本等级 : cheap
const res = await polymarket.get.data.health();
GET polymarket.data.holders
GET https://data-api.polymarket.com/holders{query}
成本等级 : cheap
const res = await polymarket.get.data.holders({ /* ... */ });
GET polymarket.data.leaderboard
GET https://data-api.polymarket.com/v1/leaderboard{query}
成本等级 : cheap
const res = await polymarket.get.data.leaderboard({ /* ... */ });
GET polymarket.data.liveVolume
GET https://data-api.polymarket.com/live-volume{query}
成本等级 : cheap
const res = await polymarket.get.data.liveVolume({ /* ... */ });
GET polymarket.data.marketPositions
GET https://data-api.polymarket.com/v1/market-positions{query}
成本等级 : cheap
const res = await polymarket.get.data.marketPositions({ /* ... */ });
GET polymarket.data.oi
GET https://data-api.polymarket.com/oi{query}
成本等级 : cheap
const res = await polymarket.get.data.oi({ /* ... */ });
GET polymarket.data.positions
GET https://data-api.polymarket.com/positions{query}
成本等级 : cheap
const res = await polymarket.get.data.positions({ /* ... */ });
GET polymarket.data.positions.combos
GET https://data-api.polymarket.com/v1/positions/combos{query}
成本等级 : cheap
const res = await polymarket.get.data.positions.combos({ /* ... */ });
GET polymarket.data.traded
GET https://data-api.polymarket.com/traded{query}
成本等级 : cheap
const res = await polymarket.get.data.traded({ /* ... */ });
GET polymarket.data.trades
GET https://data-api.polymarket.com/trades{query}
成本等级 : cheap
const res = await polymarket.get.data.trades({ /* ... */ });
GET polymarket.data.value
GET https://data-api.polymarket.com/value{query}
成本等级 : cheap
const res = await polymarket.get.data.value({ /* ... */ });
伽马
GET polymarket.gamma.comments
GET https://gamma-api.polymarket.com/comments/{paramsOrIdOrSignal}
成本等级 : cheap
const res = await polymarket.get.gamma.comments({ /* ... */ });
GET polymarket.gamma.comments.byUser
GET https://gamma-api.polymarket.com/comments/user_address/{address}{query}
成本等级 : cheap
const res = await polymarket.get.gamma.comments.byUser({ /* ... */ });
GET polymarket.gamma.events
GET https://gamma-api.polymarket.com/events/{paramsOrIdOrSignal}
成本等级 : cheap
上游折旧: 列表表单的重放固定符
GET /events?...已返回Deprecation: true, (中文(简体) ),Sunset: Fri, 01 May 2026 00:00:00 GMT,以及Warning: 299 - "use /events/keyset"。这一兼容方法仍然用于现有的光阵列/events呼叫者; 首选polymarket.gamma.events.keyset()用于新建已标出的事件列表.
const res = await polymarket.get.gamma.events({ /* ... */ });
GET polymarket.gamma.events.keyset
GET https://gamma-api.polymarket.com/events/keyset{query}
成本等级 : cheap
const res = await polymarket.get.gamma.events.keyset({ /* ... */ });
GET polymarket.gamma.events.slug
GET https://gamma-api.polymarket.com/events/slug/{slug}
成本等级 : cheap
const res = await polymarket.get.gamma.events.slug({ /* ... */ });
GET polymarket.gamma.events.tags
GET https://gamma-api.polymarket.com/events/{id}/tags
成本等级 : cheap
const res = await polymarket.get.gamma.events.tags({ /* ... */ });
GET polymarket.gamma.markets
GET https://gamma-api.polymarket.com/markets/{paramsOrIdOrSignal}
成本等级 : cheap
const res = await polymarket.get.gamma.markets({ /* ... */ });
GET polymarket.gamma.markets.keyset
GET https://gamma-api.polymarket.com/markets/keyset{query}
成本等级 : cheap
const res = await polymarket.get.gamma.markets.keyset({ /* ... */ });
GET polymarket.gamma.markets.slug
GET https://gamma-api.polymarket.com/markets/slug/{slug}
成本等级 : cheap
const res = await polymarket.get.gamma.markets.slug({ /* ... */ });
GET polymarket.gamma.markets.tags
GET https://gamma-api.polymarket.com/markets/{id}/tags
成本等级 : cheap
const res = await polymarket.get.gamma.markets.tags({ /* ... */ });
GET polymarket.gamma.publicProfile
GET https://gamma-api.polymarket.com/public-profile{query}
成本等级 : cheap
const res = await polymarket.get.gamma.publicProfile({ /* ... */ });
GET polymarket.gamma.search
GET https://gamma-api.polymarket.com/public-search{query}
成本等级 : cheap
const res = await polymarket.get.gamma.search({ /* ... */ });
GET polymarket.gamma.series
GET https://gamma-api.polymarket.com/series/{paramsOrIdOrSignal}
成本等级 : cheap
const res = await polymarket.get.gamma.series({ /* ... */ });
GET polymarket.gamma.sports
GET https://gamma-api.polymarket.com/sports
成本等级 : cheap
const res = await polymarket.get.gamma.sports();
GET polymarket.gamma.sports.marketTypes
GET https://gamma-api.polymarket.com/sports/market-types
成本等级 : cheap
const res = await polymarket.get.gamma.sports.marketTypes();
GET polymarket.gamma.status
GET https://gamma-api.polymarket.com/status
成本等级 : cheap
const res = await polymarket.get.gamma.status();
GET polymarket.gamma.tags
GET https://gamma-api.polymarket.com/tags/{paramsOrIdOrSignal}
成本等级 : cheap
const res = await polymarket.get.gamma.tags({ /* ... */ });
GET polymarket.gamma.tags.relatedTags
GET https://gamma-api.polymarket.com/tags/{id}/related-tags{query}
成本等级 : 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}
成本等级 : 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}
成本等级 : 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}
成本等级 : 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}
成本等级 : cheap
const res = await polymarket.get.gamma.tags.slug({ /* ... */ });
GET polymarket.gamma.teams
GET https://gamma-api.polymarket.com/teams{query}
成本等级 : cheap
const res = await polymarket.get.gamma.teams({ /* ... */ });
部分 辣点 单相机.
许可证
麻省理工学院——见 自由主义。 。 。 .