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

# Perpetual Positions Latest

> Latest perpetual position per (user, type, coin) on Hyperliquid.

The `hyperliquid.assets.perpetual_positions_latest` view contains the latest perpetual position per (user, type, coin) on Hyperliquid. Every row represents a currently-open position.

<Info>
  Use `last_activity_timestamp` for freshness checks.
</Info>

## Table Columns

### Identifiers

| Column Name               | Description                                                                            |
| ------------------------- | -------------------------------------------------------------------------------------- |
| user                      | User wallet address.                                                                   |
| type                      | Position type. Currently 'oneWay'.                                                     |
| coin                      | Coin of the position.                                                                  |
| last\_activity\_timestamp | Sub-second timestamp of the most recent observed activity for this (user, type, coin). |
| block\_date               | Calendar date for this row (midnight UTC).                                             |
| \_created\_at             | Row creation timestamp.                                                                |
| \_updated\_at             | Row last update timestamp.                                                             |

### Position

| Column Name        | Description                                       |
| ------------------ | ------------------------------------------------- |
| szi                | Size of the position.                             |
| leverage\_type     | Type of leverage used (e.g. 'cross', 'isolated'). |
| leverage\_value    | Leverage multiplier.                              |
| entry\_px          | Entry price.                                      |
| position\_value    | Position value.                                   |
| unrealized\_pnl    | Unrealized PnL.                                   |
| return\_on\_equity | Return on equity.                                 |
| liquidation\_price | Price that would trigger liquidation.             |
| margin\_used       | Margin used to maintain the position.             |
| max\_leverage      | Maximum leverage allowed for this position.       |

### Funding

| Column Name                        | Description                                                        |
| ---------------------------------- | ------------------------------------------------------------------ |
| cumulative\_funding\_all\_time     | Cumulative funding paid / received all time.                       |
| cumulative\_funding\_since\_open   | Cumulative funding paid / received since the position was opened.  |
| cumulative\_funding\_since\_change | Cumulative funding paid / received since the last position change. |

## Sample Query

```sql theme={null}
SELECT
  user,
  coin,
  szi,
  position_value,
  unrealized_pnl,
  last_activity_timestamp
FROM hyperliquid.assets.perpetual_positions_latest
WHERE coin = 'BTC'
ORDER BY ABS(position_value::float) DESC
LIMIT 100
```
