> For the complete documentation index, see [llms.txt](https://docs.divergence-protocol.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.divergence-protocol.com/technical-reference/core/libraries/position.md).

# Position

## get

Retrieves the position information for the given owner and tick range

```javascript
function get(mapping(bytes32 => PositionInfo) storage self, address owner, int24 tickLower, int24 tickUpper) internal view returns (PositionInfo storage position)
```

**Params:**

| **Name**  | **Type**                         | **Description**                          |
| --------- | -------------------------------- | ---------------------------------------- |
| self      | mapping(bytes32 => PositionInfo) | Storage mapping for position information |
| owner     | address                          | The owner of the position                |
| tickLower | int24                            | The lower tick of the position range     |
| tickUpper | int24                            | The upper tick of the position range     |

**Returns:**

| **Name** | **Type**     | **Description**                                                                                                                       |
| -------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------- |
| position | PositionInfo | The info struct of the given position. See [Types](https://docs.divergence-protocol.com/technical-reference/core/types/#PositionInfo) |

## update

Updates the position information based on the liquidity delta and growth information

```javascript
function update(PositionInfo storage self, int128 liquidityDelta, GrowthX128 memory insideLast) internal
```

**Params:**

| **Name**       | **Type**     | **Description**                                                                                                                                                                 |
| -------------- | ------------ | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| self           | PositionInfo | The info struct of the given position. See [Types](https://docs.divergence-protocol.com/technical-reference/core/types/#PositionInfo)                                           |
| liquidityDelta | int128       | The change in pool liquidity for the position                                                                                                                                   |
| insideLast     | GrowthX128   | The [GrowthX128](https://docs.divergence-protocol.com/technical-reference/core/types#growthx128) info struct per unit of liquidity inside the tick range, as of the last update |
