# 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 |


---

# 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.divergence-protocol.com/technical-reference/core/libraries/position.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.
