---
title: "Get wallet closed positions"
method: GET
path: "/v4/data/prediction/wallets/{address}/history"
tags: ["Prediction API"]
---

# Get wallet closed positions

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

/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.

## Path parameters

- `address` string, 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.

## Query parameters

- `market` string
- `eventId` string
- `title` string
- `sortBy` 'REALIZEDPNL' | 'TITLE' | 'PRICE' | 'AVGPRICE' | 'TIMESTAMP' — Sort key for `/wallets/{address}/history`.
- `sortDirection` 'ASC' | 'DESC' — Sort direction.
- `limit` integer
- `offset` integer

## Response `200`

OK

- PredictionWalletHistoryResponse — Paginated wallet closed-positions response.
  - `data` PredictionWalletClosedPosition[], required
    - `proxyWallet` string, required — Holder wallet (0x + 40 hex, lowercased).
    - `asset` string, required — Polymarket outcome-token asset id.
    - `conditionId` string, required — Market condition id (0x + 64 hex).
    - `avgPrice` number, required — Volume-weighted average entry price.
    - `totalBought` number, required — Lifetime USD spent acquiring the position.
    - `realizedPnl` number, required — Realised PnL in USD on settlement.
    - `curPrice` number, required — Resolution price (0 or 1 on binary markets — 1 = winning outcome).
    - `timestamp` integer, required — Settlement time of the position (unix-seconds).
    - `title` string, nullable, required — Parent market question.
    - `slug` string, nullable, required
    - `icon` string, nullable, required
    - `eventSlug` string, nullable, required
    - `outcome` string, nullable, required
    - `outcomeIndex` integer, required
    - `oppositeOutcome` string, nullable, required
    - `oppositeAsset` string, required
    - `endDate` string, nullable, required
  - `pagination` PredictionOffsetPagination, required — Offset-based pagination metadata, returned by every wallet endpoint and by `/markets/{id}/positions`. `pageNumber` is the zero-indexed page derived from `offset / limit` on the request.
    - `pageSize` integer, required — Page size of the call that produced this response.
    - `pageNumber` integer, required — Zero-indexed page number (`offset / limit`).

## Other responses

- `400` — Bad Request
- `401` — Unauthorized. Not valid or inactive subscription key present in the HTTP Header.
- `403` — Forbidden. The request is authenticated, but it is not possible to perform the operation due to logical error or invalid permissions.
- `500` — Internal server error. There was an error on the server during the processing of the request.

---

[API](https://skmtc.net/tatum/apis/blockchain-data.md) · [All operations](https://skmtc.net/tatum/apis/blockchain-data/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tatum/blockchain-data/versions/8622ee4b8fae/schema)
