> ## 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.

# Preview a balance credit

> Shows what crediting back an incident window's losses would do, without changing anything.

For each account you list, it adds up the net P&L of every fill in the window (`windowStart` inclusive, `windowEnd` exclusive): realized P&L minus fees and commission. An account whose window net P&L is a loss gets that loss back as a credit. Accounts left out are listed in `skipped` with the reason: passed, failed or expired accounts are never credited.

Review the warnings before applying: `BALANCE_TRAIL_MISMATCH` means the account's recorded balance changes for these fills do not add up to their net P&L, so crediting it may pay back a loss its balance never took.

Apply it with `POST /organization/balance-adjustments`, sending `totals.totalAmount` back as `expectedTotalAmount`.

Requires **manage** permission on traders.

```bash
curl -X POST "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview" \
  -H "X-API-Key: hp_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{"accountIds": ["7c9e6679-7425-40de-944b-e07fc1f90ae7"], "windowStart": "2026-10-21T13:30:00Z", "windowEnd": "2026-10-21T14:15:00Z"}'
```



## OpenAPI

````yaml https://api.hyperprop.com/platform/openapi.json post /v1/organization/balance-adjustments/preview
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: 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 and real-time event stream.
  - name: Reconciliation
    description: Balances, end-of-day snapshots, and fills for reconciliation.
  - name: Analytics
    description: Organization performance and plan economics.
  - name: Billing
    description: 'Your Hyperprop bill: activity, billing cycles, and forecasts.'
  - name: Team and roles
    description: Manage dashboard access for your staff.
  - name: API keys
    description: Manage your organization's API key.
  - 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/balance-adjustments/preview:
    post:
      tags:
        - Mass credit
      summary: Preview a balance credit
      description: >-
        Shows what crediting back an incident window's losses would do, without
        changing anything.


        For each account you list, it adds up the net P&L of every fill in the
        window (`windowStart` inclusive, `windowEnd` exclusive): realized P&L
        minus fees and commission. An account whose window net P&L is a loss
        gets that loss back as a credit. Accounts left out are listed in
        `skipped` with the reason: passed, failed or expired accounts are never
        credited.


        Review the warnings before applying: `BALANCE_TRAIL_MISMATCH` means the
        account's recorded balance changes for these fills do not add up to
        their net P&L, so crediting it may pay back a loss its balance never
        took.


        Apply it with `POST /organization/balance-adjustments`, sending
        `totals.totalAmount` back as `expectedTotalAmount`.


        Requires **manage** permission on traders.


        ```bash

        curl -X POST
        "https://api.hyperprop.com/platform/v1/organization/balance-adjustments/preview"
        \
          -H "X-API-Key: hp_live_your_key_here" \
          -H "Content-Type: application/json" \
          -d '{"accountIds": ["7c9e6679-7425-40de-944b-e07fc1f90ae7"], "windowStart": "2026-10-21T13:30:00Z", "windowEnd": "2026-10-21T14:15:00Z"}'
        ```
      operationId: postV1OrganizationBalanceadjustmentsPreview
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Model972'
      responses:
        '200':
          description: Preview
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model978'
        '400':
          description: >-
            Bad Request - Invalid payload or window (`VALIDATION_ERROR`,
            `INVALID_WINDOW`), or some `accountIds` are not accounts of your
            organization (`ACCOUNTS_NOT_FOUND`; nothing is changed)
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model835'
        '401':
          description: Authentication required
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model11'
        '403':
          description: >-
            Forbidden - The caller lacks traders:manage
            (`INSUFFICIENT_PERMISSIONS`)
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model979'
        '500':
          description: An unexpected error occurred
          content:
            '*/*':
              schema:
                $ref: '#/components/schemas/Model6'
      security:
        - X-API-Key: []
components:
  schemas:
    Model972:
      type: object
      properties:
        accountIds:
          $ref: '#/components/schemas/Model971'
        windowStart:
          type: string
          format: date-time
          description: Start of the incident window (inclusive), ISO 8601.
          example: '2026-10-21T13:30:00Z'
        windowEnd:
          type: string
          format: date-time
          description: >-
            End of the incident window (exclusive). Must be in the past; the
            window may span at most 7 days.
          example: '2026-10-21T14:15:00Z'
        policy:
          $ref: '#/components/schemas/policy'
      required:
        - accountIds
        - windowStart
        - windowEnd
    Model978:
      type: object
      properties:
        success:
          type: boolean
          example: true
        data:
          $ref: '#/components/schemas/Model977'
    Model835:
      type: object
      properties:
        success:
          type: boolean
          example: false
        statusCode:
          type: number
          example: 400
        error:
          type: string
          example: Bad Request
        message:
          type: string
          example: >-
            2 of the account IDs are not accounts of your organization; nothing
            was changed
        code:
          $ref: '#/components/schemas/Model834'
        unknownAccountIds:
          $ref: '#/components/schemas/unknownAccountIds'
        unknownCount:
          type: integer
    Model11:
      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
    Model979:
      type: object
      properties:
        statusCode:
          type: number
          example: 403
        error:
          type: string
          example: Forbidden
        message:
          type: string
          example: Your role does not have write access to "Traders & accounts"
        code:
          $ref: '#/components/schemas/code'
    Model6:
      type: object
      properties:
        success:
          type: boolean
          description: Always false on errors
          example: false
        statusCode:
          type: number
          example: 500
        error:
          type: string
          example: Internal Server Error
        message:
          type: string
          example: An unexpected error occurred
        code:
          type: string
          description: Machine-readable error code — switch on this, not on message text
          example: INTERNAL_ERROR
    Model971:
      type: array
      description: >-
        The accounts to consider (1 to 5,000 of your organization; duplicates
        are ignored).
      example:
        - 7c9e6679-7425-40de-944b-e07fc1f90ae7
      minItems: 1
      maxItems: 5000
      items:
        type: string
        x-format:
          guid: true
    policy:
      type: object
      description: >-
        How the credit is computed and applied. Every field is optional; the
        defaults are shown.
      properties:
        lossBasis:
          $ref: '#/components/schemas/lossBasis'
        shiftDailyBaseline:
          type: boolean
          description: >-
            Default `true`: the day's starting balance moves with the credit, so
            the credit is not counted as that day's profit (daily loss limit and
            daily profit stay as they were).
          example: true
        highWaterMarkMode:
          $ref: '#/components/schemas/highWaterMarkMode'
        requireFlat:
          type: boolean
          description: >-
            Default `false`. When `true`, accounts that hold positions or
            working orders when the credit is applied are not credited (they
            fail with `OPEN_EXPOSURE`; retry later).
          example: false
        skipAlreadyCredited:
          type: boolean
          description: >-
            Default `true`: leave out accounts already credited, and not
            reversed, by a batch whose window overlaps this one.
          example: true
        maxCreditPerAccount:
          type: number
          description: Largest credit one account may get. No cap by default.
          example: null
          x-constraint:
            precision: 2
            sign: positive
    Model977:
      type: object
      properties:
        windowStart:
          type: string
          example: '2026-10-21T13:30:00.000Z'
        windowEnd:
          type: string
          example: '2026-10-21T14:15:00.000Z'
        policy:
          $ref: '#/components/schemas/policy'
        totals:
          $ref: '#/components/schemas/Model973'
        credits:
          $ref: '#/components/schemas/credits'
        skipped:
          $ref: '#/components/schemas/skipped'
    Model834:
      type: string
      example: ACCOUNTS_NOT_FOUND
      enum:
        - VALIDATION_ERROR
        - INVALID_WINDOW
        - ACCOUNTS_NOT_FOUND
        - NOTHING_TO_DO
    unknownAccountIds:
      type: array
      description: 'With ACCOUNTS_NOT_FOUND: up to 50 of the IDs that were not found'
      items:
        type: string
    code:
      type: string
      example: INSUFFICIENT_PERMISSIONS
      enum:
        - INSUFFICIENT_PERMISSIONS
    lossBasis:
      type: string
      description: >-
        What is credited back: the net P&L of the window's fills after fees and
        commission (default), or before them.
      example: net_after_fees
      enum:
        - net_after_fees
        - net_before_fees
    highWaterMarkMode:
      type: string
      description: >-
        Default `unchanged`: the high-water mark (trailing drawdown peak) stays
        where it is. `shift` moves it by the credit as well.
      example: unchanged
      enum:
        - unchanged
        - shift
    Model973:
      type: object
      properties:
        accounts:
          type: integer
          example: 1250
        credited:
          type: integer
          example: 840
        skipped:
          type: integer
          example: 410
        totalAmount:
          type: number
          description: Send this back as `expectedTotalAmount` to apply the credit
          example: 186420.75
        warnings:
          type: integer
          description: Credited accounts with at least one warning
          example: 3
    credits:
      type: array
      items:
        $ref: '#/components/schemas/Model976'
    skipped:
      type: array
      items:
        $ref: '#/components/schemas/Model387'
    Model976:
      type: object
      properties:
        accountId:
          type: string
          example: 7c9e6679-7425-40de-944b-e07fc1f90ae7
          x-format:
            guid: true
        accountNumber:
          type: string
          example: ACC-50K-000123
        status:
          type: string
          example: in_progress
        amount:
          type: number
          description: The credit
          example: 412.5
        netPnl:
          type: number
          description: Net P&L of the window's fills, after fees and commission
          example: -412.5
        realizedPnl:
          type: number
          example: -398.1
        fees:
          type: number
          description: Fees and commission of the window's fills
          example: 14.4
        fills:
          type: integer
          example: 6
        currentBalance:
          type: number
          example: 48920
        warnings:
          $ref: '#/components/schemas/Model975'
    Model387:
      type: object
      properties:
        accountId:
          type: string
          example: 9b2e1f4c-3d5a-4b6c-8e7f-0a1b2c3d4e5f
          x-format:
            guid: true
        accountNumber:
          type: string
          example: ACC-50K-000456
        reason:
          $ref: '#/components/schemas/reason'
        netPnl:
          type: number
          example: -120
    Model975:
      type: array
      description: >-
        `BALANCE_TRAIL_MISMATCH`: the account's recorded balance changes for
        these fills do not add up to their net P&L, so the loss may not have
        reached the balance; check the account before crediting it. `CAPPED`:
        limited by `maxCreditPerAccount`.
      example: []
      items:
        $ref: '#/components/schemas/Model974'
    reason:
      type: string
      description: >-
        `ACCOUNT_CLOSED`: passed, failed or expired. `NO_FILLS`: no fill in the
        window. `NO_LOSS`: the window's net P&L is not a loss.
        `ALREADY_CREDITED`: credited for an overlapping window already.
      example: ACCOUNT_CLOSED
      enum:
        - ACCOUNT_CLOSED
        - NO_FILLS
        - NO_LOSS
        - ALREADY_CREDITED
    Model974:
      type: string
      enum:
        - BALANCE_TRAIL_MISMATCH
        - CAPPED
  securitySchemes:
    X-API-Key:
      type: apiKey
      name: X-API-Key
      in: header
      description: >-
        Organization API key. Format: "hp_live_{key}". Organization admins
        manage the key in the dashboard.

````

## Related topics

- [Preview a mass credit](https://docs.hyperprop.com/platform-api/mass-credit/preview-a-mass-credit.md)
- [Reverse a balance credit](https://docs.hyperprop.com/platform-api/mass-credit/reverse-a-balance-credit.md)
- [Confirm a mass credit](https://docs.hyperprop.com/platform-api/mass-credit/confirm-a-mass-credit.md)
- [Start a draft preview](https://docs.hyperprop.com/platform-api/mass-credit/start-a-draft-preview.md)
- [Delete a mass credit template](https://docs.hyperprop.com/platform-api/mass-credit/delete-a-mass-credit-template.md)


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