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

# Get referral program performance

> Returns broker-program referral performance for a referral code, identified either by the code itself or by the referrer's wallet, over a requested time window (start_ms to end_ms, capped at 28 days). The response includes total notional volume, referred fees, fee rewards, builder fees collected, the applicable fee-share percentage, and a per-role/currency/instrument-type breakdown, all as decimal strings.



## OpenAPI

````yaml /openapi.json post /public/get_referral_performance
openapi: 3.1.0
info:
  title: Derive v3 API
  version: 0.2.0
  description: JSON-RPC 2.0 methods, served over WebSocket and HTTP POST.
servers:
  - url: https://api.derive.xyz/v3
    description: Production (HTTP POST base)
  - url: https://testnet.api.derive.xyz/v3
    description: Testnet (HTTP POST base)
security: []
tags:
  - name: Subaccounts
    description: >-
      List, inspect, and label subaccounts, portfolios, positions, and
      collateral.
  - name: Session Keys
    description: Register, edit, and list delegated signing keys.
  - name: Account
    description: Wallet-level account information and settings.
  - name: Orderbook
    description: Place, replace, cancel, and query orders, trigger orders, and algos.
  - name: RFQ
    description: 'Request-for-quote: send RFQs, quote, and execute block trades.'
  - name: Vault Shareholders
    description: >-
      Deposit into and withdraw from vaults, and track shares, requests, and
      performance.
  - name: Vault Curators
    description: >-
      Create and operate curated vaults: settle deposit and withdrawal requests,
      and manage vault metadata.
  - name: History
    description: >-
      Per-account historical records: orders, trades, transfers, and
      settlements.
  - name: Market Maker Protection
    description: Configure, read, and reset market-maker protection.
  - name: Transfers & Withdrawals
    description: Move collateral between subaccounts, to other wallets, and on-chain.
  - name: System
    description: Rate limits and transaction lookups.
  - name: Market Data
    description: Instruments, currencies, tickers, and market-wide feeds.
  - name: Referrals
    description: Referral codes and program performance.
  - name: Other
    description: Uncategorized.
paths:
  /public/get_referral_performance:
    post:
      tags:
        - Referrals
      summary: Get referral program performance
      description: >-
        Returns broker-program referral performance for a referral code,
        identified either by the code itself or by the referrer's wallet, over a
        requested time window (start_ms to end_ms, capped at 28 days). The
        response includes total notional volume, referred fees, fee rewards,
        builder fees collected, the applicable fee-share percentage, and a
        per-role/currency/instrument-type breakdown, all as decimal strings.
      operationId: public_get_referral_performance
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GetReferralPerformanceParams'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/GetReferralPerformanceResult'
        default:
          description: JSON-RPC error (see Error Codes)
components:
  schemas:
    GetReferralPerformanceParams:
      type: object
      required:
        - end_ms
        - start_ms
      properties:
        end_ms:
          description: End timestamp in UTC milliseconds.
          type: integer
          format: int64
        referral_code:
          description: (Optional) referral code.
          default: null
          type:
            - string
            - 'null'
        start_ms:
          description: Start timestamp in UTC milliseconds.
          type: integer
          format: int64
        wallet:
          description: (Optional) wallet of the referrer.
          default: null
          type:
            - string
            - 'null'
    GetReferralPerformanceResult:
      type: object
      required:
        - fee_share_percentage
        - referral_code
        - rewards
        - stdrv_balance
        - total_builder_fee_collected
        - total_fee_rewards
        - total_notional_volume
        - total_referred_fees
      properties:
        fee_share_percentage:
          type: string
        referral_code:
          type: string
        rewards:
          description: Performance by liquidity role / currency / instrument type.
          type: object
          additionalProperties:
            type: object
            additionalProperties:
              type: object
              additionalProperties:
                $ref: '#/components/schemas/ReferralPerformanceByInstrumentType'
        stdrv_balance:
          type: string
        total_builder_fee_collected:
          type: string
        total_fee_rewards:
          type: string
        total_notional_volume:
          type: string
        total_referred_fees:
          type: string
    ReferralPerformanceByInstrumentType:
      description: Referral performance for one `(role, currency, instrument_type)` bucket.
      type: object
      required:
        - builder_fee
        - fee_reward
        - notional_volume
        - referred_fee
        - unique_traders_referred
      properties:
        builder_fee:
          type: string
        fee_reward:
          type: string
        notional_volume:
          type: string
        referred_fee:
          type: string
        unique_traders_referred:
          type: integer
          format: uint64
          minimum: 0

````

## Related topics

- [List all referral codes](/api-reference/referrals/list-all-referral-codes.md)
- [Get a vault's sampled performance series](/api-reference/vault-shareholders/get-a-vaults-sampled-performance-series.md)
- [Programmatic Onboarding](/getting-started/depositing.md)
