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

# Balances and Positions

> What each of your users holds and how it has performed: token balances with history, open positions with PnL, and loan health. One wallet address in, no signature needed.

Market data tells you what the venues offer. These endpoints tell you what each of your users actually holds, so you can build balance screens, portfolio views and activity feeds. Pass the user's wallet address as `owner`; the API works out the account. No signature is needed.

| Data | What you get |
| - | - |
| **Balances** | Every token the account holds or has held, with raw and formatted amounts, USD value and the full transfer history. |
| **Positions** | What the account has put to work, valued in USD: vault, Aave and Pendle PT positions in Earn; collateral and debt with health factor, LTV and remaining borrowing capacity in Credit; tokenized assets at their current price; open perps with entry, mark and liquidation prices. |
| **PnL** | Total deposited, current value, realized and unrealized PnL, yield earned and fees paid. |
| **History** | Every deposit, withdrawal, borrow, repayment and trade with block number and transaction hash, so you never need to index anything yourself. |

| Product | Balances | Positions |
| - | - | - |
| Earn | [`GET /v2/earn/balances`](/v2/api-reference/earn/get-token-balances) | [`GET /v2/earn/positions`](/v2/api-reference/earn/list-earn-positions), or [`positions_all`](/v2/api-reference/earn/list-earn-positions-across-all-chains) for every chain at once |
| Credit | [`GET /v2/credit/balances`](/v2/api-reference/credit/get-credit-account-token-balances) | [`GET /v2/credit/positions`](/v2/api-reference/credit/list-credit-positions), or [`looped_positions`](/v2/api-reference/credit/list-looped-leveraged-credit-positions) for leveraged loops |
| Tokenized Assets | [`GET /v2/tokenized_assets/balances`](/v2/api-reference/tokenized-assets/get-token-balances) | [`GET /v2/tokenized_assets/positions`](/v2/api-reference/tokenized-assets/list-positions) |
| Perpetual Trading | Included in `positions`: `account_value` and `withdrawable` USDC. Perps run from the user's own Hyperliquid account, so there's no product account to read. | [`GET /v2/perpetual_trading/positions`](/v2/api-reference/perpetual-trading/list-perpetual-trading-positions) |

## Example

A user's Earn positions on Base:

```bash theme={"system"}
curl "https://api.compasslabs.ai/v2/earn/positions?chain=base&owner=0xYourWalletAddress" \
  -H "x-api-key: $COMPASS_API_KEY"
```

Each position comes back with its balance, USD value, APY and a `pnl` object. Amounts are strings, so parse them with a decimal library rather than floats.

## Next

<CardGroup cols={2}>
  <Card title="Read Balances and Positions" icon="list" href="/v2/account-lifecycle/balances-and-positions">
    The full field reference, with response examples for each product.
  </Card>

  <Card title="How Yield Accrues" icon="chart-line" href="/v2/account-lifecycle/how-yield-accrues">
    How PnL is calculated and what each APY number means.
  </Card>
</CardGroup>
