Skip to main content

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​

ParameterTypeRequiredDescription
cursorstringNoPagination cursor from a previous response's next_cursor field.
limitintNoMaximum 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​

FieldTypeDescription
positionsarrayArray of ClosedPositionWithDetails objects.
next_cursorstringCursor to pass for the next page. null if no more results.
has_moreboolWhether more positions exist beyond this page.

ClosedPositionWithDetails​

FieldTypeDescription
idint64Unique position identifier.
user_idint64ID of the position owner.
market_idint64Market the position was in.
token_typestring"YES" or "NO".
amountintNumber of shares held.
avg_priceintAverage entry price in basis points.
pnlintRealized profit/loss in cents.
won_sideint or nullThe winning outcome index (0 = YES won, 1 = NO won, null = manually closed).
closed_atstringISO 8601 timestamp when the position was closed.
event_idint64Parent event ID.
event_namestringName of the parent event.
pool_idint64Parent pool ID.
pool_namestringName of the parent pool.
market_namestringName of the market.

Errors​

StatusCodeDescription
401UNAUTHORIZEDMissing or invalid bearer token.