Overview
Creates an unsigned transaction for depositing liquidity into a Meteora DAMM v2 (Dynamic AMM) pool. The API validates the deposit amounts, builds a combined transaction that transfers tokens from the manager wallet to the LP owner and adds liquidity to the pool, and returns the transaction ready for manager wallet signing.Request Parameters
Amount of Token A to deposit (in UI units, e.g., 1000 for 1000 USDC). Must be non-negative.
Amount of Token B to deposit (in UI units, e.g., 0.5 for 0.5 SOL). Must be non-negative.
UI units: Amounts are specified in human-readable units (e.g., 1.5 SOL, not 1500000000 lamports). The API automatically converts to raw token amounts based on token decimals.
Response
Indicates if the operation was successful
Base58 encoded unsigned transaction that needs to be signed by the manager wallet
Unique identifier for this deposit request (needed for confirmation)
Address of the Meteora DAMM v2 pool
Mint address of Token A in the pool
Mint address of Token B in the pool
Whether Token B is native SOL (handled specially in transfers)
Number of instructions in the transaction
Object containing deposit amounts (in raw token units):
tokenA(string): Token A amount in raw unitstokenB(string): Token B amount in raw unitsliquidityDelta(string): Liquidity amount to be added
Instructions for the next step in the process
Success Response
Error Responses
400 - Missing Parameters
400 - Missing Parameters
400 - Invalid Amount Type
400 - Invalid Amount Type
400 - Negative Amounts
400 - Negative Amounts
404 - No Positions Found
404 - No Positions Found
400 - Deposit Too Small
400 - Deposit Too Small
500 - Configuration Error
500 - Configuration Error
500 - Transaction Creation Failed
500 - Transaction Creation Failed
Process Flow
This endpoint performs several steps to build the deposit transaction:Validate Parameters
Ensures tokenAAmount and tokenBAmount are provided, are valid numbers, and are non-negative
Validate Server Configuration
Checks that the server is properly configured to process deposit requests
Convert to Raw Amounts
Converts UI amounts to raw token amounts based on token decimals (e.g., 1.5 SOL → 1500000000 lamports)
Calculate Liquidity Amount
Calculates the liquidity amount based on token amounts and current pool state
Build Transaction
Creates a transaction that:
- Transfers tokens from manager wallet
- Adds liquidity to the pool position
- Creates any needed token accounts
Handle Native SOL
If Token B is native SOL, uses SystemProgram.transfer instead of SPL token transfer
Liquidity Calculation
The liquidity amount is calculated based on:- Current pool price
- Pool price range
- Token amounts being deposited
- Token metadata (decimals, transfer fees, etc.)
First position only: This endpoint deposits to the first position in the pool. If multiple positions exist, deposits go to the first position.
Native SOL Handling
Special handling for wrapped SOL (wSOL):When Token B is the native SOL mint (So11111111111111111111111111111111111111112):
- The manager wallet transfers native SOL to the LP owner
- Meteora automatically wraps SOL during the add liquidity operation
- No intermediate token account is needed for Token B
- The deposit flow uses
SystemProgram.transferfor the initial transfer
Request ID
The response includes arequestId:
- Format: Random 16-byte hex string for identifying the request
- Validity: Must be used within 10 minutes
- Required: Must be provided to
/damm/deposit/confirm - One-time use: Cannot be reused after confirmation
Rate Limiting
This endpoint is subject to rate limiting:- 10 requests per 5-minute window per IP
- Returns HTTP 429 when limit exceeded with message: “Too many liquidity requests, please wait a moment.”
Security Considerations
Next Steps
After receiving the unsigned transaction:- Deserialize the transaction using
@solana/web3.js - Sign the transaction with your manager wallet
- Submit the signed transaction to
/damm/deposit/confirm
Request Expiration
Deposit requests expire after a period of time:- Validity: You must call
/damm/deposit/confirmwithin 10 minutes - After expiration: You’ll need to create a new deposit request
Token Balance Requirements
Manager wallet must have sufficient balance:
- Token A balance >= tokenAAmount (in UI units)
- Token B balance >= tokenBAmount (in UI units)
- SOL balance for transaction fees
Related Endpoints
/damm/deposit/confirm- Confirm and submit the deposit transaction/damm/withdraw/build- Build withdrawal transaction
