Skip to main content
curl --request GET \
  --url https://api.longshot.xyz/v1/positions \
  --header 'Authorization: Bearer <session_token>'
{
  "positions": [
    {
      "id": "c3b3efbb-d524-4b52-810c-20bae9bd9b37",
      "wager_micros": "1000000",
      "payout_micros": "1886800",
      "net_payout_micros": null,
      "legs_count": 1,
      "legs_summary": "BTC↑",
      "status": "open",
      "pnl_micros": null,
      "created_at_ms": 1778014811000,
      "resolved_at_ms": null
    }
  ],
  "next_cursor": null,
  "partial": false
}
curl --request GET \
  --url https://api.longshot.xyz/v1/positions \
  --header 'Authorization: Bearer <session_token>'
{
  "positions": [
    {
      "id": "c3b3efbb-d524-4b52-810c-20bae9bd9b37",
      "wager_micros": "1000000",
      "payout_micros": "1886800",
      "net_payout_micros": null,
      "legs_count": 1,
      "legs_summary": "BTC↑",
      "status": "open",
      "pnl_micros": null,
      "created_at_ms": 1778014811000,
      "resolved_at_ms": null
    }
  ],
  "next_cursor": null,
  "partial": false
}

Endpoint

GET https://api.longshot.xyz/v1/positions
Authorization: Bearer <session_token>

Headers

Authorization
string
required
Bearer <session_token> from wallet auth or Privy session auth.

Query Parameters

status
string
Optional status filter: open, won, lost, or voided.
sort
string
Optional sort order: date_desc, date_asc, pnl_desc, or pnl_asc.
limit
int32
Page size from 1 to 100. Default is 50.
cursor
string
Cursor returned from the previous page.

Response Fields

positions
array
Page of positions.
positions[].id
string
Position ID. Use this value as {id} for GET /v1/positions/{id}.
positions[].wager_micros
string
Wager amount in micros, encoded as a decimal integer string.
positions[].payout_micros
string
Gross potential payout in micros before fees, encoded as a decimal integer string.
positions[].net_payout_micros
string | null
Realized net payout after fees, encoded as a decimal integer string, or null while open.
positions[].legs_count
int16
Number of legs.
positions[].legs_summary
string
Human-readable leg summary, for example BTC↑.
positions[].status
string
Position status: open, won, lost, pending, cancelled, or voided.
positions[].pnl_micros
string | null
Realized PNL in micros, encoded as a decimal integer string, or null while open.
positions[].created_at_ms
int64
Created timestamp as Unix milliseconds.
positions[].resolved_at_ms
int64 | null
Resolved timestamp as Unix milliseconds, or null while open.
next_cursor
string | null
Cursor for the next page.
partial
boolean
Whether the response omitted corrupted positions and includes errors.