v1

latestOpenAPI 3.1.02026-07-243035381.4 MB
Prediction API

Get wallet closed positions

/v4/data/prediction/wallets/{address}/history

100 credits per API call

Closed and resolved positions for a wallet — one row per settled position (winning or losing), with the realised PnL, lifetime cost basis, settlement price, and the parent market's question and outcome metadata. Useful for backtest-style P&L drill-downs and tax exports.

Platform support

  • Polymarket only. Kalshi wallets return 400.

Filtering, sorting and pagination

  • market scopes the response to a comma-separated list of condition ids (0x + 64 hex), up to 50 entries.
  • eventId scopes the response to a comma-separated list of Polymarket numeric event ids, up to 50 entries. Mutually exclusive with market — passing both returns 400.
  • title filters by a substring of the market question.
  • sortBy accepts REALIZEDPNL, TITLE, PRICE, AVGPRICE, TIMESTAMP. Defaults to REALIZEDPNL. Combine with sortDirection (ASC / DESC, defaults to DESC).
  • Pagination is offset-based — limit (1..50, default 10) and offset (0..100000, default 0).

Other notes

  • address is normalised to lowercase before being echoed in the response (every row's proxyWallet).
  • timestamp is unix-seconds (not milliseconds) — the settlement time of the position.
  • curPrice is the resolution price (0 or 1 for binary markets); avgPrice is the volume-weighted entry price.
get/v4/data/prediction/wallets/{address}/history

Path parameters

addressstring required

EVM wallet address — 0x-prefixed, 40 hex characters. Returned lowercased in response payloads. Non-EVM inputs (e.g. Kalshi user identifiers) return 400 from every wallets endpoint.

Example:0x56687bf447db6ffa42ffe2204a05edaa20f55839

Wallet address (0x + 40 hex). Kalshi addresses return 400.

Query parameters

marketstring
Example:0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917

Comma-separated list of condition ids (0x + 64 hex). Up to 50 entries. Mutually exclusive with eventId.

eventIdstring
Example:12345,67890

Comma-separated list of Polymarket numeric event ids. Up to 50 entries. Mutually exclusive with market.

titlestring
Example:Election

Filter rows where the market question contains this substring.

sortBy'REALIZEDPNL' | 'TITLE' | 'PRICE' | 'AVGPRICE' | 'TIMESTAMP'

Sort key for /wallets/{address}/history.

Example:REALIZEDPNL

Sort key. Defaults to REALIZEDPNL.

sortDirection'ASC' | 'DESC'

Sort direction.

Example:DESC

Sort direction. Defaults to DESC.

limitinteger
Example:10

Page size. Defaults to 10.

offsetinteger

Page offset. Defaults to 0.

Response

OK

Example response

{
  "data": [
    {
      "proxyWallet": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
      "asset": "71321045679252212594626385532706912750332728571942612009397583165281712267356",
      "conditionId": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
      "avgPrice": 0.38,
      "totalBought": 475,
      "realizedPnl": 525,
      "curPrice": 1,
      "timestamp": 1747569600,
      "title": "Will candidate X win the 2024 election?",
      "slug": "will-candidate-x-win-the-2024-election",
      "icon": "https://polymarket.com/images/election.png",
      "eventSlug": "election-2024",
      "outcome": "YES",
      "oppositeOutcome": "NO",
      "oppositeAsset": "52398412765829301823124912398421398214129482198431928421319284213192842131",
      "endDate": "2024-11-05T23:59:59Z"
    }
  ],
  "pagination": {
    "pageSize": 100
  }
}