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

# Set Reflection Fee

> Set market cap based reflection fee brackets on a pro pool. Reflection fees are automatically distributed to token holders on each trade. Only the pool creator can call this.

**Example** — flat 0.25% reflection fee:

| `market_cap_upper_bound` | `buy_fee_bps` | `sell_fee_bps` | Effective rate |
|---|---|---|---|
| `9223372036854775807` | `25` | `25` | 0.25% at all market caps |



## OpenAPI

````yaml /openapi.json post /tx/pro/set-reflection-fee
openapi: 3.1.0
info:
  title: heaven-tx-api
  description: ''
  license:
    name: ''
  version: 0.1.14
servers:
  - url: https://tx.api.heaven.xyz
security: []
tags:
  - name: heaven-api
    description: Heaven API
paths:
  /tx/pro/set-reflection-fee:
    post:
      tags:
        - Pro Pool API
      summary: Set Reflection Fee
      description: >-
        Set market cap based reflection fee brackets on a pro pool. Reflection
        fees are automatically distributed to token holders on each trade. Only
        the pool creator can call this.


        **Example** — flat 0.25% reflection fee:


        | `market_cap_upper_bound` | `buy_fee_bps` | `sell_fee_bps` | Effective
        rate |

        |---|---|---|---|

        | `9223372036854775807` | `25` | `25` | 0.25% at all market caps |
      operationId: create_pro_set_reflection_fee_tx
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ProSetReflectionFeeTxRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProSetReflectionFeeTxResponse'
components:
  schemas:
    ProSetReflectionFeeTxRequest:
      type: object
      required:
        - pool
        - payer
        - program_id
        - brackets
      properties:
        pool:
          type: string
          description: On-chain address of the pro pool state account.
        payer:
          type: string
          description: Public key of the pool creator wallet.
        program_id:
          type: string
          description: Program ID of the Heaven DEX program.
        brackets:
          type: array
          items:
            $ref: '#/components/schemas/FeeBracketInput'
          description: >-
            Fee brackets (max 4). Each defines buy/sell basis points below a
            market cap threshold.
        compute_unit_limit:
          type: integer
          format: int32
          minimum: 0
          nullable: true
          description: Maximum compute units for the transaction.
        compute_unit_price:
          type: integer
          format: int64
          minimum: 0
          nullable: true
          description: Priority fee in micro-lamports per compute unit.
      description: Request to set reflection trading fee brackets on a pro pool.
    ProSetReflectionFeeTxResponse:
      type: object
      required:
        - tx
      properties:
        tx:
          type: string
          description: >-
            Base64 encoded versioned transaction. Decode, sign with the creator
            wallet, and submit.
    FeeBracketInput:
      type: object
      description: >-
        A single fee bracket for market cap based fees. Fees apply when the pool
        market cap is below the upper bound. Brackets are evaluated from lowest
        to highest market_cap_upper_bound.
      required:
        - market_cap_upper_bound
        - buy_fee_bps
        - sell_fee_bps
      properties:
        market_cap_upper_bound:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Upper bound of this bracket in USD (as integer). Use max int64
            (9223372036854775807) for the final bracket to cover all market caps
            above the previous bracket.
          example: 100000000000
        buy_fee_bps:
          type: integer
          format: int32
          minimum: 0
          description: >-
            Fee charged on buy transactions in basis points (1 bps = 0.01%). For
            example, 100 = 1%.
          example: 100
        sell_fee_bps:
          type: integer
          format: int32
          minimum: 0
          description: >-
            Fee charged on sell transactions in basis points (1 bps = 0.01%).
            For example, 100 = 1%.
          example: 100
      example:
        market_cap_upper_bound: 100000000000
        buy_fee_bps: 100
        sell_fee_bps: 100

````