# APR calculation

## Pool APR

The pool's Annual Percentage Rate (APR) is influenced by both the trading volume and the pool's rewards. The calculation is based on the average trading volume over the past 24 hours.

```typescript
apr = ((feeUsd * 365) / tvlUsd) * 100 + rewardAPR
```

## Position APR

We use the getPositionAPR method in the SDK to calculate the position apr

**Examples**

```typescript
const poolId = '0xb32fb8ec0b447a833066496bd7251d3a2ee57a0a97c54bf4cc945a986235582a';
const pool = await turbosSdk.pool.getPool(poolId);
const positionId =
  '0xb7efa54832e000dcb8879e586f74cec55623105920c96f5f1ebe78a60f9cbd3b';
const position = await turbosSdk.nft.getPositionFields(positionId);
turbosSdk.nft.getPositionAPR({
  poolId,
  tickLower: turbosSdk.math.bitsToNumber(position.tick_lower_index.fields.bits),
  tickUpper: turbosSdk.math.bitsToNumber(position.tick_upper_index.fields.bits),
  fees24h: '100000000',
  getPrice: async (coinType) => {
    return await getPriceFromApi(coinType);
  },
})
```

{% hint style="info" %}
24h fee and pool apr can get from our api: [https://api.turbos.finance/pools/v2?page=1\&pageSize=40\&orderBy=\&category=\&coinTypes=\&includeRisk=false\&symbol=<br>](<https://api.turbos.finance/pools/v2?page=1\&pageSize=40\&orderBy=\&category=\&coinTypes=\&includeRisk=false\&symbol=&#xA;>)
{% endhint %}


---

# 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://turbos.gitbook.io/turbos/developer-docs/via-sdk/clmm/apr-calculation.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.
