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

# Deposit Liquidity

> Deposit liquidity to a pro pool.

Deposits token A and SOL proportional to the current pool ratio. You receive LP tokens representing your share of the pool. If this is your first time adding liquidity, a new LP position PDA is created for your wallet.

**Parameters:** Specify `max_token_a` and `max_token_b` as upper bounds — the actual deposited amounts will match the pool's current ratio. Set `min_lp_tokens` to protect against slippage (use 0 to accept any amount).



## OpenAPI

````yaml /openapi.json post /tx/pro/add-liquidity
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/add-liquidity:
    post:
      tags:
        - Pro Pool API
      summary: Deposit Liquidity
      description: >-
        Deposit liquidity to a pro pool.


        Deposits token A and SOL proportional to the current pool ratio. You
        receive LP tokens representing your share of the pool. If this is your
        first time adding liquidity, a new LP position PDA is created for your
        wallet.


        **Parameters:** Specify `max_token_a` and `max_token_b` as upper bounds
        — the actual deposited amounts will match the pool's current ratio. Set
        `min_lp_tokens` to protect against slippage (use 0 to accept any
        amount).
      operationId: create_add_liquidity_pro_pool_tx
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/AddLiquidityProPoolTxRequest'
        required: true
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AddLiquidityProPoolTxResponse'
components:
  schemas:
    AddLiquidityProPoolTxRequest:
      type: object
      required:
        - payer
        - mint
        - config_version
        - program_id
        - max_token_a
        - max_token_b
        - min_lp_tokens
        - pool
      properties:
        payer:
          type: string
          description: Public key of the wallet that will sign and pay for the transaction.
        mint:
          type: string
          description: Mint address of the SPL token (token A) in the pool.
        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.
        max_token_a:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Maximum amount of token A (native units) to deposit. The actual
            amount may be less to maintain the pool ratio.
        max_token_b:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Maximum amount of SOL (lamports) to deposit. The actual amount may
            be less to maintain the pool ratio.
        min_lp_tokens:
          type: integer
          format: int64
          minimum: 0
          description: >-
            Minimum LP tokens to receive. Set to 0 to accept any amount. Higher
            values protect against slippage.
        pool:
          type: string
          description: >-
            On-chain address of the pro pool state account. Returned in the
            response when creating a pool.
        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.
      description: >-
        Deposit liquidity to a pro pool. The amounts deposited will be
        proportional to the current pool reserves. You receive LP tokens
        representing your share of the pool.
    AddLiquidityProPoolTxResponse:
      type: object
      required:
        - tx
      properties:
        tx:
          type: string
          description: Base64 encoded versioned transaction. Decode, sign, and submit.

````