> For the complete documentation index, see [llms.txt](https://docs.42.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.42.space/for-developers/rest-api-alpha/users/get-closed-positions.md).

# Get closed positions

GET /api/v1/market-data/closed-positions

## Get closed positions

> Returns a paginated list of historically closed outcome token positions for a wallet. Includes realised PnL, whether the position was a winner, claim/finalisation status, and early-resolution eligibility. When claimed=false (claimable snapshot), max limit is 500; otherwise max limit is 50.

```json
{"openapi":"3.1.1","info":{"title":"FortyTwo Read API","version":"1.0"},"tags":[{"description":"GET /api/v1/market-data/closed-positions","name":"get-closed-positions"}],"servers":[{"url":"https://rest.ft.42.space/"}],"paths":{"/api/v1/market-data/closed-positions":{"get":{"description":"Returns a paginated list of historically closed outcome token positions for a wallet. Includes realised PnL, whether the position was a winner, claim/finalisation status, and early-resolution eligibility. When claimed=false (claimable snapshot), max limit is 500; otherwise max limit is 50.","tags":["get-closed-positions"],"summary":"Get closed positions","parameters":[{"schema":{"type":"string"},"description":"Wallet address","name":"user","in":"query","required":true},{"schema":{"type":"string"},"description":"Comma-separated market addresses to filter by","name":"market","in":"query"},{"schema":{"type":"string"},"description":"Comma-separated question IDs to filter by","name":"question_id","in":"query"},{"schema":{"type":"string"},"description":"Claim status filter. 'true' returns positions the user has already claimed. 'false' returns positions that still need claiming (finalised winning outcomes the user held to resolution but has not yet claimed). Omit to include all closed positions, including those exited by trading before finalisation.","name":"claimed","in":"query"},{"schema":{"type":"string"},"description":"Comma-separated question tags to exclude (case-insensitive; max 20)","name":"exclude_tags","in":"query"},{"schema":{"type":"string"},"description":"Sort field: realized_pnl (default), finalised_at, closed_at","name":"order","in":"query"},{"schema":{"type":"boolean"},"description":"Sort ascending (default false = descending)","name":"ascending","in":"query"},{"schema":{"type":"integer"},"description":"Limit (default 10; max 50, or max 500 when claimed=false)","name":"limit","in":"query"},{"schema":{"type":"integer"},"description":"Offset (default 0, max 100000)","name":"offset","in":"query"}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.PaginatedResponse-internal_handler_ClosedPositionResponse"}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.ErrorResponse"}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.ErrorResponse"}}}}}}}},"components":{"schemas":{"ft_market-service-v2_pkg_api.PaginatedResponse-internal_handler_ClosedPositionResponse":{"type":"object","properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/internal_handler.ClosedPositionResponse"}},"pagination":{"$ref":"#/components/schemas/ft_market-service-v2_pkg_api.Pagination"}}},"internal_handler.ClosedPositionResponse":{"type":"object","properties":{"avgPrice":{"type":"number"},"closedAt":{"type":"string"},"costBasis":{"type":"number"},"curPrice":{"type":"number"},"dispute":{"$ref":"#/components/schemas/internal_handler.PositionDispute"},"isClaimed":{"type":"boolean"},"isFinalized":{"type":"boolean"},"isWinner":{"type":"boolean"},"market":{"$ref":"#/components/schemas/internal_handler.PositionMarket"},"marketAddress":{"type":"string"},"outcome":{"$ref":"#/components/schemas/internal_handler.PositionOutcome"},"question":{"$ref":"#/components/schemas/internal_handler.PositionQuestion"},"questionId":{"type":"string"},"realizedPnl":{"type":"number"},"size":{"type":"number"},"tokenId":{"type":"string"},"userAddress":{"type":"string"}}},"internal_handler.PositionDispute":{"type":"object","properties":{"deadlineAt":{"type":"string"},"isWindowOpen":{"type":"boolean"},"latestResolveId":{"type":"integer"},"resolvedAt":{"type":"string"},"viewerDisputeId":{"type":"integer"},"windowHours":{"type":"integer"}}},"internal_handler.PositionMarket":{"type":"object","properties":{"collateralDecimals":{"type":"integer"},"startDate":{"type":"string"},"status":{"description":"Status is the market lifecycle status: not_started, live, pending_resolution,\nresolved, finalised, disabled, unknown. Same values as GET /market-data/status.\nPopulated on /positions only; omitted on /closed-positions.","type":"string"}}},"internal_handler.PositionOutcome":{"type":"object","properties":{"image":{"type":"string"},"index":{"type":"integer"},"mintedQuantity":{"type":"number"},"name":{"type":"string"},"payout":{"type":"number"},"symbol":{"type":"string"}}},"internal_handler.PositionQuestion":{"type":"object","properties":{"description":{"type":"string"},"endDate":{"type":"string"},"image":{"type":"string"},"isEarlyResolutionEligible":{"type":"boolean"},"questionId":{"type":"string"},"resolvedAnswer":{"type":"string"},"title":{"type":"string"},"winningOutcomes":{"type":"string"}}},"ft_market-service-v2_pkg_api.Pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"totalResults":{"type":"integer"}}},"ft_market-service-v2_pkg_api.ErrorResponse":{"type":"object","properties":{"code":{"type":"integer"},"error":{"type":"string"},"message":{"type":"string"}}}}}}
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.42.space/for-developers/rest-api-alpha/users/get-closed-positions.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
