openfin-polymarket
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChinesePolymarket
Polymarket
End-to-end playbook for Polymarket through OpenFinance — research, pricing,
order placement, approvals, and user data.
通过OpenFinance实现Polymarket端到端操作手册——研究、定价、下单、授权及用户数据。
Prerequisite (for trading; data endpoints are public)
前置条件(仅交易需要;数据接口为公开接口)
- User completed (API key + EVM wallet delegation).
openfin-setup - Approvals in place — to check,
GET /agent/polymarket/approvalsto set any missing. One-time gas cost.POST /agent/polymarket/approvals - Wallet holds MATIC on Polygon for gas and USDC.e (not native USDC) for trading.
- 用户已完成(API密钥 + EVM钱包委托)。
openfin-setup - 已完成授权——调用检查授权状态,调用
GET /agent/polymarket/approvals设置缺失的授权。仅需一次性支付Gas费用。POST /agent/polymarket/approvals - 钱包在Polygon网络中持有MATIC用于支付Gas费用,以及USDC.e(非原生USDC)用于交易。
Research endpoints (public, no auth)
研究类接口(公开,无需授权)
Events (Gamma API)
事件(Gamma API)
Events group related prediction markets — e.g. one "2024 US Election" event
contains separate candidate markets.
- — Browse events from the world's largest prediction market. Returns a list with metadata, outcomes, volumes, and current status. Optional query params:
GET /agent/polymarket/events,limit,offset(ongoing),active(finished),closed(historical),archived(e.g.order),desc,ascending,slug. Use for sports betting odds (IPL, FIFA, NBA, NFL, F1, UFC, cricket, football), political predictions (elections, policy, government), crypto/finance forecasts, entertainment, or any trending real-world event.tag_id - — Single event by ID. Returns metadata, market information, outcomes, volume, liquidity, current probabilities.
GET /agent/polymarket/events/:eventId - — Same as above, looked up by URL slug.
GET /agent/polymarket/events/slug/:slug - — Real-time trading volume for the event. Useful for gauging attention / money flow on a sports match, election, or trending topic.
GET /agent/polymarket/events/:eventId/volume
事件用于归类相关预测市场——例如,一个“2024年美国大选”事件包含多个独立的候选人市场。
- —— 浏览全球最大预测市场中的事件。返回包含元数据、结果、交易量及当前状态的列表。可选查询参数:
GET /agent/polymarket/events、limit、offset(进行中)、active(已结束)、closed(历史)、archived(例如order)、desc、ascending、slug。适用于体育投注赔率(IPL、FIFA、NBA、NFL、F1、UFC、板球、足球)、政治预测(选举、政策、政府动态)、加密货币/金融预测、娱乐或任何热门现实事件。tag_id - —— 通过ID查询单个事件。返回元数据、市场信息、结果、交易量、流动性及当前概率。
GET /agent/polymarket/events/:eventId - —— 通过URL别名查询,功能与上述接口相同。
GET /agent/polymarket/events/slug/:slug - —— 事件的实时交易量。用于衡量体育赛事、选举或热门话题的关注度/资金流向。
GET /agent/polymarket/events/:eventId/volume
Markets
市场
- — List prediction markets with current prices (implied probabilities), volumes, liquidity, and outcome details. Use to browse for sports, politics, crypto, entertainment, trending events. Optional filters:
GET /agent/polymarket/markets,limit,offset,active,closed,slug,market_id,token_id,condition_id,tag_id,liquidity_min,volume_min,start_date_min,start_date_max,end_date_min.end_date_max - — Single market by numeric ID. Returns prices, orderbook depth, volume, liquidity, outcome details.
GET /agent/polymarket/markets/:marketId - — Same by URL slug.
GET /agent/polymarket/markets/slug/:slug - — Same by on-chain CTF condition ID (bytes32 hex). Useful when you already have the condition ID from a user's position.
GET /agent/polymarket/markets/cid/:conditionId
Every market response contains:
- — on-chain CTF condition identifier
condition_id - — YES/NO outcome tokens with their
tokensstoken_id - — required for correct
min_tick_sizeon orderstickSize - — if true, pass
neg_riskon orders and approvalsnegRisk: true
- —— 列出预测市场,包含当前价格(隐含概率)、交易量、流动性及结果详情。用于浏览体育、政治、加密货币、娱乐及热门事件相关市场。可选筛选条件:
GET /agent/polymarket/markets、limit、offset、active、closed、slug、market_id、token_id、condition_id、tag_id、liquidity_min、volume_min、start_date_min、start_date_max、end_date_min。end_date_max - —— 通过数字ID查询单个市场。返回价格、订单簿深度、交易量、流动性及结果详情。
GET /agent/polymarket/markets/:marketId - —— 通过URL别名查询,功能与上述接口相同。
GET /agent/polymarket/markets/slug/:slug - —— 通过链上CTF条件ID(bytes32十六进制)查询,功能与上述接口相同。当用户持仓中已有条件ID时,此接口非常实用。
GET /agent/polymarket/markets/cid/:conditionId
所有市场响应包含以下字段:
- —— 链上CTF条件标识符
condition_id - —— YES/NO结果代币及其
tokenstoken_id - —— 下单时所需的正确
min_tick_size参数tickSize - —— 若为true,下单和授权时需传入
neg_risknegRisk: true
Search
搜索
- — Search across all events and markets by keyword. Returns matching entries with relevance scoring. Use when the user names a topic — "IPL winner", "FIFA World Cup", "US elections", "Bitcoin price", "Trump", "Modi", "Champions League" — or any trending event, to find betting odds and probabilities on real-world outcomes.
GET /agent/polymarket/public-search?q=<query>
- —— 通过关键词搜索所有事件和市场。返回带有相关性评分的匹配条目。当用户提及特定主题(如“IPL冠军”“FIFA世界杯”“美国大选”“比特币价格”“特朗普”“莫迪”“欧冠联赛”)或任何热门事件时,可使用此接口查找现实结果的投注赔率和概率。
GET /agent/polymarket/public-search?q=<query>
Pricing (CLOB API)
定价(CLOB API)
- — Current orderbook (bids and asks) for a specific outcome token. Returns arrays of buy and sell orders at different price levels with sizes and depths. Use to see market liquidity and available prices before placing an order.
GET /agent/polymarket/orderbook/:tokenId - body
POST /agent/polymarket/orderbooks— Same as above but for multiple tokens in a single request. Returns a map of tokenId → orderbook. More efficient than many individual calls.{tokenIds: [...]} - — Mid price for a token, representing the market-implied probability
GET /agent/polymarket/price/mid/:tokenId. Use to check "what are the odds" or "what is the probability" of an outcome.(0, 1) - — Best BUY or SELL price for the token.
GET /agent/polymarket/price/:tokenId?side=BUYquery param is required:sideorBUY.SELL - — Mid prices for every active outcome token. Returns a map of token ID → probability. Use for scanning odds across all active markets at once.
GET /agent/polymarket/prices - — Bid-ask spread for the token (best ask − best bid). Tight spread = good liquidity; wide = thin book.
GET /agent/polymarket/spread/:tokenId - — Price of the most recent executed trade for the token.
GET /agent/polymarket/last-trade-price/:tokenId - (
GET /agent/polymarket/trades/:marketSlug) — Recent trade tape for a market (by slug). Returns trades with prices, sizes, timestamps, and side (buy/sell). Use to analyze betting activity and see how odds are shifting.?limit=50&offset=0
- —— 特定结果代币的当前订单簿(买单和卖单)。返回不同价格水平的买卖订单数组,包含订单规模和深度。用于下单前查看市场流动性及可用价格。
GET /agent/polymarket/orderbook/:tokenId - 请求体
POST /agent/polymarket/orderbooks—— 功能与上述接口相同,但支持单次请求查询多个代币。返回tokenId → 订单簿的映射。比多次单独调用更高效。{tokenIds: [...]} - —— 代币的中间价,代表市场隐含概率
GET /agent/polymarket/price/mid/:tokenId。用于查看“赔率是多少”或“结果发生的概率是多少”。(0, 1) - —— 代币的最优买价或卖价。必须传入
GET /agent/polymarket/price/:tokenId?side=BUY查询参数:side或BUY。SELL - —— 所有活跃结果代币的中间价。返回代币ID → 概率的映射。用于一次性扫描所有活跃市场的赔率。
GET /agent/polymarket/prices - —— 代币的买卖价差(最优卖价 − 最优买价)。价差小代表流动性好;价差大代表订单簿深度不足。
GET /agent/polymarket/spread/:tokenId - —— 代币最近一次成交的价格。
GET /agent/polymarket/last-trade-price/:tokenId - (
GET /agent/polymarket/trades/:marketSlug) —— 市场的近期交易记录(通过别名查询)。返回包含价格、规模、时间戳及方向(买/卖)的交易信息。用于分析投注活动及赔率变化趋势。?limit=50&offset=0
Market data (Data API)
市场数据(Data API)
- — Total value locked in the market. Returns capital committed to each outcome and overall market size.
GET /agent/polymarket/market/:conditionId/open-interest - — Historical + current volume statistics for the market.
GET /agent/polymarket/market/:marketId/volume - — Current and historical liquidity depth.
GET /agent/polymarket/market/:marketId/liquidity - (
GET /agent/polymarket/market/:marketId/trades) — Detailed trade history with metadata (fuller shape than the CLOB?limit=50endpoint)./trades
- —— 市场的总锁定价值。返回每个结果的投入资金及整体市场规模。
GET /agent/polymarket/market/:conditionId/open-interest - —— 市场的历史及当前交易量统计数据。
GET /agent/polymarket/market/:marketId/volume - —— 市场的当前及历史流动性深度。
GET /agent/polymarket/market/:marketId/liquidity - (
GET /agent/polymarket/market/:marketId/trades) —— 详细的交易历史记录,包含元数据(比CLOB的?limit=50接口返回的信息更全面)。/trades
User data (public, address-scoped)
用户数据(公开,按地址查询)
:address- — Active positions held by the user. Returns outcome tokens, quantities, entry prices, current values, and unrealized PnL per position.
GET /agent/polymarket/user/:address/positions - (
GET /agent/polymarket/user/:address/trades) — Trade history with prices, sizes, timestamps, markets, outcomes. Use to analyze trading patterns and performance.?limit=50&offset=0 - — Full portfolio overview: total value, all positions, realized/unrealized PnL, win rate, performance metrics.
GET /agent/polymarket/user/:address/portfolio - — Standalone PnL stats: realized, unrealized, total, historical performance.
GET /agent/polymarket/user/:address/pnl
:address- —— 用户持有的活跃持仓。返回结果代币、数量、入场价、当前价值及每个持仓的未实现盈亏。
GET /agent/polymarket/user/:address/positions - (
GET /agent/polymarket/user/:address/trades) —— 用户的交易历史,包含价格、规模、时间戳、市场及结果。用于分析交易模式和表现。?limit=50&offset=0 - —— 完整的投资组合概览:总价值、所有持仓、已实现/未实现盈亏、胜率、绩效指标。
GET /agent/polymarket/user/:address/portfolio - —— 独立的盈亏统计:已实现盈亏、未实现盈亏、总盈亏、历史表现。
GET /agent/polymarket/user/:address/pnl
Trading endpoints
交易类接口
All require . Signing is EIP-712 with the caller's
Privy-backed Polygon wallet; first call per user derives and caches the
Polymarket L2 API credentials server-side.
x-api-key: open_…所有接口均需携带签名采用EIP-712标准,调用者的Privy托管Polygon钱包完成签名;用户首次调用时,后端会派生并缓存Polymarket L2 API凭证。
x-api-key: open_…Placing orders
下单
-
— Place a limit order (GTC or GTD) on the Polymarket CLOB. Body fields:
POST /agent/polymarket/orderjson{ "tokenID": "...", // CLOB outcome asset ID (NOT market/condition ID) "price": 0.42, // probability 0.0–1.0 "size": 10, // conditional token units "side": "BUY", // "BUY" | "SELL" "orderType": "GTC", // default "GTC"; "GTD" requires expiration "tickSize": "0.01", // default "0.01"; some markets need "0.001" / "0.0001" "negRisk": false, // true for multi-outcome neg-risk markets "postOnly": false, // only accept if maker (reject if marketable) "expiration": 1735689600 // Unix seconds, required when orderType = "GTD" }Returns the order ID and posting status. Use for user prompts like "buy 10 shares at 0.42" or "place a resting bid at X". -
— Place a market order (FOK or FAK). For BUY,
POST /agent/polymarket/order/marketis USDC to spend; for SELL,amountis shares to sell.amountjson{ "tokenID": "...", "amount": 10, // BUY: USDC to spend · SELL: shares to sell "side": "BUY", "price": 0.42, // optional cap; omit for pure market "orderType": "FOK", // default "FOK" (all-or-nothing) | "FAK" (fill-and-kill) "tickSize": "0.01", "negRisk": false }Use for "buy now" intents. FOK fails if full size can't fill; FAK fills what it can and cancels the rest. -
— Post multiple limit orders in one batch. Each order is individually signed then posted together. Body:
POST /agent/polymarket/orders. Use for ladder-quoting.{orders: [ { tokenID, price, size, side, orderType?, tickSize?, negRisk?, expiration? }, ... ], postOnly?: boolean}
-
—— 在Polymarket CLOB上下限价单(GTC或GTD)。请求体字段:
POST /agent/polymarket/orderjson{ "tokenID": "...", // CLOB结果资产ID(非市场/条件ID) "price": 0.42, // 概率值0.0–1.0 "size": 10, // 条件代币单位 "side": "BUY", // "BUY" | "SELL" "orderType": "GTC", // 默认"GTC";"GTD"需指定到期时间 "tickSize": "0.01", // 默认"0.01";部分市场需要"0.001" / "0.0001" "negRisk": false, // 多结果负风险市场需设为true "postOnly": false, // 仅接受挂单(若订单可立即成交则拒绝) "expiration": 1735689600 // Unix时间戳,orderType为"GTD"时必填 }返回订单ID及下单状态。适用于用户指令如“以0.42的价格买入10份”或“在X价位挂买单”。 -
—— 下市价单(FOK或FAK)。买入时,
POST /agent/polymarket/order/market为要花费的USDC金额;卖出时,amount为要卖出的份数。amountjson{ "tokenID": "...", "amount": 10, // 买入:花费的USDC金额 · 卖出:卖出的份数 "side": "BUY", "price": 0.42, // 可选限价;省略则为纯市价单 "orderType": "FOK", // 默认"FOK"(全部成交否则取消) | "FAK"(能成交多少就成交多少,剩余取消) "tickSize": "0.01", "negRisk": false }适用于“立即买入”类指令。FOK模式下若无法完全成交则订单失败;FAK模式下会成交可成交部分,剩余订单取消。 -
—— 批量下多个限价单。每个订单会单独签名后一起提交。请求体:
POST /agent/polymarket/orders。适用于阶梯报价。{orders: [ { tokenID, price, size, side, orderType?, tickSize?, negRisk?, expiration? }, ... ], postOnly?: boolean}
Reading orders
查询订单
- — Get a single order by ID. Returns full order record.
GET /agent/polymarket/order/:orderId - (
GET /agent/polymarket/orders) — Get all open orders for the authenticated user. Optional filter by?id=&market=&asset_id=,id(condition_id), ormarket(token_id).asset_id - — Check whether an order is currently scoring for Polymarket liquidity rewards. Returns scoring status.
GET /agent/polymarket/order/:orderId/scoring
- —— 通过ID查询单个订单。返回完整订单记录。
GET /agent/polymarket/order/:orderId - (
GET /agent/polymarket/orders) —— 查询已授权用户的所有未成交订单。可选筛选条件:?id=&market=&asset_id=、id(condition_id)或market(token_id)。asset_id - —— 检查订单当前是否符合Polymarket流动性奖励条件。返回奖励状态。
GET /agent/polymarket/order/:orderId/scoring
Cancelling orders
取消订单
- — Cancel a single open order by order ID.
DELETE /agent/polymarket/order/:orderId - body
DELETE /agent/polymarket/orders— Cancel multiple orders by their on-chain order hashes (batch).{orderHashes: [...]} - — Cancel every open order for the authenticated user (nuke).
DELETE /agent/polymarket/orders/all - body
DELETE /agent/polymarket/orders/market— Cancel all open orders on a given market (condition_id) or asset (token_id).{market, asset_id}
- —— 通过订单ID取消单个未成交订单。
DELETE /agent/polymarket/order/:orderId - 请求体
DELETE /agent/polymarket/orders—— 通过链上订单哈希批量取消多个订单。{orderHashes: [...]} - —— 取消已授权用户的所有未成交订单(全部清空)。
DELETE /agent/polymarket/orders/all - 请求体
DELETE /agent/polymarket/orders/market—— 取消指定市场(condition_id)或资产(token_id)下的所有未成交订单。{market, asset_id}
Approvals (one-time, on-chain)
授权(一次性链上操作)
Before any trading, USDC.e + CTF must be approved to Polymarket contracts.
The backend handles USDC.e (not pUSD/native USDC) and the V1 exchange +
conditional tokens spenders.
- (
GET /agent/polymarket/approvals) — Read current on-chain allowances for Polymarket exchange contracts. Call before trading to confirm the wallet has approved USDC.e + CTF movement. Returns one entry per (token, spender) pair with?negRisk=true. Passapproved: booleanto also include NegRiskAdapter/NegRiskExchange approvals — required if trading multi-outcome markets.negRisk=true - body
POST /agent/polymarket/approvals— Submit approval transactions for any missing allowance. Idempotent — only approves what's missing. Returns per-entry status with tx hashes for newly-submitted approvals. User's wallet pays MATIC gas on Polygon.{negRisk?: boolean}
交易前,必须授权Polymarket合约使用USDC.e + CTF。后端会处理USDC.e(非pUSD/原生USDC)以及V1交易所和条件代币的授权方。
- (
GET /agent/polymarket/approvals) —— 查询Polymarket交易所合约的当前链上授权额度。交易前调用此接口确认钱包已授权USDC.e + CTF的转移权限。返回每个(代币,授权方)对的记录,包含?negRisk=true。传入approved: boolean可同时查询NegRiskAdapter/NegRiskExchange的授权——交易多结果市场时必填。negRisk=true - 请求体
POST /agent/polymarket/approvals—— 提交授权交易以补充缺失的额度。接口具备幂等性——仅授权缺失的部分。返回每个条目的状态及新提交授权的交易哈希。用户钱包需在Polygon网络支付MATIC Gas费用。{negRisk?: boolean}
Builder attribution (optional)
构建者归因(可选)
If is set in backend env, orders are auto-tagged
for fee attribution. Builder registration is an off-chain onboarding with
Polymarket — fees only flow once they've onboarded your code. Until then,
tagging is a no-op (but harmless).
POLYMARKET_BUILDER_CODE- — Create a builder API key tied to the caller's wallet. Returns
POST /agent/polymarket/builder/api-key/key/secretused to earn attribution fees on orders posted with your builder code.passphrase - — List the caller's builder API keys.
GET /agent/polymarket/builder/api-keys - — Revoke the caller's builder API key.
DELETE /agent/polymarket/builder/api-key - (
GET /agent/polymarket/builder/trades) — List trades attributed to this backend's configured builder code. Requires?taker=&maker=&market=&asset_id=&next_cursor=set server-side.POLYMARKET_BUILDER_CODE
若后端环境变量中设置了,订单会自动标记以获取费用归因。构建者注册需通过Polymarket的链下流程——仅在完成代码注册后才会产生费用流。在此之前,标记操作不会产生任何影响(但也无副作用)。
POLYMARKET_BUILDER_CODE- —— 创建与调用者钱包绑定的构建者API密钥。返回
POST /agent/polymarket/builder/api-key/key/secret,用于通过构建者代码获取订单归因费用。passphrase - —— 列出调用者的所有构建者API密钥。
GET /agent/polymarket/builder/api-keys - —— 撤销调用者的构建者API密钥。
DELETE /agent/polymarket/builder/api-key - (
GET /agent/polymarket/builder/trades) —— 列出归因于后端配置的构建者代码的交易。需在服务器端设置?taker=&maker=&market=&asset_id=&next_cursor=。POLYMARKET_BUILDER_CODE
Pick the right order type
选择合适的订单类型
| Route / type | When to use |
|---|---|
| "Buy X shares at Y" — resting limit until fill or cancel |
| Same but auto-cancels at |
| "Buy now" all-or-nothing fill |
| Best-effort fill, cancel rest |
| Ladder quoting — multiple price levels atomically |
| 路由/类型 | 使用场景 |
|---|---|
| “以Y价格买入X份”——限价挂单直至成交或取消 |
| 与GTC相同,但会在 |
| “立即买入”——全部成交否则取消 |
| 尽最大努力成交,剩余部分取消 |
| 阶梯报价——一次性提交多个价格水平的订单 |
Required parameters
必填参数
| Param | What | Gotchas |
|---|---|---|
| CLOB outcome asset ID | Different from market/condition ID. One per YES/NO side. Read from market's |
| Probability as decimal | |
| Conditional token units | USDC spend ≈ |
| Side-dependent | BUY: USDC to spend. SELL: shares. |
| | Case-sensitive. |
| Min price increment | Default |
| Multi-outcome market flag | Check market metadata; also set |
| 参数 | 说明 | 注意事项 |
|---|---|---|
| CLOB结果资产ID | 与市场/条件ID不同。每个YES/NO结果对应一个tokenID。需从市场的 |
| 概率值(十进制 | |
| 条件代币单位 | 花费的USDC金额≈ |
| 随交易方向变化 | 买入:要花费的USDC金额。卖出:要卖出的份数。 |
| | 区分大小写。 |
| 最小价格变动单位 | 默认 |
| 多结果市场标记 | 需查看市场元数据;授权时也需传入 |
Pricing conventions
定价规则
- Prices are probabilities, range . "YES at 23¢" →
(0, 1).price: 0.23 - YES and NO are separate tokens. Buying YES at ≈ selling NO at
0.23.0.77 - Min tick caps precision. Book at on a 0.01-tick market rejects
0.2300.0.2305 - Implied payoff: BUY YES at 0.23 pays $1 if event resolves YES → ~4.3x.
- Bid/ask spread signals liquidity: tight on low-volume means market makers; wide means thin book.
- 价格为概率值,范围。“YES价格23美分”对应
(0, 1)。price: 0.23 - YES和NO是独立代币。以0.23买入YES≈以0.77卖出NO。
- 最小价格变动单位限制精度。在最小变动单位为0.01的市场中,订单簿价格为时,
0.2300的订单会被拒绝。0.2305 - 隐含收益:以0.23买入YES,若事件结果为YES则支付1美元→收益约4.3倍。
- 买卖价差反映流动性:低交易量下价差小代表做市商参与;价差大代表订单簿深度不足。
Neg-risk markets
负风险市场
Multi-outcome events where outcomes sum to ≤ 100% (not exactly 100%) use the
neg-risk adapter. Typical: elections with multiple candidates. Check
on the market metadata.
neg_risk: trueIf neg-risk:
- Pass in order calls
negRisk: true - Set approvals with — the adapter is a separate spender
{negRisk: true}
多结果事件中,结果概率总和≤100%(非精确100%)的市场使用负风险适配器。典型场景:有多候选人的选举。需查看市场元数据中的标记。
neg_risk: true若为负风险市场:
- 下单时需传入
negRisk: true - 授权时需传入——适配器是独立的授权方
{negRisk: true}
Size / notional minimums
规模/名义金额最小值
~$1 USDC minimum notional. = $0.50 → rejected. Bump size
so .
price=0.05, size=10price * size >= 1名义金额最小值约为1 USDC。=0.5美元→订单会被拒绝。需调整规模使。
price=0.05, size=10price * size >= 1Research → trade workflow
研究→交易流程
- — find events
GET /agent/polymarket/public-search?q=<topic> - — pick a market within the event
GET /agent/polymarket/events/:eventId - Extract for the outcome (YES/NO) you want
token_id - — check liquidity + spread
GET /agent/polymarket/orderbook/:tokenId - — reference price
GET /agent/polymarket/price/mid/:tokenId - Note and
min_tick_sizefrom market metadataneg_risk - — confirm approvals, set if missing
GET /agent/polymarket/approvals - (or
POST /agent/polymarket/order) — place/order/market
- —— 查找事件
GET /agent/polymarket/public-search?q=<topic> - —— 选择事件中的某个市场
GET /agent/polymarket/events/:eventId - 提取目标结果(YES/NO)的
token_id - —— 检查流动性+价差
GET /agent/polymarket/orderbook/:tokenId - —— 获取参考价格
GET /agent/polymarket/price/mid/:tokenId - 记录市场元数据中的和
min_tick_sizeneg_risk - —— 确认授权状态,补充缺失的授权
GET /agent/polymarket/approvals - (或
POST /agent/polymarket/order)—— 下单/order/market
Don't
注意事项
- Don't ask the user for their private key or Privy credentials; signing is server-side via the delegated wallet.
- Don't call before every trade — it's gas. Only after
POST /approvalsshows missing entries.GET /approvals - Don't use market orders for speculative entries where slippage matters — use an aggressive limit across the spread.
- Don't confuse market ID (one per event) with token ID (one per outcome).
Orders need .
tokenID - Don't assume for markets with multiple candidates — check metadata.
negRisk: false
- 不要向用户索要私钥或Privy凭证;签名通过后端的委托钱包完成。
- 不要在每次交易前调用——会产生Gas费用。仅在
POST /approvals显示授权缺失时调用。GET /approvals - 若滑点对投机入场很重要,不要使用市价单——使用跨越价差的激进限价单。
- 不要混淆市场ID(每个事件对应一个)和代币ID(每个结果对应一个)。下单需要。
tokenID - 不要默认多候选人市场的——需查看元数据。
negRisk: false
MCP note
MCP说明
Same endpoint → tool mapping: , ,
, , ,
, ,
, , etc.
polymarket_get_eventspolymarket_get_marketspolymarket_searchpolymarket_get_orderbookpolymarket_get_user_portfoliopolymarket_place_orderpolymarket_place_market_orderpolymarket_cancel_orderpolymarket_set_approvals接口→工具映射对应关系:、、、、、、、、等。
polymarket_get_eventspolymarket_get_marketspolymarket_searchpolymarket_get_orderbookpolymarket_get_user_portfoliopolymarket_place_orderpolymarket_place_market_orderpolymarket_cancel_orderpolymarket_set_approvals