Get positions
Endpoint
Section titled “Endpoint”GET /positions
Server: https://data.openfish.fun (port 3003)
Tags: Core
Lists all active (non-zero) positions held by a given wallet, with full PnL calculations and flexible sorting.
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 (mutually exclusive with market) | |
sizeThreshold | query | string | 0 | Minimum position size |
redeemable | query | boolean | Filter redeemable positions | |
mergeable | query | boolean | Filter mergeable positions | |
limit | query | integer | 100 | Max results (max 500) |
offset | query | integer | 0 | Pagination offset |
sortBy | query | string | TOKENS | Sort field. One of: CURRENT, INITIAL, TOKENS, CASHPNL, PERCENTPNL, TITLE, RESOLVING, PRICE, AVGPRICE |
sortDirection | query | string | DESC | Sort direction. One of: ASC, DESC |
title | query | string | Title search filter |
Response
Section titled “Response”200 — A JSON array of Position objects.
[ { "proxyWallet": "0xabc...", "asset": "token123", "conditionId": "0xdef...", "size": "100.5", "avgPrice": "0.65", "initialValue": "65.33", "currentValue": "70.35", "cashPnl": "5.02", "percentPnl": "7.69", "totalBought": "100.5", "realizedPnl": "0", "percentRealizedPnl": "0", "curPrice": "0.70", "redeemable": false, "mergeable": false, "title": "Will BTC exceed $100k?", "slug": "will-btc-exceed-100k", "icon": "https://...", "eventSlug": "bitcoin-milestones", "eventId": "456", "outcome": "Yes", "outcomeIndex": 0, "oppositeOutcome": "No", "oppositeAsset": "token456", "endDate": "2026-12-31", "negativeRisk": false }]Example
Section titled “Example”curl "https://data.openfish.fun/positions?user=0xabc123...&sortBy=CURRENT&sortDirection=DESC"