# Fee & Rewards

When you add liquidity within a valid price range, all transaction fees generated within this range will be distributed based on the proportional share of effective liquidity from all positions within the current range. If you intend to harvest transaction fees separately, please follow the method below.

## 1. Fetch Pending Fee Info

You can get all pending/claimed fee info from method `sdk.Position.fetchPositionById` .

## 2. Generate all rewards claim payload

use `sdk.Position.claimAllRewardsTransactionPayload` method

### Function Input Params

* `positionId` : The pool's id
* `recipient` : who will get this fee reward.

### Example

```typescript
const payload = sdk.Position.claimAllRewardsTransactionPayload({
    positionId: '',
    recipient: ''
})
```

## 3. Generate fee claim payload

use `sdk.Position.claimFeeTransactionPayload` method

### Function Input Params

* `positionId` : The pool's id
* `recipient` : who will get this fee reward.

### Example

```typescript
const payload = sdk.Position.claimFeeTransactionPayload({
    positionId: '',
    recipient: ''
})
```

## 4. Generate reward claim payload

use `sdk.Position.claimRewardTransactionPayload` method

### Function Input Params

* `positionId` : The pool's id
* `recipient` : who will get this fee reward.

### Example

```typescript
const payload = sdk.Position.claimRewardTransactionPayload({
    positionId: '',
    recipient: ''
})
```

<sub>The White Paper is for informational purposes only. Nothing in the White Paper constitutes legal, financial or tax advice. Its content may be updated from time to time without express notice. You should seek your own professional advice before engaging in any activity in connection with Hyperion. See</sub> [<sub>Legal Disclaimer</sub>](https://docs.hyperion.xyz/legal-and-compliance/legal-disclaimer)<sub>.</sub>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.hyperion.xyz/developer/via-sdk/features-available/fee-and-rewards.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
