GET /api/v1/market/positions/completed
Retrieve the authenticated user's closed position history with pagination support.
Authenticationβ
Required. Bearer token in Authorization header.
Requestβ
Query Parametersβ
| Parameter | Type | Required | Description |
|---|---|---|---|
cursor | string | No | Pagination cursor from a previous response's next_cursor field. |
limit | int | No | Maximum number of positions to return per page. |
Exampleβ
curl "https://intotes.com/api/v1/market/positions/completed?limit=10" \
-H "Authorization: Bearer <token>"
Responseβ
200 OKβ
{
"positions": [
{
"id": 401,
"user_id": 7,
"market_id": 30,
"token_type": "YES",
"amount": 2000,
"avg_price": 4000,
"pnl": 1200,
"won_side": 0,
"closed_at": "2026-04-02T18:30:00Z",
"event_id": 8,
"event_name": "Will BTC hit $100K in Q1?",
"pool_id": 3,
"pool_name": "Crypto",
"market_name": "BTC > $100K"
},
{
"id": 402,
"user_id": 7,
"market_id": 35,
"token_type": "NO",
"amount": 500,
"avg_price": 6000,
"pnl": -500,
"won_side": 0,
"closed_at": "2026-04-01T10:00:00Z",
"event_id": 9,
"event_name": "Premier League: Liverpool vs Arsenal",
"pool_id": 6,
"pool_name": "Football",
"market_name": "Liverpool wins"
}
],
"next_cursor": "eyJpZCI6NDAyfQ==",
"has_more": true
}
Response Fieldsβ
| Field | Type | Description |
|---|---|---|
positions | array | Array of ClosedPositionWithDetails objects. |
next_cursor | string | Cursor to pass for the next page. null if no more results. |
has_more | bool | Whether more positions exist beyond this page. |
ClosedPositionWithDetailsβ
| Field | Type | Description |
|---|---|---|
id | int64 | Unique position identifier. |
user_id | int64 | ID of the position owner. |
market_id | int64 | Market the position was in. |
token_type | string | "YES" or "NO". |
amount | int | Number of shares held. |
avg_price | int | Average entry price in basis points. |
pnl | int | Realized profit/loss in cents. |
won_side | int or null | The winning outcome index (0 = YES won, 1 = NO won, null = manually closed). |
closed_at | string | ISO 8601 timestamp when the position was closed. |
event_id | int64 | Parent event ID. |
event_name | string | Name of the parent event. |
pool_id | int64 | Parent pool ID. |
pool_name | string | Name of the parent pool. |
market_name | string | Name of the market. |
Errorsβ
| Status | Code | Description |
|---|---|---|
| 401 | UNAUTHORIZED | Missing or invalid bearer token. |