Claim LP rewards
Claim accrued AQUA rewards for a liquidity position with the official SDK — check the pending amount, then collect it.
1. Check the pending amount
pool = next(p for p in aqua.pools_for_pair(XLM, AQUA) if p.type == "volatile" and p.fee_bps == 30)
pending = pool.pending_rewards() # the signer's accrual, in stroops of AQUAconst pool = (await aqua.pools.forPair(XLM, AQUA)).find(p => p.type === "volatile" && p.feeBps === 30);
const pending = await pool.pendingRewards(); // the signer's accrual, in stroops of AQUA2. Claim
result = pool.claim_rewards()
print(f"claimed: {result.amount} stroops of AQUA")
print(f"transaction: {result.tx_hash}")const result = await pool.claimRewards();
console.log(`claimed: ${result.amount} stroops of AQUA`);
console.log(`transaction: ${result.txHash}`);Last updated