Sand AISand AI MAGI-2MAGI-2 现已上线 SandBase:支持原生音频的 1080p 视频立即试用

Polymarket Wallet Positions

API 文档
https://api.sandbase.ai/v1/api/polymarket/positions

A wallet's positions across their lifecycle (open, redeemable, mergeable, closed), with size, average price, current value and PnL.

价格
$0.012美元 / 次调用
方法
POST
响应
JSON
参数
1 个必填 · 13 个可选

Playground

输入
The wallet to anchor on. At least one of `user`/`condition` is required.
Condition id(s), comma-separated (at most 20 distinct values). With `user`, narrows that user's positions (all ids honoured). Without `user`, anchors on the market's holders; exactly one id is accepted there, and a multi-id list is rejected rather than silently truncated.
01000
First-page size. Ignored when `cursor` is supplied (the cursor's size wins). 范围:0 到 1000。
Opaque pagination cursor from a prior response's `next_cursor`. It carries the page position, page size, and the status/sort/direction it was minted under.
One of `OPEN`, `REDEEMABLE`, `REDEEMABLE_LOST`, `MERGEABLE`, or `CLOSED`; defaults to `OPEN`. `REDEEMABLE_LOST` requires `user`, supports all six sorts, and defaults to `CURRENT_VALUE`; it preserves row status `REDEEMABLE`. `MERGEABLE` is `OPEN` narrowed to live complementary pairs (conditions where
Event id(s), comma-separated (at most 20 distinct values). User-anchored only.
Case-insensitive market-title substring filter, honoured on every anchor and status. SQL LIKE wildcards (`%`, `_`) keep their usual meaning; empty or whitespace-only is treated as absent; at most 200 characters. NOT carried by the cursor: re-send it on every page of a walk (like `condition` and the
`CASH` or `TOKENS`; defaults to `TOKENS` (the /v2/trades-homogenized filter pair, replacing the former `size_threshold`).
The filter floor. `TOKENS`: minimum CURRENT holding in shares (defaults to the 0.1 dust floor; applies to `OPEN`/`REDEEMABLE`; a user's `CLOSED` set is not narrowed by it, and on a market anchor it moves the OPEN/CLOSED boundary). `CASH`: minimum mark-to-market `current_value` in USDC, on top of the
Also include positions on archived markets; defaults to `false`. `OPEN`/`REDEEMABLE`/`REDEEMABLE_LOST`/`MERGEABLE` only; combining it with `status=CLOSED` is rejected. Inactive markets remain excluded either way.
One of `CURRENT_VALUE`, `PRICE`, `TOKENS`, `UNREALIZED_PNL`, `REALIZED_PNL`, `TOTAL_PNL`, or `TIMESTAMP` (the row's `last_event_at`). `PRICE` ranks by the response's effective `current_price` on every supported anchor and status. On `REDEEMABLE`, the existing winners-first partition remains ahead of
Inclusive lower bound on `last_event_at`, epoch seconds; omit or `0` for unbounded (the `/v2/activity` + `/v2/trades` vocabulary).
Inclusive upper bound on `last_event_at`, epoch seconds; omit or `0` for unbounded. A position with no native economics carries no `last_event_at` and is therefore **excluded by any bound**, in either direction; a window asks which positions moved inside it, and a row with no clock has no answer. Un
`ASC` or `DESC`; defaults to `DESC`.
输出就绪

您的输出将显示在这里

完成输入,然后点击运行。

API README

Polymarket Wallet Positions API

Returns a list of Polymarket positions for one wallet. Each row shows share size, average entry price, current price, current value and PnL. It needs a wallet address in user and filters by status, which defaults to OPEN.

Use cases

  • Track what a specific wallet holds right now and how much each position is worth.
  • Rank a wallet's positions by unrealized_pnl or total_pnl to find its best and worst bets.
  • Find positions that are REDEEMABLE so a wallet owner knows which markets to claim.
  • Filter a wallet's positions by market title, such as a tennis tournament, to see its exposure to one topic.

Request

curl -X POST "https://api.sandbase.ai/v1/api/polymarket/positions" \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"user": "0xfe787d2da716d60e8acff57fb87eb13cd4d10319", "limit": 2}'

The result is returned in outputs[0].data.

Parameters

NameTypeRequiredDescription
userstringYesThe wallet to anchor on. At least one of user/condition is required.
conditionstringNoCondition id(s), comma-separated (at most 20 distinct values). With user, narrows that user's positions (all ids honoured). Without user, anchors on the market's holders; exactly one id is accepted there, and a multi
cursorstringNoOpaque pagination cursor from a prior response's next_cursor. It carries the page position, page size, and the status/sort/direction it was minted under.
endintegerNoInclusive upper bound on last_event_at, epoch seconds; omit or 0 for unbounded. A position with no native economics carries no last_event_at and is therefore excluded by any bound, in either direction; a window
event_idstringNoEvent id(s), comma-separated (at most 20 distinct values). User-anchored only.
filter_amountnumberNoThe filter floor. TOKENS: minimum CURRENT holding in shares (defaults to the 0.1 dust floor; applies to OPEN/REDEEMABLE; a user's CLOSED set is not narrowed by it, and on a market anchor it moves the OPEN/CLOSED
filter_typestringNoCASH or TOKENS; defaults to TOKENS (the /v2/trades-homogenized filter pair, replacing the former size_threshold).
include_archivedbooleanNoAlso include positions on archived markets; defaults to false. OPEN/REDEEMABLE/REDEEMABLE_LOST/MERGEABLE only; combining it with status=CLOSED is rejected. Inactive markets remain excluded either way.
limitintegerNoFirst-page size. Ignored when cursor is supplied (the cursor's size wins).
sort_bystringNoOne of CURRENT_VALUE, PRICE, TOKENS, UNREALIZED_PNL, REALIZED_PNL, TOTAL_PNL, or TIMESTAMP (the row's last_event_at). PRICE ranks by the response's effective current_price on every supported anchor an
sort_directionstringNoASC or DESC; defaults to DESC.
startintegerNoInclusive lower bound on last_event_at, epoch seconds; omit or 0 for unbounded (the /v2/activity + /v2/trades vocabulary).
statusstringNoOne of OPEN, REDEEMABLE, REDEEMABLE_LOST, MERGEABLE, or CLOSED; defaults to OPEN. REDEEMABLE_LOST requires user, supports all six sorts, and defaults to CURRENT_VALUE; it preserves row status `REDEEMABL
titlestringNoCase-insensitive market-title substring filter, honoured on every anchor and status. SQL LIKE wildcards (%, _) keep their usual meaning; empty or whitespace-only is treated as absent; at most 200 characters. NOT carr

Example response

Real response for the request above, trimmed: lists keep their first item and long strings are cut.

{
  "data": [
    {
      "archived": false,
      "avg_price": 0.8959,
      "condition_id": "0xdbcc54e623b74b67ea5a8733639a9f5e43ea16bd9b264ddf8772c615a7790d62",
      "current_price": 0.935,
      "current_size": 47155.6168,
      "current_value": 44090.5017,
      "end_date": "2026-11-09",
      "entry_cost_usdc": 42248.4147,
      "entry_fees_usdc": 0.0,
      "event_id": "1289266",
      "event_slug": "wta-yastrem-sonmez-2026-11-01",
      "first_entry_at": 1793687014
    }
  ],
  "pagination": {
    "has_more": true,
    "limit": 2,
    "next_cursor": "eyJkYXRhIjp7InR5cGUiOiJwb3NpdGlvbnMiLCJwYXJhbXMiOnsibCI6MiwiZCI6MiwiayI6IjMxODQw…",
    "offset": 0
  }
}

Response fields

FieldMeaning
data[].title / data[].outcomeThe market question and the outcome this position holds. opposite_outcome names the other side of the market.
data[].condition_id / data[].token_idIDs for the market condition and for the outcome token held. opposite_token_id is the token for the other outcome.
data[].current_size / data[].total_sizecurrent_size is the number of shares held now. total_size is the total share amount shown for the position, which is larger when shares were sold or closed.
data[].avg_price / data[].current_priceThe average entry price and the current price per share. Prices in this response fall between 0 and 1.
data[].current_valueMark-to-market value of the position in USDC, based on current_size and current_price.
data[].entry_cost_usdc / data[].total_cost_usdc / data[].entry_fees_usdcUSDC cost paid to enter the position, the total cost, and the fees paid on entry.
data[].unrealized_pnl / data[].realized_pnl / data[].total_pnlPnL on shares still held, PnL from shares already sold, and the combined figure.
data[].percent_pnl / data[].percent_realized_pnlPnL shown as percentages. percent_realized_pnl covers the realized part.
data[].first_entry_at / data[].last_event_atEpoch-second timestamps of the first entry and the most recent event on the position.
data[].status / data[].redeemable / data[].mergeableLifecycle state of the row, such as OPEN, and flags for whether it can be redeemed or merged.

Notes

  • Use pagination.next_cursor as cursor to get the next page. pagination.has_more tells you if another page exists.
  • Re-send title, condition and other filters on each page of a walk. The cursor only carries the page position, size, status and sort.
  • Use status set to CLOSED for ended positions. Polymarket Closed Positions is a related API for that.
  • To see who holds a market, call Polymarket Market Holders with a condition id.

Pricing

$0.012 per successful call. Failed calls are not charged. It is included in the daily free quota of each organization.

探索更多

相关 APIs

全部 APIs
API价格响应
Polymarket$0.012 每次调用JSON
Polymarket$0.012 每次调用JSON
Polymarket$0.012 每次调用JSON
Polymarket$0.012 每次调用JSON
Polymarket$0.012 每次调用JSON
Polymarket$0.012 每次调用JSON

问题

常见问题

如何使用 Polymarket Wallet Positions API?

向 https://api.sandbase.ai/v1/api/polymarket/positions 发送 POST 请求,在 Authorization 请求头中使用您的 SandBase API key(Bearer),并将参数作为 JSON 请求体传入。您也可以直接在本页的 Playground 中试用,无需编写代码。

Polymarket Wallet Positions API 的价格是多少?

每次调用 $0.012,从您的 SandBase 余额中扣费。您只需为实际调用付费;无需订阅。

Polymarket Wallet Positions API 接受哪些参数?

必填:user (string)。 可选:condition (string), limit (integer), cursor (string), status (string), event_id (string) 和 title (string) 以及另外 7 项。 Parameters 表和本页的 Playground 列出了每个字段。

Polymarket Wallet Positions API 返回什么?

在同一个 HTTP 请求中返回的 JSON 响应(同步)。 本页的 README 包含一个示例响应。

我需要 Polymarket 开发者账户或 API key 吗?

不需要。Polymarket Wallet Positions 通过 SandBase 运行,因此一个 SandBase API key 即可覆盖此端点以及目录中的其他所有 API 和模型。您无需单独申请 Polymarket API 访问权限。