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

# Get account's protected (FFT) trials

> Returns the account's active protected trials plus a paginated terminal
history (organic closes and admin resets). `limit`/`offset` apply to
`history` only. An optional `campaign_addr` scopes the whole response.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/protected_trials
openapi: 3.1.0
info:
  title: Decibel Trading API
  description: >-
    RESTful API for Decibel. Provides read-only endpoints for market data,
    trading operations, positions, and analytics.
  contact:
    name: Decibel Team
    url: https://decibel.trade/
  license:
    name: ''
  version: 1.0.0
servers:
  - url: https://api.mainnet.aptoslabs.com/decibel
    description: Mainnet
  - url: https://api.testnet.aptoslabs.com/decibel
    description: Testnet
security:
  - bearerAuth: []
tags:
  - name: Market Data
    description: Market information and real-time data endpoints
  - name: User
    description: User information and account management
  - name: Account
    description: Account-specific endpoints and data
  - name: Trades
    description: Trading operations and history
  - name: Positions
    description: User position management
  - name: Orders
    description: Order management and history
  - name: TWAP
    description: Time-weighted average price orders
  - name: Bulk Orders
    description: Bulk order management
  - name: Vaults
    description: Vault operations and management
  - name: Analytics
    description: Analytics and performance metrics
  - name: Points
    description: Points-related account metrics
  - name: Trading Points
    description: Trading points endpoints
  - name: Trading Hz
    description: Trading Hz endpoints
  - name: Tier
    description: Tier information endpoints
  - name: Streaks
    description: User streak tracking endpoints
  - name: Predeposit Rewards
    description: Season 0 predeposit USDC rewards
  - name: Referrals
    description: Referral code management and tracking
  - name: Affiliates
    description: Affiliate code and earnings endpoints
  - name: Campaigns
    description: On-chain reward campaign endpoints
paths:
  /api/v1/protected_trials:
    get:
      tags:
        - Campaigns
      summary: Get account's protected (FFT) trials
      description: |-
        Returns the account's active protected trials plus a paginated terminal
        history (organic closes and admin resets). `limit`/`offset` apply to
        `history` only. An optional `campaign_addr` scopes the whole response.
      operationId: handle_protected_trials
      parameters:
        - name: account
          in: query
          description: User account address (`user` query alias is also accepted)
          required: true
          schema:
            type: string
        - name: campaign_addr
          in: query
          description: 'Optional campaign address filter (default: all campaigns)'
          required: false
          schema:
            type: string
        - name: limit
          in: query
          description: Page size — paginates `history` only
          required: false
          schema:
            type: integer
            format: int32
            default: 10
            maximum: 200
            minimum: 0
          example: 100
        - name: offset
          in: query
          description: Page offset — paginates `history` only
          required: false
          schema:
            type: integer
            format: int32
            default: 0
            maximum: 10000
            minimum: 0
          example: 0
      responses:
        '200':
          description: Protected trials retrieved successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProtectedTrialsResponse'
        '400':
          description: Invalid address
        '500':
          description: Database error
components:
  schemas:
    ProtectedTrialsResponse:
      type: object
      required:
        - account
        - active_trials
        - history
        - history_total_count
      properties:
        account:
          type: string
        active_trial:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TrialDto'
              description: >-
                Compat slot: the active trial in the requested campaign, or the
                most

                recent across campaigns.
        active_trials:
          type: array
          items:
            $ref: '#/components/schemas/TrialDto'
          description: All active trials across campaigns.
        history:
          type: array
          items:
            $ref: '#/components/schemas/TrialDto'
        history_total_count:
          type: integer
          format: int32
          description: >-
            Total terminal history rows matching the filters across all pages;

            unknown-settle_reason rows are excluded from both the page and this
            count.
          minimum: 0
    TrialDto:
      type: object
      description: >-
        A protected trial. Presence rules: open-sourced fields are absent only
        on

        degraded WS reset rows (enrichment miss); `size` is always emitted, null
        on

        unknown market; mark_at_close appears on organic closes only; the
        remaining

        terminal fields appear on closed/reset rows only.
      required:
        - trial_id
        - user
        - campaign_addr
        - status
      properties:
        campaign_addr:
          type: string
        close_stalled:
          type:
            - boolean
            - 'null'
          description: >-
            Active trial parked in `Closing` with a residual position after a

            settle IOC couldn't fully close. `None` = not evaluated (history
            rows,

            WS path, old backend); `Some(true)` = stalled.
        closed_at_ms:
          type:
            - integer
            - 'null'
          format: int64
        closed_by:
          type:
            - string
            - 'null'
        expires_at_ms:
          type:
            - integer
            - 'null'
          format: int64
        leverage_at_open:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        mark_at_close:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        mark_at_close_usd:
          type:
            - number
            - 'null'
          format: double
        mark_at_open:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        mark_at_open_usd:
          type:
            - number
            - 'null'
          format: double
        market:
          type:
            - string
            - 'null'
        opened_at_ms:
          type:
            - integer
            - 'null'
          format: int64
        prior_status:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TrialPriorStatus'
        protected_amount:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        protected_amount_usd:
          type:
            - number
            - 'null'
          format: double
        settle_reason:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/SettleReason'
        side:
          oneOf:
            - type: 'null'
            - $ref: '#/components/schemas/TradeSide'
        size:
          type:
            - number
            - 'null'
          format: double
          description: >-
            Normalized size; null when the market is unknown. Always present
            (not skipped).
        status:
          $ref: '#/components/schemas/TrialStatus'
        trial_id:
          type: integer
          format: int64
          minimum: 0
        trial_subaccount:
          type:
            - string
            - 'null'
        user:
          type: string
        user_payout:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        user_payout_usd:
          type:
            - number
            - 'null'
          format: double
        vault_returned:
          type:
            - integer
            - 'null'
          format: int64
          minimum: 0
        vault_returned_usd:
          type:
            - number
            - 'null'
          format: double
    TrialPriorStatus:
      type: string
      description: |-
        Status a trial held before an admin reset. Resets are only allowed from
        Opening(0)/Open(1), both of which the wire collapses to `Active`.
      enum:
        - Active
    SettleReason:
      type: string
      description: >-
        Why a trial closed. Chain values 0-5 mirror `protected_trial.move`
        settle-reason

        constants; `AdminReset` is synthetic (reset rows only) and is never
        produced

        by [`SettleReason::parse_chain`]. `SweptAfterStall` (5) marks an organic

        stalled trial drained by the sweep tail with funds intact; `AdminForced`

        marks admin-origin residual settles.
      enum:
        - ExpiredClean
        - LiquidatedEmpty
        - PartialLoss
        - NeverFilled
        - AdminForced
        - SweptAfterStall
        - AdminReset
    TradeSide:
      type: string
      description: 'Trial direction. Maps from on-chain `side_is_buy: bool`.'
      enum:
        - Buy
        - Sell
    TrialStatus:
      type: string
      description: >-
        `Active` collapses on-chain Opening/Open/Closing; terminal states come
        from

        the closed/reset events.
      enum:
        - Active
        - Settled
        - SettledLiquidated
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````