Get closed positions
Endpoint
Section titled “Endpoint”GET /closed-positions
Server: https://data.openfish.fun (port 3003)
Tags: Core
Lists positions that have been fully exited (zero remaining balance) for a given wallet, along with realized PnL figures.
Parameters
Section titled “Parameters”| Name | In | Type | Default | Description |
|---|---|---|---|---|
user | query | string | Required. User wallet address | |
market | query | string | Comma-separated condition IDs | |
eventId | query | string | Comma-separated event IDs | |
title | query | string | Title search filter | |
limit | query | integer | 50 | Max results (max 50) |
offset | query | integer | 0 | Pagination offset |
sortBy | query | string | Sort field. One of: AVGPRICE, TOTALBOUGHT, REALIZEDPNL, TIMESTAMP, TITLE | |
sortDirection | query | string | DESC | Sort direction. One of: ASC, DESC |
Response
Section titled “Response”200 — A JSON array of ClosedPosition objects.
[ { "proxyWallet": "0xabc...", "asset": "token123", "conditionId": "0xdef...", "avgPrice": "0.65", "totalBought": "100.5", "realizedPnl": "15.20", "curPrice": "1.00", "timestamp": 1700000000, "title": "Will BTC exceed $100k?", "slug": "will-btc-exceed-100k", "icon": "https://...", "eventSlug": "bitcoin-milestones", "outcome": "Yes", "outcomeIndex": 0, "oppositeOutcome": "No", "oppositeAsset": "token456", "endDate": "2026-12-31" }]Example
Section titled “Example”curl "https://data.openfish.fun/closed-positions?user=0xabc123...&limit=20"