# getPositionCapInfoList

The `getPositionCapInfoList` function retrieves a list of position cap information for a given owner address.

#### Function Signature

```typescript
getPositionCapInfoList(owner: string): Promise<IPositionCapInfo[]>
```

#### Parameters

* `owner`: A string representing the owner's address.

#### Return Value

Returns a `Promise` that resolves to an array of `IPositionCapInfo` objects. Each `IPositionCapInfo` object has the following structure:

```typescript
interface IPositionCapInfo {
  positionCapId: string;
  symbol0: string;
  symbol1: string;
  long: boolean;
}
```

* `positionCapId`: The ID of the position cap.
* `symbol0`: The first symbol in the trading pair.
* `symbol1`: The second symbol in the trading pair.
* `long`: A boolean indicating whether the position is long (true) or short (false).

#### Description

This function fetches all position caps owned by the specified address. It filters for objects of type `PositionCap` and extracts relevant information from each position cap.

#### Usage Example

```typescript
const owner = "0x1234..."; // Replace with actual owner address
const sudoAPI = new SudoAPI(network, provider);

try {
  const positionCaps = await sudoAPI.getPositionCapInfoList(owner);
  console.log("Position Caps:", positionCaps);
} catch (error) {
  console.error("Error fetching position caps:", error);
}
```


---

# 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.sudo.finance/sudo-sdk/v0.0.6/api-reference/sudoapi/getpositioncapinfolist.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.
