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

# Get exposure over time

> Reports what the caller's organization held over a trailing window, bucketed hourly for a single day and daily beyond that. Every figure is a level rather than a flow: positions are carried across buckets in which the broker did not restate them, so a quiet stretch repeats the preceding level instead of reading as flat. Notional is valued at the broker's average cost, not at a market price.



## OpenAPI

````yaml /api-reference/ledger.openapi.json get /v1/positions/exposure
openapi: 3.1.0
info:
  title: ledger
  description: ''
  license:
    name: ''
  version: 0.1.0
servers:
  - url: https://api.anthid.com
    description: Production
security: []
tags:
  - name: Ledger
    description: Read current orders, order history, and order activity
  - name: Ledger
    description: Read current positions and position history
  - name: Ledger
    description: Read platform-wide execution metrics
  - name: Ledger
    description: >-
      Read ledger-wide reference data, such as the symbols an organization has
      traded
  - name: Ledger
    description: >-
      Read completed intents. Live ones are served by the intents service at
      /v1/intents; this is the six year record of finished ones
paths:
  /v1/positions/exposure:
    get:
      tags:
        - Ledger
      summary: Get exposure over time
      description: >-
        Reports what the caller's organization held over a trailing window,
        bucketed hourly for a single day and daily beyond that. Every figure is
        a level rather than a flow: positions are carried across buckets in
        which the broker did not restate them, so a quiet stretch repeats the
        preceding level instead of reading as flat. Notional is valued at the
        broker's average cost, not at a market price.
      operationId: getPositionExposure
      parameters:
        - name: account_id
          in: query
          description: >-
            Trading account ID. Omitted, the window covers every account in the
            organization
          required: false
          schema:
            type: string
            format: uuid
          example: 550e8400-e29b-41d4-a716-446655440000
        - name: environment
          in: query
          description: >-
            Required. Which environment the read covers. Resolved to the
            organization's accounts in that environment, including disabled and
            deleted ones, since the ledger stores no environment of its own.
            Rejected with 400 when it disagrees with the account named alongside
            it.
          required: true
          schema:
            $ref: '#/components/schemas/BrokerEnvironment'
          example: paper
        - name: days
          in: query
          description: >-
            Trailing day count. Clamped to 1..=90 and then to the window the
            caller's plan grants; a single day is reported as 24 hourly buckets
          required: true
          schema:
            type: integer
            format: int64
          example: 30
        - name: symbol
          in: query
          description: >-
            Filter by symbol. Symbols are normalized to uppercase; a blank value
            is treated as no filter
          required: false
          schema:
            type: string
          example: AAPL
      responses:
        '200':
          description: Exposure retrieved
          headers:
            anthid-retention-days:
              schema:
                type: integer
                format: int64
              description: >-
                Trailing window, in days, that this answer was produced under.
                Comes from the caller's plan, so a value shorter than the range
                requested means the range was narrowed to it. Absent for
                internal service callers, who have no window.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PositionExposureResponse'
              example:
                data:
                  - gross_notional: '46050.00'
                    long_count: 2
                    long_notional: '26050.00'
                    net_notional: '6050.00'
                    short_count: 1
                    short_notional: '20000.00'
                    timestamp: '2026-08-05T00:00:00Z'
                granularity: day
                opening_position_count: 2
        '400':
          description: >-
            Query parameters are invalid, including a missing or non-numeric
            `days`
          content:
            text/plain:
              schema:
                type: string
        '401':
          description: >-
            Missing or invalid authentication credentials or organization
            context
          content:
            text/plain:
              schema:
                type: string
        '403':
          description: >-
            Caller lacks intent read access, organization access, or ownership
            of the requested trading account, or is on the free tier: analytics
            requires a paid plan and is refused with `BillingTierRestriction`
          content:
            text/plain:
              schema:
                type: string
        '429':
          description: Caller exceeded the request rate limit
          content:
            text/plain:
              schema:
                type: string
        '500':
          description: Unexpected server error while reading exposure
          content:
            text/plain:
              schema:
                type: string
      security:
        - bearerAuth: []
        - apiKeyAuth: []
components:
  schemas:
    BrokerEnvironment:
      type: string
      enum:
        - paper
        - live
    PositionExposureResponse:
      type: object
      description: Exposure over a trailing window, oldest bucket first.
      required:
        - granularity
        - data
        - opening_position_count
      properties:
        data:
          type: array
          items:
            $ref: '#/components/schemas/PositionExposureBucket'
          description: >-
            One entry per bucket in the window, including buckets in which
            nothing

            was held or nothing traded, so the series can be plotted without the

            caller filling gaps.
        granularity:
          $ref: '#/components/schemas/StatsGranularity'
          description: >-
            Width of one bucket: `hour` for a single-day window, `day`
            otherwise.
        opening_position_count:
          type: integer
          format: int64
          description: >-
            Instruments the account had ever held, and not yet flattened, when
            the

            window opened.


            The series carries positions forward from before its own start, so a

            non-zero figure here is what makes the left-hand end a real level
            rather

            than an artefact of where the scan began.
          minimum: 0
    PositionExposureBucket:
      type: object
      description: >-
        What was held at the end of one bucket of the exposure window.


        Every figure is a *level* rather than a flow: it describes the book as
        it

        stood when the bucket closed, not what changed during it. A bucket in
        which

        nothing traded therefore repeats the one before it rather than reporting

        zero.


        Notional is valued at the broker's own average cost, not at a market
        price.

        The ledger stores no marks, so this is what the book cost rather than
        what it

        is worth. The two diverge by exactly the unrealized return.
      required:
        - timestamp
        - long_notional
        - short_notional
        - gross_notional
        - net_notional
        - long_count
        - short_count
      properties:
        gross_notional:
          $ref: '#/components/schemas/Price'
          description: >-
            `long_notional + short_notional`. Total capital committed regardless
            of

            direction.
        long_count:
          type: integer
          format: int64
          description: |-
            Instruments held long, and short, at the close of the bucket. Flat
            positions count as neither.
          minimum: 0
        long_notional:
          $ref: '#/components/schemas/Price'
          description: Cost of everything held long. Zero or positive.
        net_notional:
          $ref: '#/components/schemas/Price'
          description: >-
            `long_notional - short_notional`. Signed directional tilt: negative
            means

            the book was net short.
        short_count:
          type: integer
          format: int64
          minimum: 0
        short_notional:
          $ref: '#/components/schemas/Price'
          description: >-
            Cost of everything held short, as a magnitude, positive when short,
            so

            callers can stack it against `long_notional` without flipping a
            sign.
        timestamp:
          type: string
          format: date-time
          description: Start of the bucket, as an RFC 3339 UTC timestamp.
    StatsGranularity:
      type: string
      description: Width of one bucket in a stats series.
      enum:
        - hour
        - day
    Price:
      type: string
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key

````