# ILiquidityPool

*Generic interface for liquidity pool methods for fetching observations (to calculate TWAP) and other basic information*

## getTimepoints

```solidity
function getTimepoints(uint32[] secondsAgos) external view returns (int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulatives, uint112[] volatilityCumulatives, uint256[] volumePerAvgLiquiditys)
```

*AlgebraPool V1.9 equivalent of Uniswap V3 `observe` function See <https://github.com/cryptoalgebra/AlgebraV1.9/blob/main/src/core/contracts/interfaces/pool/IAlgebraPoolDerivedState.sol> for more information*

## observe

```solidity
function observe(uint32[] secondsAgos) external view returns (int56[] tickCumulatives, uint160[] secondsPerLiquidityCumulativeX128s)
```

*Uniswap V3 `observe` function See `https://github.com/Uniswap/v3-core/blob/main/contracts/interfaces/pool/IUniswapV3PoolDerivedState.sol` for more information*

## token0

```solidity
function token0() external view returns (address)
```

The first of the two tokens of the pool, sorted by address

### Return Values

| Name | Type    | Description                |
| ---- | ------- | -------------------------- |
| \[0] | address | The token contract address |

## token1

```solidity
function token1() external view returns (address)
```

The second of the two tokens of the pool, sorted by address

### Return Values

| Name | Type    | Description                |
| ---- | ------- | -------------------------- |
| \[0] | address | The token contract address |


---

# 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.gains.trade/developer/technical-reference/contracts/interfaces/iliquiditypool.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.
