> ## Documentation Index
> Fetch the complete documentation index at: https://docs.ostium.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Manage Positions

> Inspect live positions and the identifiers needed to manage them with the Ostium Builder SDK.

Use `getOpenPositions()` to fetch current positions and the `pairId` / `idx` values needed for management calls.

```ts theme={null}
const { pairPositions, marginSummary, withdrawable } =
  await client.getOpenPositions();

for (const { position } of pairPositions) {
  console.log(
    position.pairId,
    position.idx,
    position.side,
    position.entryPx,
    position.unrealizedPnl,
    position.liquidationPx,
  );
}

console.log(marginSummary.accountValue, withdrawable);
```

Use these identifiers with:

* `closeTrade()`
* `modifyOrder()`
* `updateCollateral()`
