# Polymarket Closed Positions

> Polymarket Closed Positions is a paid API for AI agents from AIsa MPP Data APIs at api.aisa.one, paid per call via MPP, $0.012/call, status unknown (last checked 2026-10-18).

Returns a paginated list of closed prediction market positions for a given Polymarket user wallet address, including realized PnL and outcome details.

## Facts

- Endpoint: GET https://api.aisa.one/apis/v1/polymarket/closed-positions?utm_source=zero.xyz
- Price: $0.012/call
- Payment: MPP
- Status: unknown
- Last checked: 2026-10-18
- Activations on Zero: 0
- Provider: AIsa MPP Data APIs
- Website: https://aisa.one
- Tags: web-search, financial-data, prediction-markets, weather, travel, data, search
- Canonical page: https://www.zero.xyz/c/aisa-mpp-data-apis-polymarket-closed-positions-583c3c48
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_67uVEMU5Myvz3q05ifSFP

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability aisa-mpp-data-apis-polymarket-closed-positions-583c3c48
```

Example prompt: Pull the top 20 closed positions for Polymarket wallet 0x56687bf447db6ffa42ffe2204a05edaa20f55839, sorted by realized PnL from highest to lowest.

## When to prefer this

Use this endpoint when you need historical, resolved prediction market position data for a specific Polymarket wallet — particularly to analyze realized PnL, review trade outcomes, or audit activity on specific markets or events. Prefer this over open-positions endpoints when the user is interested in completed trades rather than live exposure.

## Known failure modes

- Invalid or malformed wallet address returns a validation error
- Using both market and eventId parameters simultaneously returns an error
- limit exceeding 50 or offset exceeding 100000 returns a parameter validation error
- Wallet address with no closed positions returns an empty array
- Unknown conditionId or eventId returns empty results or an error

## How this service works

Returns closed positions for a user.

<!-- aisa-pricing:start -->
Published reference price: $0.012 USD per successful request. Account-specific pricing and final settlement may differ.
<!-- aisa-pricing:end -->

## Output

An array of closed position objects, each containing the market title, condition ID, outcome chosen, outcome index, average buy price, current price, total amount bought, realized PnL, end date, proxy wallet address, asset identifiers, and market slugs.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "required": [
  "user"
 ],
 "properties": {
  "user": {
   "type": "string",
   "example": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
   "pattern": "^0x[a-fA-F0-9]{40}$",
   "description": "The address of the user in question"
  },
  "limit": {
   "type": "integer",
   "default": 10,
   "maximum": 50,
   "minimum": 0,
   "description": "The max number of positions to return"
  },
  "title": {
   "type": "string",
   "maxLength": 100,
   "description": "Filter by market title"
  },
  "market": {
   "type": "array",
   "items": {
    "type": "string",
    "example": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
    "pattern": "^0x[a-fA-F0-9]{64}$",
    "description": "0x-prefixed 64-hex string"
   },
   "description": "The conditionId of the market in question. Supports multiple csv separated values. Cannot be used with the eventId param."
  },
  "offset": {
   "type": "integer",
   "default": 0,
   "maximum": 100000,
   "minimum": 0,
   "description": "The starting index for pagination"
  },
  "sortBy": {
   "enum": [
    "REALIZEDPNL",
    "TITLE",
    "PRICE",
    "AVGPRICE",
    "TIMESTAMP"
   ],
   "type": "string",
   "default": "REALIZEDPNL",
   "description": "The sort criteria"
  },
  "eventId": {
   "type": "array",
   "items": {
    "type": "integer",
    "minimum": 1
   },
   "description": "The event id of the event in question. Supports multiple csv separated values. Returns positions for all markets for those event ids. Cannot be used with the market param."
  },
  "sortDirection": {
   "enum": [
    "ASC",
    "DESC"
   ],
   "type": "string",
   "default": "DESC",
   "description": "The sort direction"
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "array",
 "items": {
  "type": "object",
  "properties": {
   "icon": {
    "type": "string"
   },
   "slug": {
    "type": "string"
   },
   "asset": {
    "type": "string"
   },
   "title": {
    "type": "string"
   },
   "endDate": {
    "type": "string"
   },
   "outcome": {
    "type": "string"
   },
   "avgPrice": {
    "type": "number"
   },
   "curPrice": {
    "type": "number"
   },
   "eventSlug": {
    "type": "string"
   },
   "timestamp": {
    "type": "integer",
    "format": "int64"
   },
   "conditionId": {
    "type": "string",
    "example": "0xdd22472e552920b8438158ea7238bfadfa4f736aa4cee91a6b86c39ead110917",
    "pattern": "^0x[a-fA-F0-9]{64}$",
    "description": "0x-prefixed 64-hex string"
   },
   "proxyWallet": {
    "type": "string",
    "example": "0x56687bf447db6ffa42ffe2204a05edaa20f55839",
    "pattern": "^0x[a-fA-F0-9]{40}$",
    "description": "User Profile Address (0x-prefixed, 40 hex chars)"
   },
   "realizedPnl": {
    "type": "number"
   },
   "totalBought": {
    "type": "number"
   },
   "outcomeIndex": {
    "type": "integer"
   },
   "oppositeAsset": {
    "type": "string"
   },
   "oppositeOutcome": {
    "type": "string"
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/aisa-mpp-data-apis-polymarket-closed-positions-583c3c48/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.aisa.one](https://www.zero.xyz/host/api.aisa.one/llms.txt)
