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

# List accounts with optional field selection and nested objects

> Returns paginated accounts with optional field selection through `query`. Callers can request account fields, `user` and `phase` objects, position counts, and up to 10 recent closed positions per account. `status` filters accounts and defaults to `ACTIVE`; use `all` to disable that filter. `position_counts_closed_at_after` and `position_counts_closed_at_before` limit only the position count fields, not the returned accounts. Staff users see accessible firm accounts; regular users see only their own.



## OpenAPI

````yaml /openapi.json get /api/accounts/summary/
openapi: 3.0.3
info:
  title: TBBO API
  version: 1.0.0
  description: >
    Authentication uses short-lived session tokens (3 hours).


    Send the token with every request using the `Authorization` header:


    ```

    Authorization: Token <token>

    ```


    Example:


    ```

    Authorization: Token 123abc456def789

    ```


    To obtain a token, call `POST /auth/login/` with valid credentials. The
    response includes a `key` value. Use that value in the header above for
    subsequent API calls.


    How to find required IDs:


    - `challenge_id`: Prop Tech Configuration -> Challenges

    - `user_id`: Tickblaze Manager -> Users

    - `account_id`: Tickblaze Manager -> Accounts 
servers: []
security: []
tags:
  - name: withdrawals
    description: Withdrawal related endpoints
    x-displayName: Withdrawals
paths:
  /api/accounts/summary/:
    get:
      tags:
        - Accounts
      summary: List accounts with optional field selection and nested objects
      description: >-
        Returns paginated accounts with optional field selection through
        `query`. Callers can request account fields, `user` and `phase` objects,
        position counts, and up to 10 recent closed positions per account.
        `status` filters accounts and defaults to `ACTIVE`; use `all` to disable
        that filter. `position_counts_closed_at_after` and
        `position_counts_closed_at_before` limit only the position count fields,
        not the returned accounts. Staff users see accessible firm accounts;
        regular users see only their own.
      operationId: api_accounts_summary_list
      parameters:
        - in: query
          name: broker_type
          schema:
            type: string
            enum:
              - ALL
              - Ctrader
              - MatchTrade
              - MetaTrader
              - MetaTrader5
              - Sim2Funded
              - Tickblaze
              - TickblazeOMS
              - TradeLocker
              - Tradovate
              - Volumetrica
          description: >-
            Filter accounts by broker type. Accepts a single value or a
            comma-separated list of values. Multiple values are treated as a
            union (return rows matching any of them).
          examples:
            SingleBroker:
              value: MATCH_TRADER
              summary: Single broker
            MultipleBrokers(union):
              value: MATCH_TRADER,META_TRADER
              summary: Multiple brokers (union)
        - in: query
          name: created_after
          schema:
            type: string
            format: date-time
          description: >-
            Return only accounts created at or after this ISO 8601 datetime.
            Combine `*_after` and `*_before` to define a window. The maximum
            window span is 31 days when both bounds are set.
          examples:
            StartOfTheMonth:
              value: '2026-05-01T00:00:00Z'
              summary: Start of the month
        - in: query
          name: created_before
          schema:
            type: string
            format: date-time
          description: >-
            Return only accounts created at or before this ISO 8601 datetime.
            Combine `*_after` and `*_before` to define a window. The maximum
            window span is 31 days when both bounds are set.
          examples:
            EndOfTheMonth:
              value: '2026-05-31T23:59:59Z'
              summary: End of the month
        - in: query
          name: disabled_at_after
          schema:
            type: string
            format: date-time
          description: >-
            Return only accounts whose disabled timestamp is at or after this
            ISO 8601 datetime. Combine `*_after` and `*_before` to define a
            window. The maximum window span is 31 days when both bounds are set.
          examples:
            Past24HoursWindowStart:
              value: '2026-05-03T00:00:00Z'
              summary: Past 24 hours window start
        - in: query
          name: disabled_at_before
          schema:
            type: string
            format: date-time
          description: >-
            Return only accounts whose disabled timestamp is at or before this
            ISO 8601 datetime. Combine `*_after` and `*_before` to define a
            window. The maximum window span is 31 days when both bounds are set.
          examples:
            Past24HoursWindowEnd:
              value: '2026-05-04T00:00:00Z'
              summary: Past 24 hours window end
        - in: query
          name: modified_after
          schema:
            type: string
            format: date-time
          description: >-
            Return only accounts last modified at or after this ISO 8601
            datetime. Useful for incremental syncs. Combine `*_after` and
            `*_before` to define a window. The maximum window span is 31 days
            when both bounds are set.
          examples:
            LastSyncCursor:
              value: '2026-05-03T12:00:00Z'
              summary: Last sync cursor
        - in: query
          name: modified_before
          schema:
            type: string
            format: date-time
          description: >-
            Return only accounts last modified at or before this ISO 8601
            datetime. Combine `*_after` and `*_before` to define a window. The
            maximum window span is 31 days when both bounds are set.
        - in: query
          name: page
          schema:
            type: integer
          description: 1-indexed page number. Defaults to 1.
        - in: query
          name: page_size
          schema:
            type: integer
          description: Rows per page. Defaults to 20, max 100.
        - in: query
          name: payout_frequency
          schema:
            type: string
            enum:
              - BI-WEEKLY
              - DAILY
              - EVERY 10 DAYS
              - EVERY 21 DAYS
              - EVERY 28 DAYS
              - EVERY 3 DAYS
              - EVERY 5 DAYS
              - MONTHLY
              - TRIPLE PAYOUT
              - WEEKLY
          description: >-
            Filter accounts by payout frequency. Accepts a single value or a
            comma-separated list of values. Multiple values are treated as a
            union (return rows matching any of them).
          examples:
            SingleValue:
              value: MONTHLY
              summary: Single value
            MultipleValues:
              value: MONTHLY,WEEKLY
              summary: Multiple values
        - in: query
          name: position_counts_closed_at_after
          schema:
            type: string
            format: date-time
          description: >-
            Scope `long_positions_count` and `short_positions_count` to closed
            positions with close timestamps at or after this ISO 8601 datetime.
            This changes only those count fields; it does not change which
            accounts are returned. Counts are all-time when this and
            `position_counts_closed_at_before` are omitted.
          examples:
            TradingSessionStart:
              value: '2026-05-03T13:30:00Z'
              summary: Trading session start
        - in: query
          name: position_counts_closed_at_before
          schema:
            type: string
            format: date-time
          description: >-
            Scope `long_positions_count` and `short_positions_count` to closed
            positions with close timestamps at or before this ISO 8601 datetime.
            This count window is inclusive and based on closed-position close
            time.
          examples:
            TradingSessionEnd:
              value: '2026-05-03T20:00:00Z'
              summary: Trading session end
        - in: query
          name: query
          schema:
            type: string
          description: >-
            **Choose which fields you want in the response.**


            Pass a brace-delimited list of the fields you want. The response
            includes exactly those fields, in the shape you request — useful for
            trimming large responses to just what your report needs, and for
            expanding related objects (user, firm, positions) inline so you
            don't need follow-up calls.


            **Syntax:**

            - Flat field list: `?query={account_id, balance, equity}`

            - Nested object: `?query={account_id, user{id, email}}`

            - Multiple nested objects: `?query={account_id, user{id}, phase{id,
            title}}`


            **Nesting limit:** 2 levels deep. Requests nested deeper are
            rejected with HTTP 400. The outermost `{...}` counts as level 1;
            each `field{...}` inside adds a level.


            **Behavior when omitted:** the response includes every field
            documented in the `200` response schema. For best performance, pass
            `?query=` explicitly and ask for only the fields you need — some
            fields (counts, lists of related objects) are skipped from the
            response cost when not requested.
          examples:
            PickAFewFields:
              value: '{account_id, balance, equity}'
              summary: Pick a few fields
              description: Returns just those three fields per row.
            End-of-dayReportingShape:
              value: >-
                {account_id, status, status_reason, closed_pnl_today,
                trading_days, initial_balance}
              summary: End-of-day reporting shape
              description: Status and financial fields in one call, no nested objects.
            AddPositionCountsPerAccount:
              value: '{account_id, long_positions_count, short_positions_count}'
              summary: Add position counts per account
              description: Per-account counts of long and short closed positions.
            IncludeUserAndPhaseDetails:
              value: '{account_id, user{id, email, full_name}, phase{id, title, step}}'
              summary: Include user and phase details
              description: Owner and phase objects returned inline with the account row.
            IncludeUpTo10RecentClosedPositionsPerAccount:
              value: >-
                {account_id, closed_positions{id, symbol, direction, profit,
                close_time}}
              summary: Include up to 10 recent closed positions per account
              description: >-
                Returns the 10 most-recently-closed positions per account,
                ordered newest first by close time. The 10-per-account limit is
                fixed and cannot be raised by the client.
            FullReportingShape—Replaces4SeparateCalls:
              value: >-
                {account_id, status, balance, equity, closed_pnl_today,
                trading_days, long_positions_count, short_positions_count,
                user{id, email}, closed_positions{id, symbol, profit,
                close_time}}
              summary: Full reporting shape — replaces 4 separate calls
              description: >-
                Account status, financials, position counts, owner info, and
                recent positions in one paginated response.
        - in: query
          name: source
          schema:
            type: string
            enum:
              - ADMIN_MANUAL_CREATE
              - ADMIN_VERIFICATION
              - DATA_IMPORT
              - WEBHOOK
          description: >-
            Filter accounts by their creation source. Accepts a single value or
            a comma-separated list of values. Multiple values are treated as a
            union (return rows matching any of them).
          examples:
            SingleSource:
              value: WEBHOOK
              summary: Single source
        - in: query
          name: status
          schema:
            type: string
          description: >-
            Filter accounts by status. Accepts any AccountStatusChoices value
            (e.g. ACTIVE, FAILED, BLOCKED) or the literal `all` to disable
            filtering. Defaults to ACTIVE when omitted.
        - in: query
          name: status_reason
          schema:
            type: string
            enum:
              - ACCOUNT_EXPIRED
              - CHALLENGE_RESET
              - COPY_TRADING_DETECTED
              - DAILY_DRAWDOWN_EXCEEDED
              - FLOATING_PNL_EXCEEDED
              - MAX_DRAWDOWN_EXCEEDED
              - PROFIT_TARGET_REACHED
              - RULE_BREACHED
              - SUBSCRIPTION_EXPIRED
              - TRADING_STRATEGY_NOT_SUITABLE
              - WITHDRAWAL_REQUESTED
          description: >-
            Filter accounts by status reason. Useful in combination with
            `status=FAILED` to detect specific failure modes (e.g. soft
            breaches). Accepts a single value or a comma-separated list of
            values. Multiple values are treated as a union (return rows matching
            any of them).
          examples:
            SingleValue:
              value: DAILY_DRAWDOWN_EXCEEDED
              summary: Single value
            MultipleValues(union):
              value: DAILY_DRAWDOWN_EXCEEDED,GLOBAL_DRAWDOWN_EXCEEDED
              summary: Multiple values (union)
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/PaginatedAccountSummaryList'
              examples:
                ThreeFieldsOnly:
                  value:
                    meta:
                      count: 123
                      page: 1
                      page_size: 20
                      total_pages: 7
                      has_next: true
                      has_previous: false
                      next: https://api.example.org/resources/?page=2
                      previous: null
                    results:
                      - account_id: 101
                        balance: 50000
                        equity: 52500.5
                  summary: Just account_id, balance, equity
                  description: 'Request: `?query={account_id, balance, equity}`'
                End-of-dayReportingShape:
                  value:
                    meta:
                      count: 123
                      page: 1
                      page_size: 20
                      total_pages: 7
                      has_next: true
                      has_previous: false
                      next: https://api.example.org/resources/?page=2
                      previous: null
                    results:
                      - account_id: 102
                        status: FAILED
                        status_reason: DAILY_DRAWDOWN_EXCEEDED
                        closed_pnl_today: '-2200.00'
                        profit_loss: '-2200.00'
                        trading_days: 3
                        initial_balance: '50000.00'
                        balance: 47800
                        equity: 47800
                        leverage: '30.00'
                        mae: '-2350.00'
                        mfe: '180.00'
                        long_positions_count: 12
                        short_positions_count: 4
                  summary: Status, financials, risk metrics, and counts in one call
                  description: >-
                    Request: `?status=all&query={account_id, status,
                    status_reason, closed_pnl_today, profit_loss, trading_days,
                    initial_balance, balance, equity, leverage, mae, mfe,
                    long_positions_count, short_positions_count}`. Add
                    `&position_counts_closed_at_after=2026-05-03T13:30:00Z&position_counts_closed_at_before=2026-05-03T20:00:00Z`
                    to scope only the count fields to a trading-session
                    close-time window.
                WithUserAndPhase:
                  value:
                    meta:
                      count: 123
                      page: 1
                      page_size: 20
                      total_pages: 7
                      has_next: true
                      has_previous: false
                      next: https://api.example.org/resources/?page=2
                      previous: null
                    results:
                      - account_id: 103
                        status: ACTIVE
                        user:
                          id: 51
                          email: trader@example.com
                          full_name: Jane Doe
                        phase:
                          id: 7
                          title: Evaluation Step 1
                          step: 1
                          target_profit: '0.10000'
                          daily_drawdown: '0.0500'
                          maximum_drawdown: '0.1000'
                  summary: Owner and phase objects nested in each row
                  description: >-
                    Request: `?query={account_id, status, user{id, email,
                    full_name}, phase{id, title, step, target_profit,
                    daily_drawdown, maximum_drawdown}}`
                WithRecentClosedPositions:
                  value:
                    meta:
                      count: 123
                      page: 1
                      page_size: 20
                      total_pages: 7
                      has_next: true
                      has_previous: false
                      next: https://api.example.org/resources/?page=2
                      previous: null
                    results:
                      - account_id: 104
                        closed_positions:
                          - id: 9001
                            symbol: EURUSD
                            direction: Long
                            profit: '120.50'
                            open_price: '1.0820'
                            close_price: '1.0834'
                            open_time: '2026-04-30T15:00:00Z'
                            close_time: '2026-04-30T20:30:00Z'
                          - id: 9000
                            symbol: NAS100
                            direction: Short
                            profit: '-45.00'
                            open_price: '17820.00'
                            close_price: '17835.00'
                            open_time: '2026-04-30T16:45:00Z'
                            close_time: '2026-04-30T18:15:00Z'
                  summary: Up to 10 most-recently-closed positions per account
                  description: >-
                    Request: `?query={account_id, closed_positions{id, symbol,
                    direction, profit, open_price, close_price, open_time,
                    close_time}}`. Returns up to 10 positions per account,
                    ordered newest first by close time. The 10-per-account limit
                    is fixed.


                    `direction` is returned as `Long` or `Short`. `state` is
                    returned as `Open` or `Closed` (always `Closed` here).
                EmptyResult:
                  value:
                    meta:
                      count: 123
                      page: 1
                      page_size: 20
                      total_pages: 7
                      has_next: true
                      has_previous: false
                      next: https://api.example.org/resources/?page=2
                      previous: null
                    results:
                      - []
                  summary: No accounts match the filter
                  description: >-
                    Returned when no accounts match `?status=` (or you have no
                    visible accounts).
          description: ''
      security:
        - tokenAuth: []
components:
  schemas:
    PaginatedAccountSummaryList:
      type: object
      required:
        - meta
        - results
      properties:
        meta:
          type: object
          required:
            - count
            - page
            - page_size
            - total_pages
            - has_next
            - has_previous
            - next
            - previous
          description: >-
            Pagination metadata. Use `has_next`/`has_previous` for boolean page
            checks and `next`/`previous` for page URLs.
          example:
            count: 123
            page: 1
            page_size: 20
            total_pages: 7
            has_next: true
            has_previous: false
            next: https://api.example.org/resources/?page=2
            previous: null
          properties:
            count:
              type: integer
              example: 123
              description: Total number of items matching the request.
            page:
              type: integer
              example: 1
              description: Current 1-indexed page number.
            page_size:
              type: integer
              example: 20
              description: Number of items returned per page.
            total_pages:
              type: integer
              example: 7
              description: Total number of pages available.
            has_next:
              type: boolean
              example: true
              description: Whether another page is available after this one.
            has_previous:
              type: boolean
              example: false
              description: Whether a page is available before this one.
            next:
              type: string
              nullable: true
              format: uri
              example: http://api.example.org/accounts/?page=2
              description: URL for the next page, or null on the final page.
            previous:
              type: string
              nullable: true
              format: uri
              example: null
              description: URL for the previous page, or null on the first page.
        results:
          type: array
          items:
            $ref: '#/components/schemas/AccountSummary'
    AccountSummary:
      type: object
      description: >-
        Reporting-oriented account payload that supports restql ``?query=``
        field

        selection and nested expansion. Pair with ``AccountViewSet.summary`` via

        ``ReportingViewSetMixin`` so eager-loading and conditional annotations

        fire based on which fields the client requested.


        Counts (long_positions_count, short_positions_count) are queryset

        annotations attached by ``AccountSummaryService.annotate_counts`` only

        when the requesting query asks for them. ``trading_days`` is precomputed

        in bulk by ``compute_trading_days_bulk`` and attached to each instance

        as ``_trading_days_cache`` to avoid per-row work.
      properties:
        account_id:
          type: integer
          readOnly: true
        user_id:
          type: integer
          readOnly: true
        challenge_short_code:
          type: string
          nullable: true
          maxLength: 30
        created_at:
          type: string
          format: date-time
          readOnly: true
        modified_at:
          type: string
          format: date-time
          readOnly: true
        status:
          allOf:
            - $ref: '#/components/schemas/Status293Enum'
          default: ACTIVE
        status_reason:
          nullable: true
          oneOf:
            - $ref: '#/components/schemas/StatusReasonEnum'
            - $ref: '#/components/schemas/BlankEnum'
            - $ref: '#/components/schemas/NullEnum'
        custom_status_reason:
          type: string
          nullable: true
        disabled_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        balance:
          type: number
          format: double
          readOnly: true
        equity:
          type: number
          format: double
          readOnly: true
        initial_balance:
          type: number
          format: double
          readOnly: true
        previous_end_of_day_balance:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,2})?$
          nullable: true
        daily_pnl:
          type: string
          format: decimal
          pattern: ^-?\d{0,26}(?:\.\d{0,2})?$
          readOnly: true
          nullable: true
          description: Profit or loss for the account during the current trading day.
        realized_pnl:
          type: string
          format: decimal
          pattern: ^-?\d{0,26}(?:\.\d{0,2})?$
          readOnly: true
          nullable: true
          description: Realized profit or loss for the account.
        unrealized_pnl:
          type: string
          format: decimal
          pattern: ^-?\d{0,26}(?:\.\d{0,2})?$
          readOnly: true
          nullable: true
          description: Unrealized profit or loss from currently open exposure.
        total_pnl:
          type: string
          format: decimal
          pattern: ^-?\d{0,26}(?:\.\d{0,2})?$
          readOnly: true
          nullable: true
          description: Realized lifetime profit or loss for the account.
        realized_lifetime_pnl:
          type: string
          format: decimal
          pattern: ^-?\d{0,26}(?:\.\d{0,2})?$
          readOnly: true
          nullable: true
          description: Realized lifetime profit or loss for the account.
        total_commission:
          type: string
          format: decimal
          pattern: ^-?\d{0,26}(?:\.\d{0,2})?$
          readOnly: true
          nullable: true
          description: Total commission charged to the account.
        closed_pnl_today:
          type: string
          format: decimal
          pattern: ^-?\d{0,26}(?:\.\d{0,2})?$
          nullable: true
        profit_loss:
          type: number
          format: double
          readOnly: true
        peak_balance:
          type: string
          format: decimal
          pattern: ^-?\d{0,24}(?:\.\d{0,4})?$
          readOnly: true
          nullable: true
          description: >-
            Peak realized account balance for the relevant risk window,
            excluding open-position profit or loss.
        peak_equity:
          type: string
          format: decimal
          pattern: ^-?\d{0,24}(?:\.\d{0,4})?$
          readOnly: true
          nullable: true
          description: >-
            Peak account equity for the relevant risk window, including
            open-position profit or loss.
        peak_equity_timestamp:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: Timestamp when the peak account equity was recorded.
        balance_high:
          type: string
          format: decimal
          pattern: ^-?\d{0,24}(?:\.\d{0,4})?$
          nullable: true
        balance_low:
          type: string
          format: decimal
          pattern: ^-?\d{0,24}(?:\.\d{0,4})?$
          nullable: true
        equity_high:
          type: string
          format: decimal
          pattern: ^-?\d{0,24}(?:\.\d{0,4})?$
          nullable: true
        equity_low:
          type: string
          format: decimal
          pattern: ^-?\d{0,24}(?:\.\d{0,4})?$
          nullable: true
        low_equity_timestamp:
          type: string
          format: date-time
          readOnly: true
          nullable: true
          description: Timestamp when the lowest account equity was recorded.
        eod_peak_balance:
          type: string
          format: decimal
          pattern: ^-?\d{0,24}(?:\.\d{0,4})?$
          nullable: true
        min_balance:
          type: string
          format: decimal
          pattern: ^-?\d{0,24}(?:\.\d{0,4})?$
          nullable: true
          description: Lowest observed account balance for the relevant risk window.
        min_balance_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        failure_threshold:
          type: string
          format: decimal
          pattern: ^-?\d{0,24}(?:\.\d{0,4})?$
          readOnly: true
          nullable: true
          description: Failure threshold supplied with failure context, when available.
        mae:
          type: string
          format: decimal
          pattern: ^-?\d{0,26}(?:\.\d{0,2})?$
          nullable: true
        mae_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        mfe:
          type: string
          format: decimal
          pattern: ^-?\d{0,26}(?:\.\d{0,2})?$
          nullable: true
        mfe_at:
          type: string
          format: date-time
          readOnly: true
          nullable: true
        failure_metadata:
          readOnly: true
          nullable: true
          description: >-
            Structured breach or failure context for the account, when
            available.
        trading_days:
          type: integer
          readOnly: true
        long_positions_count:
          type: integer
          readOnly: true
          default: 0
          description: >-
            Number of closed long positions for the account. All-time by
            default; scoped by `position_counts_closed_at_after` /
            `position_counts_closed_at_before` when provided.
        short_positions_count:
          type: integer
          readOnly: true
          default: 0
          description: >-
            Number of closed short positions for the account. All-time by
            default; scoped by `position_counts_closed_at_after` /
            `position_counts_closed_at_before` when provided.
        profit_split:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,2})?$
          nullable: true
          description: Percentage value (0 to 1)
        next_withdrawal_date:
          type: string
          format: date-time
          nullable: true
        user:
          allOf:
            - $ref: '#/components/schemas/UserShallow'
          readOnly: true
        phase:
          allOf:
            - $ref: '#/components/schemas/PhaseShallow'
          readOnly: true
        closed_positions:
          type: array
          items:
            $ref: '#/components/schemas/ClosedPositionShallow'
          readOnly: true
      required:
        - account_id
        - balance
        - closed_positions
        - created_at
        - daily_pnl
        - disabled_at
        - equity
        - failure_metadata
        - failure_threshold
        - initial_balance
        - long_positions_count
        - low_equity_timestamp
        - mae_at
        - mfe_at
        - min_balance_at
        - modified_at
        - peak_balance
        - peak_equity
        - peak_equity_timestamp
        - phase
        - profit_loss
        - realized_lifetime_pnl
        - realized_pnl
        - short_positions_count
        - total_commission
        - total_pnl
        - trading_days
        - unrealized_pnl
        - user
        - user_id
    Status293Enum:
      enum:
        - PENDING_ACTIVATION
        - ACTIVE
        - PASSED
        - FAILED
        - BLOCKED
        - DELETED
        - LIVE_VERIFICATION
        - KYC_VERIFICATION_REQD
        - PHASE_VERIFICATION_REQD
        - PAUSED
        - SUBSCRIPTION_EXPIRED
        - PAYMENT_REQUESTED
      type: string
      description: |-
        * `PENDING_ACTIVATION` - Pending Activation
        * `ACTIVE` - Active
        * `PASSED` - Passed
        * `FAILED` - Failed
        * `BLOCKED` - Blocked
        * `DELETED` - Deleted
        * `LIVE_VERIFICATION` - Live Account Verification Required
        * `KYC_VERIFICATION_REQD` - KYC Verification Required
        * `PHASE_VERIFICATION_REQD` - Phase Verification Required
        * `PAUSED` - PAUSED
        * `SUBSCRIPTION_EXPIRED` - Subscription Expired
        * `PAYMENT_REQUESTED` - Payment Requested
    StatusReasonEnum:
      enum:
        - DAILY_DRAWDOWN_EXCEEDED
        - MAX_DRAWDOWN_EXCEEDED
        - FLOATING_PNL_EXCEEDED
        - PROFIT_TARGET_REACHED
        - ACCOUNT_EXPIRED
        - TRADING_STRATEGY_NOT_SUITABLE
        - COPY_TRADING_DETECTED
        - RULE_BREACHED
        - WITHDRAWAL_REQUESTED
        - CHALLENGE_RESET
        - SUBSCRIPTION_EXPIRED
      type: string
      description: >-
        * `DAILY_DRAWDOWN_EXCEEDED` - Daily drawdown limit exceeded

        * `MAX_DRAWDOWN_EXCEEDED` - Maximum drawdown limit exceeded

        * `FLOATING_PNL_EXCEEDED` - Floating PNL limit exceeded

        * `PROFIT_TARGET_REACHED` - Profit target completed

        * `ACCOUNT_EXPIRED` - Account expired

        * `TRADING_STRATEGY_NOT_SUITABLE` - Trading strategy does not suit our
        Organization

        * `COPY_TRADING_DETECTED` - Copy trading detected

        * `RULE_BREACHED` - Rule Breached

        * `WITHDRAWAL_REQUESTED` - Withdrawal Requested

        * `CHALLENGE_RESET` - Challenge Reset

        * `SUBSCRIPTION_EXPIRED` - Subscription Expired
    BlankEnum:
      enum:
        - ''
    NullEnum:
      enum:
        - null
    UserShallow:
      type: object
      description: User shape for nested expansion on reporting endpoints.
      properties:
        id:
          type: integer
          readOnly: true
        email:
          type: string
          format: email
          maxLength: 200
        full_name:
          type: string
          maxLength: 100
        is_active:
          type: boolean
          default: true
        created_at:
          type: string
          format: date-time
          readOnly: true
      required:
        - created_at
        - email
        - full_name
        - id
    PhaseShallow:
      type: object
      description: |-
        Phase shape for nested expansion on reporting endpoints.

        Surfaces the rule values that define the challenge phase the account is
        on (target profit, drawdown limits, trading-day requirements, leverage).
      properties:
        id:
          type: integer
          readOnly: true
        title:
          type: string
          maxLength: 100
        step:
          type: integer
          maximum: 5
          minimum: 0
        target_profit:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,5})?$
          nullable: true
        daily_drawdown:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,4})?$
          nullable: true
        maximum_drawdown:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,4})?$
          nullable: true
        trading_period_days:
          type: integer
          maximum: 2147483647
          minimum: 0
          nullable: true
          default: 0
          title: Total Trading Days
          description: Number of days before the account expires
        minimum_trading_days:
          type: integer
          maximum: 2147483647
          minimum: -2147483648
          nullable: true
        consistency_percentage:
          type: string
          format: decimal
          pattern: ^-?\d{0,1}(?:\.\d{0,4})?$
          nullable: true
        leverage:
          type: string
          format: decimal
          pattern: ^-?\d{0,3}(?:\.\d{0,2})?$
          nullable: true
      required:
        - id
        - step
        - title
    ClosedPositionShallow:
      type: object
      description: |-
        Closed-position shape for nested expansion on reporting endpoints.

        Intentionally exposes no relation fields. ``direction`` and ``state``
        are returned as their string labels (``Long``/``Short``, ``Closed``)
        rather than internal numeric codes so reporting clients don't need a
        lookup table.
      properties:
        id:
          type: integer
          readOnly: true
        uid:
          type: string
          maxLength: 255
        symbol:
          type: string
          maxLength: 50
        direction:
          type: string
          readOnly: true
        state:
          type: string
          readOnly: true
        volume:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,4})?$
        open_time:
          type: string
          format: date-time
        open_price:
          type: string
          format: decimal
          pattern: ^-?\d{0,16}(?:\.\d{0,4})?$
        close_time:
          type: string
          format: date-time
          nullable: true
        close_price:
          type: string
          format: decimal
          pattern: ^-?\d{0,16}(?:\.\d{0,4})?$
          nullable: true
        tp:
          type: string
          format: decimal
          pattern: ^-?\d{0,16}(?:\.\d{0,4})?$
          nullable: true
        sl:
          type: string
          format: decimal
          pattern: ^-?\d{0,16}(?:\.\d{0,4})?$
          nullable: true
        profit:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,2})?$
          nullable: true
        net_pnl:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,2})?$
          nullable: true
        commission:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,2})?$
          nullable: true
        swap:
          type: string
          format: decimal
          pattern: ^-?\d{0,8}(?:\.\d{0,2})?$
          nullable: true
        mae:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,2})?$
          nullable: true
        mfe:
          type: string
          format: decimal
          pattern: ^-?\d{0,12}(?:\.\d{0,2})?$
          nullable: true
      required:
        - direction
        - id
        - open_price
        - open_time
        - state
        - symbol
        - uid
        - volume
  securitySchemes:
    tokenAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Token-based authentication with required prefix "Token"

````

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