# Position Management

### Get user position detail

```typescript
const positionManager = new AmmPositionManager('mainnet');
const positions = await positionManager.getUserPositions('userAddress');
```

### Create Position

```typescript
const pool = new AmmPool({
      objectId: '',
      coins: [
        new Coin(
          '0xd1b72982e40348d069bb1ff701e634c117bb5f741f44dff91e472d3b01461e55::stsui::STSUI'
        ),
        new Coin(
          '0xdeeb7a4662eec9f2f3def03fb937a663dddaa2e215b8078a284d026b7946c270::deep::DEEP'
        ),
      ],
      reserves: [0, 0],
      feeRate: 0,
      liquiditySupply: 0,
      kLast: 0,
    });

    const position = Position.fromAmounts({
      owner:
        '0xUserAddress',
      pool: pool,
      amountX: 0,
      amountY: 0,
    });

    const mintAmounts = position.mintAmountsWithSlippage(new Percent(0.0001));
```

### Increase Position

```typescript
const poolManager = new AmmPoolManager('mainnet');

    const pool = await poolManager.getPool({
      coinX: new Coin('0x2::sui::SUI'),
      coinY: new Coin(
        '0xdba34672e30cb065b1f93e3ab55318768fd6fef66c15942c9f7cb846e2f900e7::usdc::USDC'
      ),
    });

    const position = Position.fromAmounts({
      owner:
        '0xUserAddrexx',
      pool: pool,
      amountX: 1e9,
      amountY: 1e5,
    });

    const mintAmounts = position.mintAmountsWithSlippage(new Percent(0.0001));
```


---

# 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.flowx.finance/developer/flowx-sdk/amm-management/position-management.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.
