Overview
Creates an unsigned transaction for claiming accumulated fees from a Meteora DAMM v2 (Dynamic AMM) pool. The API validates available fees, builds a combined transaction that claims fees and transfers 70% to the configured destination address, and returns the transaction ready for user signing.Important: This endpoint only claims fees from the first position in the pool to keep transaction size manageable. If multiple positions exist, subsequent calls are needed to claim from other positions.
Request Parameters
Base58 encoded public key of the wallet that will pay transaction fees. This wallet only covers network transaction costs and cannot redirect claimed fees.
Response
Indicates if the operation was successful
Base58 encoded unsigned transaction that needs to be signed by the fee payer
Unique identifier for this fee claim 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 (unwrapped after claim)
Total number of positions owned by the LP owner in this pool
Position number being claimed (always 1 for this endpoint)
Number of instructions in the transaction
Object containing fee estimates with the following fields:
tokenA(string): Total Token A fees to be claimedtokenB(string): Total Token B fees to be claimedtokenATransfer(string): Token A amount to be transferred (70%)tokenBTransfer(string): Token B amount to be transferred (70%)
Instructions for the next step in the process
Success Response
Error Responses
400 - Missing Parameters
400 - Missing Parameters
400 - Invalid Public Key
400 - Invalid Public Key
404 - No Positions Found
404 - No Positions Found
400 - No Fees Available
400 - No Fees Available
500 - Configuration Error
500 - Configuration Error
500 - Transaction Creation Failed
500 - Transaction Creation Failed
Process Flow
This endpoint performs several validations and transaction building steps:Validate Environment
Checks that required environment variables are configured (RPC_URL, DAMM_POOL_ADDRESS, PROTOCOL_PRIVATE_KEY, FEE_DESTINATION_ADDRESS)
Build Combined Transaction
Creates a transaction with:
- ATA creation instructions (if needed)
- Fee claim instruction (first position only)
- Transfer instructions (70% to destination, 30% remains with LP owner)
Handle Native SOL
If Token B is wrapped SOL, the transaction includes native SOL transfer logic (Meteora automatically unwraps wSOL to native SOL)
Fee Distribution
The claimed fees are automatically split:- 70%: Transferred to the configured destination address (FEE_DESTINATION_ADDRESS)
- 30%: Remains with the LP owner wallet
Native SOL Handling
Special handling for wrapped SOL (wSOL):When Token B is the native SOL mint (So11111111111111111111111111111111111111112):
- Meteora automatically unwraps wSOL to native SOL during the claim
- No token account is created for Token B
- The 70% transfer uses
SystemProgram.transferinstead of SPL token transfer - Fees are received directly as native SOL in the wallet
Request ID
TherequestId is essential for the confirmation step:
- Format: Random 16-byte hex string
- Expiration: Automatically cleaned up after 15 minutes
- Required: Must be provided to
/fee-claim/confirm
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 fee claim 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 wallet (fee payer)
- Submit the signed transaction to
/fee-claim/confirm
Transaction Storage
Transaction data is stored temporarily in memory:- Storage Duration: 10 minutes (validation) to 15 minutes (cleanup)
- Cleanup: Automatic cleanup every 5 minutes
- Expiration: You must call
/fee-claim/confirmwithin the time window
Position Claiming
Multiple positions: If
totalPositions > 1, you need to call this endpoint multiple times to claim fees from all positions. Each call claims fees from the first unclaimed position.