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

# Wallets

> Managing balances and portfolio

## Wallet Overview

Your wallet in VoxFi tracks your account balance, positions, and portfolio across all events and markets.

## API Endpoints

### Get User Balance and Totals

Retrieves the account balance and totals for the authenticated user. Includes available balance, locked balances, total deposits and withdrawals, and P\&L metrics (realized and unrealized profit/loss).

#### Balance Example

```json theme={null}
{
  "available": 995610,
  "eligible_for_withdraw": 995610,
  "locked_waiting_orders": 1703270,
  "locked_waiting_withdraw": 0,
  "locked_audit": 0,
  "total_balance": 2698880,
  "remaining_rollover": 0,
  "total_deposits": 4002000,
  "total_withdrawals": 0,
  "total_contracts": 1389616,
  "total_realized_pnl": 0,
  "total_unrealized_pnl": 191097,
  "qty_contracts": 26663
}
```

[Detailed documentation + playground](/playground/user/get-user-balance)

### Get Portfolio

Retrieves the portfolio with positions and P\&L across all events or for a specific event. If `eventId` is provided, returns portfolio only for that event. Otherwise, returns global portfolio across all events.

[Detailed documentation + playground](/playground/user/get-portfolio)

## Balance Components

### Available Balance

The amount you can use for new trades. This is calculated as:

```
available = total_balance - locked_waiting_orders - locked_waiting_withdraw - locked_audit
```

### Locked Balances

* **`locked_waiting_orders`**: Funds reserved for open limit orders;
* **`locked_waiting_withdraw`**: Funds pending withdrawal;
* **`locked_audit`**: Funds temporarily locked for audit purposes.

### P\&L Tracking

* **Realized P\&L**: Profit/loss from closed positions and settled contracts;
* **Unrealized P\&L**: Current profit/loss of open positions based on market prices.

## Use Cases

* **Balance Monitoring**: Track funds available for trading;
* **Portfolio Analysis**: Analyze positions and performance across all events;
* **Risk Management**: Monitor unrealized P\&L and position sizes;
* **Settlement Tracking**: Track realized P\&L from settled markets.
