> ## Documentation Index
> Fetch the complete documentation index at: https://docs.liftx.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Read position P&L history

> Returns canonical history for one position.

<Note>Preview contract. Production availability remains subject to activation and release qualification. Examples are synthetic; the documentation cannot submit requests.</Note>

## Authorization

`read` for the exact position.

## Behavior

Returns canonical history for one position. Optional after is a positive Unix-second boundary. Preserve decimal values and completeness/reset semantics; historical P\&L is not proof that current execution completed.

## Request example

```http theme={null}
GET /v1/positions/pnl-history?id=11111111-1111-4111-8111-111111111111
Authorization: Bearer YOUR_API_KEY_FROM_PRIVATE_STORAGE
```

All IDs and dates are illustrative. URL-encode opaque query values and supply each allowed key once. Optional filters and their types appear in the generated schema below.

## Response and errors

The generated response schema below is the wire contract. Preserve fixed-point strings, nullable fields and endpoint-specific envelopes. Inspect HTTP status and Content-Type before decoding failures; reused trading routes may return JSON or plain text. Authentication, entitlement and exact link/instrument restrictions apply in addition to endpoint validation. See [errors and recovery](/api/errors-and-limits).

Read the [related guide](/api/templates-and-history) for lifecycle, units and recovery semantics.


## OpenAPI

````yaml api/openapi.json GET /v1/positions/pnl-history
openapi: 3.1.0
info:
  title: Liftx integrations
  version: 1.0.0
  description: >-
    Preview contract for the Liftx API, TradingView webhook and session-owned
    integration settings. Production availability is pending activation and
    release qualification. External access requires Pro or trial entitlement and
    is unmetered within bounded resource limits. Receipt acceptance does not
    confirm execution completion. MCP is not active.
servers:
  - url: https://api.liftx.io
security: []
paths:
  /v1/positions/pnl-history:
    get:
      summary: Read canonical position P&L history
      description: >-
        Returns the canonical Liftx response documented below. Preserve
        fixed-point decimals and inspect HTTP status and Content-Type before
        decoding errors.
      operationId: get_v1_positions_pnl_history
      parameters:
        - name: id
          in: query
          required: true
          schema:
            type: string
            format: uuid
        - name: after
          in: query
          required: false
          schema:
            type: integer
            format: int64
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PositionHistory'
              examples:
                synthetic:
                  summary: >-
                    Synthetic position history; not current execution
                    confirmation
                  description: >-
                    Synthetic documentation data, not an account snapshot,
                    executable market configuration or production-availability
                    assertion. IDs, quantities, prices, times and values are
                    illustrative.
                  value:
                    position_id: 11111111-1111-4111-8111-111111111111
                    quote: USDT
                    from: 1893456000
                    to: 1893456000
                    as_of: 1893456000
                    history_from: 1893456000
                    history_at: 1893456000
                    after: 0
                    complete: true
                    terminal: false
                    reset_required: false
                    points:
                      - rate_at: 0
                        time: 1893456000
                        value:
                          atomic: '0'
                          scale: 0
                        complete: true
                        resolution: 1
                        gap_before: false
        default:
          description: >-
            Integration errors use Error; existing trading handlers retain their
            own JSON or text/plain error codec. Inspect status and content type.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
            text/plain:
              schema:
                type: string
      security:
        - ApiKey: []
components:
  schemas:
    PositionHistory:
      type: object
      properties:
        position_id:
          type: string
        quote:
          type: string
        from:
          type: integer
          format: int64
        to:
          type: integer
          format: int64
        as_of:
          type: integer
          format: int64
        history_from:
          type: integer
          format: int64
        history_at:
          type: integer
          format: int64
        after:
          type: integer
          format: int64
        complete:
          type: boolean
        terminal:
          type: boolean
        reset_required:
          type: boolean
        points:
          type: array
          items:
            $ref: '#/components/schemas/PositionHistoryPoint'
      required:
        - position_id
        - quote
        - from
        - to
        - as_of
        - history_from
        - history_at
        - after
        - complete
        - terminal
        - reset_required
        - points
      additionalProperties: false
    Error:
      type: object
      properties:
        success:
          const: false
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
          required:
            - code
            - message
          additionalProperties: false
      required:
        - success
        - error
      additionalProperties: false
    PositionHistoryPoint:
      type: object
      properties:
        rate_at:
          type: integer
          format: int64
        time:
          type: integer
          format: int64
        value:
          anyOf:
            - $ref: '#/components/schemas/Decimal'
            - type: 'null'
        complete:
          type: boolean
        resolution:
          type: integer
          format: int64
        gap_before:
          type: boolean
      required:
        - rate_at
        - time
        - value
        - complete
        - resolution
        - gap_before
      additionalProperties: false
    Decimal:
      type: object
      properties:
        atomic:
          type: string
        scale:
          type: integer
          format: int64
      required:
        - atomic
        - scale
      additionalProperties: false
  securitySchemes:
    ApiKey:
      type: http
      scheme: bearer
      bearerFormat: lx_api_<credential UUID>.<256-bit secret>

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.