Skip to main content
curl --request GET \
  --url https://api.longshot.xyz/v1/positions/{id} \
  --header 'Authorization: Bearer <session_token>'
{
  "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,
  "legs": [
    {
      "leg_index": 0,
      "market_id": 61619,
      "market_kind": "price",
      "asset": "BTC",
      "direction": "up",
      "duration_secs": 300,
      "outcome": "pending",
      "window_start_ms": 1778014800000
    }
  ]
}
curl --request GET \
  --url https://api.longshot.xyz/v1/positions/{id} \
  --header 'Authorization: Bearer <session_token>'
{
  "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,
  "legs": [
    {
      "leg_index": 0,
      "market_id": 61619,
      "market_kind": "price",
      "asset": "BTC",
      "direction": "up",
      "duration_secs": 300,
      "outcome": "pending",
      "window_start_ms": 1778014800000
    }
  ]
}

Endpoint

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

Headers

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

Path Parameters

id
uuid
required
Position ID from GET /v1/positions.

Response Fields

id
string
Position ID.
wager_micros
string
Wager amount in micros, encoded as a decimal integer string.
payout_micros
string
Gross potential payout in micros before fees, encoded as a decimal integer string.
net_payout_micros
string | null
Realized net payout after fees, encoded as a decimal integer string, or null while open.
legs_count
int16
Number of legs.
legs_summary
string
Human-readable leg summary.
status
string
Position status: open, won, lost, pending, cancelled, or voided.
pnl_micros
string | null
Realized PNL in micros, encoded as a decimal integer string, or null while open.
created_at_ms
int64
Created timestamp as Unix milliseconds.
resolved_at_ms
int64 | null
Resolved timestamp as Unix milliseconds, or null while open.
legs
array
Per-leg details.
legs[].leg_index
int16
Leg index from 0 to 7.
legs[].market_id
int64
Longshot market ID for this leg.
legs[].market_kind
string
price or mention.
legs[].label
string | null
Human-readable leg label when available, especially for mention-market legs.
legs[].asset
string | null
Asset symbol for price-market legs when available.
legs[].direction
string
up or down.
legs[].duration_secs
int32 | null
Market duration in seconds for price-market legs when available.
legs[].outcome
string
pending, won, lost, or voided.
legs[].window_start_ms
int64 | null
Window start in Unix milliseconds when available.