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

# Zap-In — Generate transaction to add liquidity to a pool

> Generate serialized zap-in transactions to add liquidity to a pool. Supports both DLMM and DAMM V2 pools (auto-detected by pool address). In zap-in mode, provide SOL and the API auto-swaps to the correct token ratio. Returns serialized transactions ready to be signed and landed.



## OpenAPI

````yaml /api-reference/openapi.json post /pools/{poolId}/add-tx
openapi: 3.0.0
info:
  title: LP Agent Open API
  version: 1.0.0
  description: |+
    Public API for LP Agent

    **Authentication**

    All endpoints require an API key passed via the `x-api-key` header.

servers:
  - url: https://api.lpagent.io/open-api/v1
    description: Production
security:
  - apiKeyAuth: []
tags: []
paths:
  /pools/{poolId}/add-tx:
    post:
      tags:
        - Pools
      summary: Zap-In — Generate transaction to add liquidity to a pool
      description: >-
        Generate serialized zap-in transactions to add liquidity to a pool.
        Supports both DLMM and DAMM V2 pools (auto-detected by pool address). In
        zap-in mode, provide SOL and the API auto-swaps to the correct token
        ratio. Returns serialized transactions ready to be signed and landed.
      parameters:
        - in: path
          name: poolId
          required: true
          schema:
            type: string
          description: The pool address
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - stratergy
                - owner
              properties:
                stratergy:
                  type: string
                  enum:
                    - Spot
                    - Curve
                    - BidAsk
                  description: The distribution strategy to use
                inputSOL:
                  type: number
                  description: Amount of SOL to input
                percentX:
                  type: number
                  minimum: 0
                  maximum: 1
                  description: Percentage of capital to allocate to token X (0-1)
                fromBinId:
                  type: integer
                  description: Starting bin ID for liquidity distribution
                toBinId:
                  type: integer
                  description: Ending bin ID for liquidity distribution
                amountX:
                  type: number
                  description: Specific amount of token X (alternative to percentX)
                amountY:
                  type: number
                  description: Specific amount of token Y (required with amountX)
                owner:
                  type: string
                  description: Owner wallet address
                slippage_bps:
                  type: integer
                  minimum: 0
                  maximum: 10000
                  default: 500
                  description: Slippage tolerance in basis points (e.g., 500 = 5%)
                provider:
                  type: string
                  enum:
                    - OKX
                    - JUPITER_ULTRA
                  default: JUPITER_ULTRA
                  description: Swap provider to use for token swaps
                mode:
                  type: string
                  enum:
                    - normal
                    - zap-in
                  default: zap-in
                  description: Add liquidity mode
      responses:
        '200':
          description: Successfully generated zap-in transactions
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    example: success
                  data:
                    type: object
                    properties:
                      lastValidBlockHeight:
                        type: number
                      swapTxsWithJito:
                        type: array
                        items:
                          type: string
                      addLiquidityTxsWithJito:
                        type: array
                        items:
                          type: string
                      meta:
                        type: object
        '400':
          description: Invalid parameters provided
        '500':
          description: Internal server error
components:
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: API key for authentication

````