API ReferencePX Account

My positions

GET/api/v1/px/positionsBearer

PX Discovery & AccountE6 decimal strings throughoutA | B

Returns every position in one shot, unpaginated. Many fields are honestly empty: costBasisE6 / realizedPnlE6 / avgEntryE6 are zero, lastPriceE6 may be null (no 0 stands in for an unavailable mark price), and the margin fields are zero when nothing is borrowed. They are reserved for the cost read model — do not compute PnL from them.

priceState says how much to trust the mark price and markUpdatedAtMs is its timestamp — judging stale data is on you; the server does not block on it.

Send Authorization: Bearer <token>. The token is issued by POST /api/v1/auth/verify, and expires after 24h idle or 7d after issuance.

Response

200List of positions
  • positionsobject(PxPosition)[]

    Every position, unpaginated

  • marketIdstring

    Engine market id — this is the one to place orders with

    Example"mkt-0001"

  • marketSlugstringnullable

    Market slug

  • questionstringnullable

    Market question

    Example"Will BTC clos…c 31, 2026?"

  • outcomestring

    Position side, A or B

  • outcomeLabelstringnullable

    Display label for that side

  • resolutionstringnullable

    Resolution outcome; null while unresolved

  • statusstringnullable

    Market state

  • quantityE6string

    Position size, as an E6 string

  • reservedE6string

    The part of it reserved by resting orders, as an E6 string

  • costBasisE6string

    Cost basis. The read model is not built yet, so this is currently zero

  • realizedPnlE6string

    Realized PnL. The read model is not built yet, so this is currently zero

  • avgEntryE6string

    Average entry price. The read model is not built yet, so this is currently zero

  • lastPriceE6stringnullable

    Latest mark price, as an E6 string; null when unavailable — do not treat it as 0

  • priceStatestringnullable

    How much to trust the mark price; judging staleness is the caller's job

  • markUpdatedAtMsstringnullable

    Time of the mark price, as a millisecond string

  • midPriceE6stringnullable

    Book mid price, as an E6 string

  • marketValueE6stringnullable

    Market value, as an E6 string

  • unrealizedPnlE6stringnullable

    Unrealized PnL, as an E6 string

  • roeBpsstringnullable

    Return on equity, in basis points

  • initialMarginE6string

    Initial margin, as an E6 string; zero when nothing is borrowed

  • borrowedE6string

    Borrowed principal tied up by this position, as an E6 string; zero when nothing is borrowed

  • liquidationPriceE6stringnullable

    Liquidation price, as an E6 string; null when nothing is borrowed

  • bankruptcyPriceE6stringnullable

    Bankruptcy price, as an E6 string; null when nothing is borrowed

  • distanceToLiqBpsstringnullable

    Distance to the liquidation price, in basis points

  • openedAtMsstringnullable

    Time the position was opened, as a millisecond string

Switch status codes in the response example to view errors. For all codes, see the Errors page.