> For the complete documentation index, see [llms.txt](https://predictbase.gitbook.io/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://predictbase.gitbook.io/docs/developer/endpoints/read-positions.md).

# Read Positions

These endpoints provide **public, read-only access** to PredictBase position data.

* **No authentication required**
* **Rate-limited**
* Position data may be **delayed by up to \~2 seconds**

***

#### Get Active User Positions&#x20;

Returns a list of a user’s **active positions**, including:

* Aggregated position metrics (shares, avg cost, total cost)
* Related market metadata
* Full trade history for each position

**Endpoint**

```http
GET /get_active_positions/{user}
```

**Full URL**

```
https://api.predictbase.app/get_active_positions/{user}
```

**Authentication**

* None (rate-limited)

#### Response Example

Each item represents **one user position per market option**.

```json
[
  {
    "id": "11300-0-0x27...",
    "user": {
      "id": "0x27..."
    },
    "optionIndex": 0,
    "shares": "3788880000",
    "totalCost": "4859513451",
    "avgCost": "1282572",
    "claimed": false,
    "claimedAmount": "0",
    "isRefund": false,
    "placedAt": "1769319137",
    "claimedAt": null,
    "market": {
      "id": "11300",
      "question": "UFC: Gaethje vs. Pimblett",
      "optionTitles": ["Gaethje", "Pimblett"]
    },
    "Trades": [
      {
        "shares": "...",
        "price": "...",
        "timestamp": "..."
      }
    ]
  }
]
```

***

### Field Descriptions

| Field           | Description                                           |
| --------------- | ----------------------------------------------------- |
| `id`            | Unique position ID (`marketId-optionIndex-user`)      |
| `user.id`       | User wallet address                                   |
| `optionIndex`   | Selected option index                                 |
| `shares`        | Total shares owned (1e6 precision)                    |
| `totalCost`     | Total USDC spent (1e6 precision)                      |
| `avgCost`       | Average cost per share (1e6 precision)                |
| `claimed`       | Whether the winning has been claimed for the position |
| `claimedAmount` | USDC claimed (1e6 precision)                          |
| `isRefund`      | True if position was refunded (Cancelled Markets)     |
| `placedAt`      | First trade timestamp (unix seconds)                  |
| `claimedAt`     | Claim timestamp or `null`                             |

***

#### Data Notes

* **USDC values** use **1e6 precision** (Example: `"550000"` = 0.55 USDC)
* Timestamps are **Unix seconds**
