> ## 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.

# Create Pro Pool

> Create a new pro liquidity pool using an existing SPL token.

### Fee configuration

All fees default to **0%** except protocol fee (**0.3%**, set by protocol config). All fee fields are optional.

| Field | Fee type | Default |
|---|---|---|
| `creator_trading_fee` | Claimable by pool creator | 0% |
| `reflection_trading_fee` | Distributed to token holders | 0% |
| `liquidity_provider_trading_fee` | Distributed to LP providers | 0% |
| `creator_slot_trading_fee` | Slot-based sniper resistance | Disabled |

Each fee type accepts an array of `FeeBracketInput` with `market_cap_upper_bound`, `buy_fee_bps`, and `sell_fee_bps`. 1 bps = 0.01%, so 100 bps = 1%.

### Feature toggles

All optional, wrapped in a `features` object:

| Toggle | Default | Description |
|---|---|---|
| `enable_swap` | `true` | Allow buying and selling |
| `enable_deposit_liquidity` | `true` | Allow depositing liquidity |
| `enable_withdraw_liquidity` | `true` | Allow withdrawing liquidity |
| `enable_update_creator_trading_fee` | `true` | Allow fee bracket updates |
| `enable_same_slot_trading` | `false` | Allow buy+sell in same slot |
| `enable_sandwich_resistant_mode` | `false` | MEV sandwich protection |



## OpenAPI

````yaml /openapi.json post /tx/pro/create
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/create:
    post:
      tags:
        - Pro Pool API
      summary: Create Pro Pool
      description: >-
        Create a new pro liquidity pool using an existing SPL token.


        ### Fee configuration


        All fees default to **0%** except protocol fee (**0.3%**, set by
        protocol config). All fee fields are optional.


        | Field | Fee type | Default |

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

        | `creator_trading_fee` | Claimable by pool creator | 0% |

        | `reflection_trading_fee` | Distributed to token holders | 0% |

        | `liquidity_provider_trading_fee` | Distributed to LP providers | 0% |

        | `creator_slot_trading_fee` | Slot-based sniper resistance | Disabled |


        Each fee type accepts an array of `FeeBracketInput` with
        `market_cap_upper_bound`, `buy_fee_bps`, and `sell_fee_bps`. 1 bps =
        0.01%, so 100 bps = 1%.


        ### Feature toggles


        All optional, wrapped in a `features` object:


        | Toggle | Default | Description |

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

        | `enable_swap` | `true` | Allow buying and selling |

        | `enable_deposit_liquidity` | `true` | Allow depositing liquidity |

        | `enable_withdraw_liquidity` | `true` | Allow withdrawing liquidity |

        | `enable_update_creator_trading_fee` | `true` | Allow fee bracket
        updates |

        | `enable_same_slot_trading` | `false` | Allow buy+sell in same slot |

        | `enable_sandwich_resistant_mode` | `false` | MEV sandwich protection |
      operationId: create_pro_liquidity_pool_tx
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateProLiquidityPoolTxRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CreateProLiquidityPoolTxResponse'
components:
  schemas:
    CreateProLiquidityPoolTxRequest:
      type: object
      required:
        - payer
        - creator
        - encoded_user_defined_event_data
        - config_version
        - program_id
        - mint
        - initial_token_a_amount
        - initial_token_b_amount
        - lut_address
      properties:
        payer:
          type: string
          description: Public key of the wallet that will sign and pay for the transaction.
        creator:
          type: string
          description: >-
            Public key of the pool creator. This wallet will have creator
            privileges (toggle features, set fees, claim creator fees).
        encoded_user_defined_event_data:
          type: string
          description: >-
            Arbitrary string data emitted as an on-chain event. Useful for
            tracking or attributing transactions.
        config_version:
          type: integer
          format: int32
          minimum: 0
          description: >-
            Protocol config version. Use 1 for community tokens, 2 for creator
            tokens, 3 for pro pools.
        program_id:
          type: string
          description: >-
            Program ID of the Heaven DEX program. Use
            `HEAVENoP2qxoeuF8Dj2oT1GHEnu49U5mJYkdeC8BAX2o` for mainnet.
        mint:
          type: string
          description: Mint address of the SPL token (token A) in the pool.
        initial_token_a_amount:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Amount of token A (in native/smallest units) to deposit as initial
            liquidity. Must be large enough to satisfy the minimum liquidity
            requirement.
        initial_token_b_amount:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Amount of SOL (in lamports) to deposit as initial liquidity.
            Together with token A, this sets the initial price.
        compute_unit_limit:
          type: integer
          format: int32
          minimum: 0
          nullable: true
          description: >-
            Maximum compute units for the transaction. Higher values allow more
            complex operations but cost more. Defaults to a sensible value if
            omitted.
        compute_unit_price:
          type: integer
          format: int64
          minimum: 0
          nullable: true
          description: >-
            Priority fee in micro-lamports per compute unit. Higher values
            increase transaction priority. Defaults to a sensible value if
            omitted.
        lut_address:
          type: string
          description: >-
            Address of an on-chain Address Lookup Table (ALT) to compress the
            transaction size.
        features:
          $ref: '#/components/schemas/PoolFeatureToggles'
          nullable: true
          description: >-
            Optional feature toggles for the pool. Controls whether swapping,
            deposits, withdrawals, and other features are enabled at creation
            time. All default to sensible values if omitted.
        creator_trading_fee:
          type: array
          items:
            $ref: '#/components/schemas/FeeBracketInput'
          nullable: true
          description: >-
            Creator trading fee brackets. Up to 4 brackets with market cap
            thresholds. Uses protocol config defaults if omitted.
        creator_slot_trading_fee:
          $ref: '#/components/schemas/SlotFeeInput'
          nullable: true
          description: >-
            Optional slot-offset based creator fee for sniper resistance. When
            active, takes precedence over market cap based creator fees.
        reflection_trading_fee:
          type: array
          items:
            $ref: '#/components/schemas/FeeBracketInput'
          nullable: true
          description: >-
            Optional reflection trading fee brackets. Reflection fees are
            distributed to token holders. Uses protocol defaults if omitted.
        liquidity_provider_trading_fee:
          type: array
          items:
            $ref: '#/components/schemas/FeeBracketInput'
          nullable: true
          description: >-
            Optional LP provider trading fee brackets. LP fees are distributed
            to liquidity providers. Uses protocol defaults if omitted.
      description: >-
        Request to create a new pro liquidity pool. Unlike standard pools, pro
        pools use an existing SPL token and give creators full control over
        initial liquidity, fee structure, and pool features.
    CreateProLiquidityPoolTxResponse:
      type: object
      required:
        - tx
        - pool
      properties:
        tx:
          type: string
          description: >-
            Base64 encoded versioned transaction. Decode, sign with the payer
            (and creator if different), and submit to the Solana network.
        pool:
          type: string
          description: >-
            On-chain address of the newly created pool state account. Save this
            to interact with the pool later.
    PoolFeatureToggles:
      type: object
      properties:
        enable_swap:
          type: boolean
          nullable: true
          description: 'Allow users to buy and sell tokens in this pool. Default: true.'
        enable_deposit_liquidity:
          type: boolean
          nullable: true
          description: 'Allow users to deposit liquidity to this pool. Default: true.'
        enable_withdraw_liquidity:
          type: boolean
          nullable: true
          description: 'Allow users to withdraw liquidity from this pool. Default: true.'
        enable_update_creator_trading_fee:
          type: boolean
          nullable: true
          description: >-
            Allow the creator to update trading fee brackets after pool
            creation. Default: true.
        enable_same_slot_trading:
          type: boolean
          nullable: true
          description: >-
            Allow buying and selling in the same Solana slot (same transaction).
            Default: false.
        enable_sandwich_resistant_mode:
          type: boolean
          nullable: true
          description: >-
            Enable sandwich attack resistance. When enabled, trades are
            protected against MEV sandwich attacks. Default: false.
      description: >-
        Feature toggles for a pro pool. All fields are optional and default to
        sensible values.
    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
    SlotFeeInput:
      type: object
      description: >-
        Slot-offset based fee configuration for sniper resistance. Fees decay as
        more slots pass since pool creation. When active, slot fees take
        precedence over market cap fees.
      required:
        - brackets
        - max_slot_offset
        - max_fee_bps
        - enabled
      properties:
        brackets:
          type: array
          items:
            $ref: '#/components/schemas/SlotFeeBracketInput'
          description: >-
            Array of slot fee brackets (max 42). Each defines buy/sell fees at a
            slot offset range. Must be ordered by ascending
            slot_offset_upperbound.
        max_slot_offset:
          type: integer
          format: int32
          minimum: 0
          description: >-
            Maximum slot offset at which slot-based fees apply. After this many
            slots (~400ms each), fees revert to market cap based fees.
          example: 15
        max_fee_bps:
          type: integer
          format: int32
          minimum: 0
          description: Maximum fee in basis points across all slot brackets.
          example: 5000
        enabled:
          type: boolean
          description: Whether slot-based fees are active.
          example: true
      example:
        brackets:
          - buy_fee_bps: 5000
            sell_fee_bps: 5000
            slot_offset_upperbound: 5
          - buy_fee_bps: 1000
            sell_fee_bps: 1000
            slot_offset_upperbound: 15
        max_slot_offset: 15
        max_fee_bps: 5000
        enabled: true
    SlotFeeBracketInput:
      type: object
      description: >-
        A single fee bracket for slot-offset based fees. Higher fees at lower
        slot offsets can be used for sniper resistance. Slots are ~400ms on
        Solana, so 5 slots ≈ 2 seconds.
      required:
        - buy_fee_bps
        - sell_fee_bps
        - slot_offset_upperbound
      properties:
        buy_fee_bps:
          type: integer
          format: int32
          minimum: 0
          description: >-
            Fee charged on buy transactions in basis points for this slot offset
            range.
          example: 5000
        sell_fee_bps:
          type: integer
          format: int32
          minimum: 0
          description: >-
            Fee charged on sell transactions in basis points for this slot
            offset range.
          example: 5000
        slot_offset_upperbound:
          type: integer
          format: int32
          minimum: 0
          description: >-
            Upper bound of this bracket in slots since pool creation. Slots are
            ~400ms on Solana.
          example: 5
      example:
        buy_fee_bps: 5000
        sell_fee_bps: 5000
        slot_offset_upperbound: 5

````