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

# Get long vs short positioning over time

> Your traders' gross long and gross short exposure over the last hour, day or week, at the end of each time bucket: for the whole organization, and for the products you ask for with `product` (size, exposure and the number of accounts on each side).

Positions are rebuilt from executions, starting `carryDays` before the range, and valued at your traders' latest execution price on each contract. A position opened before that is not included, so for the current figures use `GET /organization/risk/positioning`; together they give a chart that ends at the live book.

With `assetClass` or `market`, only positions and executions in contracts of those markets count. The positioning read's instruments carry `market` and `assetClass`, so you can filter the live book the same way.

Results are shared for up to 30 seconds (`1h`), 60 seconds (`24h`) or 5 minutes (`7d`) per set of account types and plans. About 60 requests per minute per organization.

## Example

```bash
curl "https://api.hyperprop.com/platform/v1/organization/risk/positioning/history?range=24h&product=MNQ" \
  -H "X-API-Key: hp_live_your_key_here"
```

**Permissions:** requires **view** access to "Traders & accounts".

**Access:** read-only and full-access API keys. Dashboard members need view access to Traders & accounts.



## OpenAPI

````yaml https://api.hyperprop.com/platform/openapi.json get /v1/organization/risk/positioning/history
openapi: 3.0.0
info:
  title: Hyperprop Platform API
  version: 1.0.0
  description: >-
    REST API for the Hyperprop Trading Platform — provision evaluation and
    funded trading accounts, manage traders and plans, react to account
    lifecycle events via signed webhooks, and reconcile billing. Built for prop
    firms integrating from their own backend.


    Authentication, quick start, error handling, idempotency, pagination, custom
    metadata, webhooks, and the MCP connector are documented at
    https://docs.hyperprop.com.
  x-logo:
    url: https://app.hyperprop.com/logo-icon.svg
    altText: Hyperprop
    href: https://hyperprop.com
servers:
  - url: https://api.hyperprop.com/platform
    description: Production
security: []
tags:
  - name: Trading accounts
    description: Create, update, and inspect trading accounts.
  - name: Traders
    description: Look up and update the traders in your organization.
  - name: Trading plans
    description: Define the plans you sell.
  - name: Trading rules
    description: Define how accounts are evaluated.
  - name: Instruments
    description: >-
      The contracts your organization's accounts can trade, with their
      specifications.
  - name: Lockouts
    description: Pause and resume trading on an account.
  - name: Payouts
    description: Check payout eligibility and record payouts.
  - name: Purchases
    description: Purchases recorded for your organization.
  - name: Time Machine
    description: Restore accounts to an earlier trading day or instant.
  - name: Mass credit
    description: >-
      Credit back losses across many accounts after an incident, as background
      jobs you can follow, pause, export and reverse.
  - name: Webhooks
    description: Register webhook endpoints and inspect deliveries.
  - name: Events
    description: Your organization's event history, to replay or audit what happened.
  - name: Real-time streams
    description: >-
      Live events and trading data over a WebSocket, for dashboards and CRMs
      that update as things happen.
  - name: Reconciliation
    description: Balances, end-of-day snapshots, and fills for reconciliation.
  - name: Analytics
    description: Organization performance, revenue and top traders.
  - name: Risk
    description: Firm profit and loss and plan economics.
  - name: Trader insights
    description: >-
      What your traders hold right now and over time, your top traders, and the
      traders you follow.
  - name: Billing and invoices
    description: >-
      Your Hyperprop invoices, credits and billing details, with usage so far
      this month, billing cycles, forecasts and CSV exports.
  - name: Team and roles
    description: Manage dashboard access for your staff.
  - name: API keys
    description: >-
      Manage your organization's API keys: rotation, read-only keys and IP
      allowlists.
  - name: Logs and health
    description: >-
      API request logs, the audit log, integration health, and idempotency key
      recovery.
  - name: Organization profile
    description: Your organization's profile and logo.
  - name: Support
    description: Open and follow up on support tickets.
  - name: Partner access
    description: >-
      Read a trader's journal as an approved partner app, with the trader's own
      key.
paths:
  /v1/organization/risk/positioning/history:
    get:
      tags:
        - Trader insights
      summary: Get long vs short positioning over time
      description: >-
        Your traders' gross long and gross short exposure over the last hour,
        day or week, at the end of each time bucket: for the whole organization,
        and for the products you ask for with `product` (size, exposure and the
        number of accounts on each side).


        Positions are rebuilt from executions, starting `carryDays` before the
        range, and valued at your traders' latest execution price on each
        contract. A position opened before that is not included, so for the
        current figures use `GET /organization/risk/positioning`; together they
        give a chart that ends at the live book.


        With `assetClass` or `market`, only positions and executions in
        contracts of those markets count. The positioning read's instruments
        carry `market` and `assetClass`, so you can filter the live book the
        same way.


        Results are shared for up to 30 seconds (`1h`), 60 seconds (`24h`) or 5
        minutes (`7d`) per set of account types and plans. About 60 requests per
        minute per organization.


        ## Example


        ```bash

        curl
        "https://api.hyperprop.com/platform/v1/organization/risk/positioning/history?range=24h&product=MNQ"
        \
          -H "X-API-Key: hp_live_your_key_here"
        ```


        **Permissions:** requires **view** access to "Traders & accounts".


        **Access:** read-only and full-access API keys. Dashboard members need
        view access to Traders & accounts.
      operationId: getV1OrganizationRiskPositioningHistory
      parameters:
        - description: >-
            `1h` (1-minute buckets), `24h` (5-minute buckets) or `7d` (hourly
            buckets)
          name: range
          in: query
          example: 24h
          schema:
            type: string
            enum:
              - 1h
              - 24h
              - 7d
            default: 24h
        - description: >-
            Comma-separated account types: `evaluation`, `sim_funded`,
            `competition`
          name: accountType
          in: query
          required: false
          example: sim_funded
          schema:
            type: string
            maxLength: 100
        - description: >-
            Comma-separated plan IDs, at most 50; `none` for accounts without a
            plan
          name: planId
          in: query
          required: false
          example: 7f8d9e0a-1b2c-3d4e-5f60-718293a4b5c6
          schema:
            type: string
            maxLength: 2000
        - description: >-
            Comma-separated sectors: `equity_index`, `energy`, `metals`,
            `interest_rates`, `currencies`, `agriculture`, `crypto`, `other`
          name: productGroup
          in: query
          required: false
          example: equity_index,crypto
          schema:
            type: string
            maxLength: 200
        - description: >-
            Comma-separated product keys (`productKey` from `productIndex` or
            the positioning read), at most 10: include their series in
            `products`
          name: product
          in: query
          required: false
          example: MNQ,BTC-PERP
          schema:
            type: string
            maxLength: 200
        - description: >-
            Only one kind of market: `future` (CME Group futures) or `perpetual`
            (perpetuals). Omit for both
          name: assetClass
          in: query
          required: false
          example: perpetual
          schema:
            type: string
            enum:
              - future
              - perpetual
        - description: >-
            Comma-separated markets your organization is enabled for: futures
            `CME`, `CBOT`, `NYMEX`, `COMEX`; perpetuals `HDL`, `BINANCE`,
            `HYPERLIQUID`. With `assetClass`, every market must be of that class
          name: market
          in: query
          required: false
          example: CME,CBOT
          schema:
            type: string
            maxLength: 84
        - name: If-None-Match
          in: header
          required: false
          description: >-
            Optional. The `ETag` of the answer you already have. When the answer
            would be the same, the response is `304` without a body.
          example: '"Hq3mB1c0s8n2JkVbQy4Tz9uXw5E"'
          schema:
            type: string
      responses:
        '200':
          description: Long and short exposure per time bucket
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model1070'
        '304':
          description: >-
            Not modified: the answer is the same as the one whose `ETag` you
            sent in `If-None-Match`. No body; keep using the answer you have.
        '400':
          description: >-
            Invalid parameters: `INVALID_MARKET`, `MARKET_NOT_ALLOWED` (not
            enabled for your organization), `MARKET_ASSET_CLASS_MISMATCH` (a
            market of another `assetClass`), or another validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model510'
        '401':
          description: Authentication required
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model15'
        '403':
          description: This API key does not have admin permissions
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model511'
        '429':
          description: >-
            Too many requests for your organization (`RATE_LIMITED`); wait
            `retryAfterSeconds`. Also returned while your organization already
            has 6 reports being computed at once; wait the `Retry-After`
            seconds.
        '500':
          description: Internal error (`POSITIONING_HISTORY_ERROR`)
        '503':
          description: >-
            History is not available yet (`HISTORY_UNAVAILABLE`), or it took too
            long (`REPORT_TIMEOUT`, with `Retry-After`): choose a shorter range
            or fewer plans
        '504':
          description: >-
            Gateway Timeout - The request did not complete within 25 seconds
            (`REQUEST_TIMEOUT`). Nothing was changed; retry, or narrow the
            request (for example a shorter date range).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Model1071'
      security:
        - X-API-Key: []
components:
  schemas:
    Model1070:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/Model1069'
    Model510:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 400
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: >-
            Unknown market: CMX. Use CME, CBOT, NYMEX, COMEX, HDL, BINANCE,
            HYPERLIQUID
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: INVALID_MARKET
    Model15:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 401
        error:
          type: string
          example: Unauthorized
        message:
          type: string
          example: Authentication required
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: UNAUTHORIZED
    Model511:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: This API key does not have admin permissions
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: INSUFFICIENT_PERMISSIONS
    Model1071:
      type: object
      properties:
        statusCode:
          type: number
          example: 504
        error:
          type: string
          example: Gateway Timeout
        message:
          type: string
          example: >-
            The request did not complete within 25 seconds. Try again, or narrow
            it (for example a shorter date range).
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: REQUEST_TIMEOUT
    Model1069:
      type: object
      properties:
        organizationId:
          type: string
          example: 55555555-5555-4555-8555-555555555555
        range:
          $ref: '#/components/schemas/Model1053'
        bucketSeconds:
          type: integer
          description: Length of one bucket
          example: 300
        since:
          type: string
          description: Start of the first bucket
          example: '2026-11-02T14:45:00.000Z'
        until:
          type: string
          description: End of the last bucket
          example: '2026-11-03T14:45:00.000Z'
        asOf:
          type: string
          description: When the history was read; the last bucket runs to here
          example: '2026-11-03T14:41:07.118Z'
        carryDays:
          type: integer
          description: >-
            Positions are rebuilt from this many days before `since`; one held
            longer is not included
          example: 2
        marketFilter:
          $ref: '#/components/schemas/marketFilter'
        times:
          $ref: '#/components/schemas/Model1054'
        totals:
          $ref: '#/components/schemas/Model1057'
        products:
          $ref: '#/components/schemas/Model1063'
        productIndex:
          $ref: '#/components/schemas/Model1065'
        fills:
          type: integer
          description: Executions in the range, in every market
          example: 18342
        live:
          $ref: '#/components/schemas/Model1068'
    Model1053:
      type: string
      example: 24h
      enum:
        - 1h
        - 24h
        - 7d
    marketFilter:
      type: object
      description: The market filter applied
      properties:
        assetClass:
          $ref: '#/components/schemas/Model501'
        markets:
          $ref: '#/components/schemas/Model502'
    Model1054:
      type: array
      description: End of each bucket; every series has one value per entry
      example:
        - '2026-11-02T14:50:00.000Z'
        - '2026-11-02T14:55:00.000Z'
        - '2026-11-02T15:00:00.000Z'
      items:
        type: string
    Model1057:
      type: object
      description: The whole organization (within the filters)
      properties:
        longNotional:
          $ref: '#/components/schemas/Model1055'
        shortNotional:
          $ref: '#/components/schemas/Model1056'
        netNotional:
          $ref: '#/components/schemas/netNotional'
    Model1063:
      type: array
      description: Series for each product asked for with `product`
      items:
        $ref: '#/components/schemas/Model1062'
    Model1065:
      type: array
      description: Every product held in the range, largest first
      items:
        $ref: '#/components/schemas/Model1064'
    Model1068:
      type: object
      description: >-
        The same figures right now, under the same filters, so the chart ends at
        the present. Null while not available
      properties:
        at:
          type: string
          example: '2026-11-13T15:41:07.118Z'
        historyAsOf:
          type: string
          description: '`asOf` of the series they follow'
          example: '2026-11-13T15:40:02.000Z'
        historyCompleteUntil:
          type: string
          description: >-
            Every fill before this is in the series; buckets after it may still
            change. Null when unknown
          example: '2026-11-13T15:39:00.000Z'
        totals:
          $ref: '#/components/schemas/Model1066'
        products:
          $ref: '#/components/schemas/Model1067'
    Model501:
      type: string
      description: Null when not filtered by class
      example: future
      enum:
        - future
        - perpetual
    Model502:
      type: array
      description: Empty when not filtered by market
      example:
        - CME
        - CBOT
      items:
        type: string
    Model1055:
      type: array
      description: Gross long exposure in USD
      example:
        - 182400
        - 190150
        - 176820
      items:
        type: number
    Model1056:
      type: array
      description: Gross short exposure in USD
      example:
        - 78200
        - 84300
        - 113400
      items:
        type: number
    netNotional:
      type: array
      description: Long minus short
      example:
        - 104200
        - 105850
        - 63420
      items:
        type: number
    Model1062:
      type: object
      properties:
        productKey:
          type: string
          description: The futures root, or the base asset with `-PERP` for perpetuals
          example: MNQ
        rootSymbol:
          type: string
          example: MNQ
        name:
          type: string
          example: Micro E-mini Nasdaq-100
        productGroup:
          $ref: '#/components/schemas/productGroup'
        sizeUnit:
          type: string
          description: 'Unit of the quantity series: `contracts`, or the base asset (`BTC`)'
          example: contracts
        longQuantity:
          $ref: '#/components/schemas/Model1058'
        shortQuantity:
          $ref: '#/components/schemas/Model1059'
        longNotional:
          $ref: '#/components/schemas/Model1060'
        shortNotional:
          $ref: '#/components/schemas/Model1061'
        longAccounts:
          $ref: '#/components/schemas/longAccounts'
        shortAccounts:
          $ref: '#/components/schemas/shortAccounts'
    Model1064:
      type: object
      properties:
        productKey:
          type: string
          example: MNQ
        rootSymbol:
          type: string
          example: MNQ
        name:
          type: string
          example: Micro E-mini Nasdaq-100
        productGroup:
          $ref: '#/components/schemas/productGroup'
        peakGrossNotional:
          type: number
          description: Largest long + short exposure in the range
          example: 412800
    Model1066:
      type: object
      properties:
        longNotional:
          type: number
        shortNotional:
          type: number
        netNotional:
          type: number
    Model1067:
      type: array
      description: >-
        The same fields as `products`, one value each, for the products in
        `products`
      items:
        $ref: '#/components/schemas/changes'
    productGroup:
      type: string
      example: equity_index
      enum:
        - equity_index
        - energy
        - metals
        - interest_rates
        - currencies
        - agriculture
        - crypto
        - other
    Model1058:
      type: array
      description: Gross long size at the end of each bucket
      example:
        - 42
        - 45
        - 40
      items:
        type: number
    Model1059:
      type: array
      example:
        - 18
        - 20
        - 26
      items:
        type: number
    Model1060:
      type: array
      description: Gross long exposure in USD
      example:
        - 182400
        - 190150
        - 176820
      items:
        type: number
    Model1061:
      type: array
      example:
        - 78200
        - 84300
        - 113400
      items:
        type: number
    longAccounts:
      type: array
      description: Accounts long a contract of this product
      example:
        - 12
        - 13
        - 11
      items:
        type: integer
    shortAccounts:
      type: array
      example:
        - 6
        - 7
        - 9
      items:
        type: integer
    changes:
      type: object
  securitySchemes:
    X-API-Key:
      type: apiKey
      name: X-API-Key
      in: header
      description: >-
        Organization API key (`hp_live_...`), sent in the `X-API-Key` header.
        Create, rotate and restrict keys in the dashboard or with the API keys
        endpoints; an organization can have two active keys, so you can rotate
        without downtime. A **full-access** key can call every endpoint in this
        reference. A **read-only** key can call `GET` endpoints (and create a
        trading stream token); any other request returns `403 READ_ONLY_KEY`. A
        key with an IP allowlist returns `403 IP_NOT_ALLOWED` from any other
        address. Each endpoint lists which keys can call it under **Access**.

````

## Related topics

- [Read trader sentiment over time](https://docs.hyperprop.com/platform-api/trader-insights/read-trader-sentiment-over-time.md)
- [Real-time trading stream](https://docs.hyperprop.com/guides/realtime-trading-stream.md)
- [Get live positioning across all accounts](https://docs.hyperprop.com/platform-api/trader-insights/get-live-positioning-across-all-accounts.md)
- [Get top traders over time](https://docs.hyperprop.com/platform-api/analytics/get-top-traders-over-time.md)
- [Get all-months billing aggregates](https://docs.hyperprop.com/platform-api/billing-and-invoices/get-all-months-billing-aggregates.md)


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