> ## 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 PnL By User

> Cumulative realized PnL for Hyperliquid native and HIP-3 perpetual futures over the declared coverage window.

The `hyperliquid.assets.perpetual_pnl_by_user` view contains one row per user, coin, and collateral token. It sums `hyperliquid.assets.perpetual_pnl_daily` from `coverage_start` onward. This is not lifetime PnL: funding before coverage start is not stored.

Collateral amounts always sum. USD columns are null when any contributing day had an unpriced fill or funding event, so gross minus fees plus funding always equals net. `net_usd_is_complete` is false in that case.

<Info>
  Always filter with `WHERE user = ...`. User-scoped queries are the supported access pattern.
</Info>

### Table Details

| Property | Value |
| - | - |
| Table Name | `hyperliquid.assets.perpetual_pnl_by_user` |
| Table Status | Production-Ready |
| Unique Key | `user, coin, collateral_token` |

### Sample Query

```sql theme={null}
SELECT
  coin,
  collateral_token,
  coverage_start,
  gross_realized_pnl,
  total_fees,
  total_funding,
  net_realized_pnl,
  net_usd_is_complete
FROM hyperliquid.assets.perpetual_pnl_by_user
WHERE user = '0x9237794d8e5c6eb247b20f2e5edd9ad5f530d8ec'
ORDER BY coin;
```
