Fee & Reward
Claim trading fees and pool rewards from liquidity positions.
Overview
Check Pending Rewards
Trading Fees Only
// Using Rewarder module for fee calculation
const position = await sdk.Position.getPositionById(positionId, false)
const pool = await sdk.Pool.getPool(position.pool)
const fees = await sdk.Rewarder.fetchPosFeeAmount([{
poolAddress: pool.poolAddress,
positionId: position.pos_object_id,
coinTypeA: pool.coinTypeA,
coinTypeB: pool.coinTypeB
}])
if (fees.length > 0) {
console.log({
tokenA: fees[0].feeOwedA.toString(),
tokenB: fees[0].feeOwedB.toString()
})
}All Rewards (Fees + Pool Rewards)
Batch Fetch Position Fees
Pool Rewards Info
Collect Trading Fees
Collect Pool Rewards
Batch Collect
Complete Example
Partner Referral Fees
Check Partner Fee Balance
Claim Partner Fees
APR Calculation
Pool APR
Position APR (Delta Method)
Result Type
Important Notes
Last updated