API ReferencePX Account

Closed-position history (always empty for now)

GET/api/v1/px/position-historyBearer

PX Discovery & AccountE6 decimal strings throughoutA | B

Always returns an empty array: the closed-position read model is not built yet. The endpoint already exposes its final contract shape and the fields will not change once the data source is wired up — for now, do not read an empty array as "this account has never closed a position".

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

Response

200Closed-position history. Always an empty array right now; do not read it as "never closed a position"
  • historyobject(PxPositionHistoryItem)[]

    A closed-position record. The read model is not built yet so the list is always empty — the shape is already the final contract

  • historyIdstring

    Record id

    Example"history_01K5H2M3N7"

  • marketSlugstringnullable

    Market slug

  • questionstringnullable

    Market question

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

  • outcomestringnullable

    Side, A or B

  • outcomeLabelstringnullable

    Display label for that side

  • quantityE6stringnullable

    Closed size, as an E6 string

  • avgEntryE6stringnullable

    Average entry price, as an E6 string

  • avgExitE6stringnullable

    Average exit price, as an E6 string

  • initialMarginE6stringnullable

    Initial margin, as an E6 string

  • borrowedE6stringnullable

    Borrowed principal, as an E6 string

  • realizedPnlE6stringnullable

    Realized PnL, as an E6 string

  • closeReasonstringnullable

    Reason the position was closed

  • resolutionstringnullable

    Resolution

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