Get market positions
Endpoint
Section titled “Endpoint”GET /v1/market-positions
Server: https://data.openfish.fun (port 3003)
Tags: Core
Lists every position in a specific market across all participants. Includes PnL metrics, sorting, pagination, and profile enrichment (display name and avatar).
Parameters
Section titled “Parameters”| Name | In | Type | Default | Description |
|---|---|---|---|---|
market | query | string | Required. Condition ID | |
user | query | string | Narrow results to a single wallet address | |
status | query | string | open | Position status. One of: open, closed |
sortBy | query | string | SIZE | Sort field. One of: SIZE, CASHPNL, AVGPRICE, CURPRICE |
sortDirection | query | string | DESC | Sort direction. One of: ASC, DESC |
limit | query | integer | 50 | Max results (max 500) |
offset | query | integer | 0 | Pagination offset |
Response
Section titled “Response”200 — A JSON array of MarketPosition objects.
[ { "proxyWallet": "0xabc...", "asset": "token123", "conditionId": "0xdef...", "size": "100.0", "avgPrice": "0.55", "curPrice": "0.70", "cashPnl": "15.0", "outcomeIndex": 0, "outcome": "Yes", "name": "Alice", "profileImage": "https://..." }]Response fields
Section titled “Response fields”| Field | Type | Description |
|---|---|---|
proxyWallet | string | User wallet address |
asset | string | Token ID |
conditionId | string | Market condition ID |
size | string | Position size (decimal string) |
avgPrice | string | Average entry price |
curPrice | string | Current market price |
cashPnl | string | Unrealized PnL in USDC |
outcomeIndex | integer | Outcome index (0 or 1) |
outcome | string | Outcome label (e.g. “Yes”, “No”) |
name | string? | User display name (from profile, omitted if null) |
profileImage | string? | User profile image URL (omitted if null) |
Example
Section titled “Example”curl "https://data.openfish.fun/v1/market-positions?market=0xdef123...&sortBy=SIZE&limit=20"