> ## 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 a referrer's sub-affiliates

> Direct referrals who went on to refer others, with their downline size and that
downline's window volume. Carries no override amounts: the accrual ledger they would
come from does not exist yet.



## OpenAPI

````yaml /api-reference/openapi.json get /api/v1/referrals/sub-affiliates
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/referrals/sub-affiliates:
    get:
      tags:
        - Referrals
      summary: Get a referrer's sub-affiliates
      description: >-
        Direct referrals who went on to refer others, with their downline size
        and that

        downline's window volume. Carries no override amounts: the accrual
        ledger they would

        come from does not exist yet.
      operationId: handle_sub_affiliates
      parameters:
        - name: referrer_account
          in: query
          description: The referrer's wallet address (not a subaccount address)
          required: true
          schema:
            type: string
        - name: days
          in: query
          description: >-
            Trailing UTC days the network-volume column covers. Defaults to 30,
            clamped to 90.
          required: false
          schema:
            type: integer
            format: int64
            minimum: 0
        - name: limit
          in: query
          description: Sub-affiliates per page. Defaults to 25, clamped to 200.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
        - name: offset
          in: query
          description: Sub-affiliates to skip. Clamped to 10000.
          required: false
          schema:
            type: integer
            format: int32
            minimum: 0
      responses:
        '200':
          description: Sub-affiliate totals and a page of rows
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubAffiliatesResponse'
        '400':
          description: Invalid address
        '500':
          description: Database error
components:
  schemas:
    SubAffiliatesResponse:
      type: object
      required:
        - referrer_account
        - summary
        - sub_affiliates
        - total_count
      properties:
        referrer_account:
          type: string
        sub_affiliates:
          type: array
          items:
            $ref: '#/components/schemas/SubAffiliate'
        summary:
          $ref: '#/components/schemas/SubAffiliatesSummary'
        total_count:
          type: integer
          format: int64
          description: Sub-affiliates in total, for pagination
          minimum: 0
    SubAffiliate:
      type: object
      description: One direct referral who went on to refer others.
      required:
        - sub_affiliate
        - joined_unix_ms
        - l2_clients
        - network_volume_usd
        - override_usd
      properties:
        joined_unix_ms:
          type: integer
          format: int64
          description: When this sub-affiliate redeemed the referrer's code
        l2_clients:
          type: integer
          format: int64
          description: Distinct clients this sub-affiliate has referred
          minimum: 0
        network_volume_usd:
          type: number
          format: double
          description: Both-sides notional those clients traded inside the window
        override_usd:
          type: number
          format: double
          description: >-
            The L2 override this sub-affiliate's downline generated, at each
            day's own rate and

            penalty. Zero when the accrual ledger has no rows — the state before
            it runs, not a

            claim that the downline earned nothing.
        sub_affiliate:
          type: string
          description: Full owner address, matching `/affiliates/earnings`
    SubAffiliatesSummary:
      type: object
      description: Totals across every sub-affiliate, independent of the page.
      required:
        - sub_affiliates
        - l2_clients
        - network_volume_usd
        - override_usd
      properties:
        l2_clients:
          type: integer
          format: int64
          minimum: 0
        network_volume_usd:
          type: number
          format: double
        override_usd:
          type: number
          format: double
          description: >-
            The L2 override this sub-affiliate's downline generated, at each
            day's own rate and

            penalty. Zero when the accrual ledger has no rows — the state before
            it runs, not a

            claim that the downline earned nothing.
        sub_affiliates:
          type: integer
          format: int64
          minimum: 0
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        Bearer token from Geomi. See
        [Authentication](/api-reference/rest/authentication) for setup
        instructions.

````