---
title: "Aggregated account summary"
description: "Get the total equity and balances of your main account and all its sub-accounts together."
---

| | |
|---|---|
| SDK | `client.aggregated_account_summary(...)` |
| HTTP | `POST https://trades.<domain>/full/v1/aggregated_account_summary`, or `/lite/v1/aggregated_account_summary` for [lite names](../../guides/environments.md#encoding-full-or-lite) (the SDKs' default) |
| WebSocket | method `v1/aggregated_account_summary` on `wss://trades.<domain>/ws/full`, or `/ws/lite` for lite names |
| Auth | Session required ([Authentication](../../guides/authentication.md)) |
| Retries | Read: the SDKs retry retryable errors ([rules](../../guides/errors-and-retries.md)) |
| Contract id | `account.aggregated_account_summary` (`RPCAggregatedAccountSummaryV1`) |

## Request

Body type `EmptyRequest`. Fields the server fills are left out.

No fields.

## Response

Body type `ApiAggregatedAccountSummaryResponse` (the same object is the JSON-RPC `result` over WebSocket).

- `result` · lite `r` · object AggregatedAccountSummary · required — The aggregated account summary
- `result.main_account_id` · lite `ma` · string (0x address) · required — The main account ID of the account to which the summary belongs
- `result.total_equity` · lite `te` · string · required — Total equity of the main (+ sub) account, denominated in USD
- `result.spot_balances` · lite `sb` · object SpotBalance[] · required — The list of spot assets owned by this main (+ sub) account, and their balances
- `result.spot_balances[].currency` · lite `c` · string · required — The currency you hold a spot balance in
- `result.spot_balances[].balance` · lite `b` · string · required — This currency's balance in this sub-account.
- `result.spot_balances[].index_price` · lite `ip` · string · required — The index price of this currency. (reported in `USD`)
- `result.spot_balances[].entry_price` · lite `ep` · string · required — The entry price of this spot currency. (reported in `USD`)
- `result.spot_balances[].realized_pnl` · lite `rp` · string · required — The realized PnL of this spot currency. (reported in `USD`)
- `result.spot_balances[].unrealized_pnl` · lite `up` · string · required — The unrealized PnL of this spot currency. (reported in `USD`)
- `result.spot_balances[].available_to_transfer` · lite `at` · string · required — The available to transfer amount of this spot currency.
- `result.spot_balances[].borrowed_amount` · lite `ba` · string · optional — The amount borrowed in this currency, inclusive of accrued interest.
  Only reported by `account_summary`, and only for multi-asset-mode sub-accounts
- `result.vault_investments` · lite `vi` · object VaultInvestment[] · required — The list of vault investments held by this main account
- `result.vault_investments[].vault_id` · lite `vi` · string (uint64) · required — The sub-account ID of the vault invested in.
- `result.vault_investments[].num_lp_tokens` · lite `nl` · string · required — The number of shares held by the investor.
- `result.vault_investments[].share_price` · lite `sp` · string · required — The current share price (in USD) of this vault investment.
- `result.vault_investments[].usd_notional_invested` · lite `un` · string · required — The USD notional invested in this vault investment.
- `result.vault_investments[].share_balances` · lite `sb` · object VaultShareBalances · optional — The owner's Funding, trading and reserved vault shares. Absent on older snapshots.
- `result.vault_investments[].share_balances.funding_lp_token_balance` · lite `fl` · string · required — The vault LP tokens in the funding account, including those a pending redemption reserves.
- `result.vault_investments[].share_balances.trading_lp_token_balance` · lite `tl` · string · required — The vault LP tokens across all sub-accounts: the sum of tradingBalances.
- `result.vault_investments[].share_balances.pending_redemption_lp_token_balance` · lite `pr` · string · required — The funding account's vault LP tokens a pending redemption reserves.
- `result.vault_investments[].share_balances.available_to_transfer` · lite `at` · string · required — The funding account's vault LP tokens that can move to a sub-account now: fundingLpTokenBalance less pendingRedemptionLpTokenBalance. The minimum investment period does not block transfers. The destination's own checks still apply.
- `result.vault_investments[].share_balances.currency` · lite `c` · string · optional — The vault's share currency, used to transfer its LP tokens. Omitted when the vault has none.
- `result.total_sub_account_balance` · lite `ts` · string · required — Deprecated: Use totalSubAccountEquity instead
- `result.total_sub_account_equity` · lite `ts1` · string · required — Total equity of the sub-accounts, denominated in USD
- `result.total_vault_investments_balance` · lite `tv` · string · required — Total amount of the vault investments, denominated in USD
- `result.total_sub_account_available_balance` · lite `ts2` · string · required — Total available balance of the main account, denominated in USD
- `result.total_usd_notional_invested` · lite `tu` · string · required — Total entry (initial investment) amount of the open investments, denominated in USD

## Errors

Errors come back as `{"code", "message", "status"}` (lite `{"c", "m", "s"}`) with the HTTP status. Codes this call can return, as code, name (HTTP status) ([all error codes](../errors.md)):

`1001` Forbidden (403) · `1002` InternalServer (500) · `1003` InvalidRequest (400) · `1006` RateLimit (429, retryable) · `1008` IPNotWhitelisted (401)

## Example

```python
import os

from grvt import Grvt

with Grvt(
    env=os.environ.get("GRVT_ENV", "testnet"),
    api_key=os.environ["GRVT_API_KEY"],
) as client:
    resp = client.aggregated_account_summary()
    print(resp)
```

Raw HTTP (set `GRVT_DOMAIN`, see [Environments](../../guides/environments.md); `GRVT_COOKIE` and `GRVT_ACCOUNT_ID` come from [login](../../guides/authentication.md)):

With full field names:

```sh
curl -sS "https://trades.$GRVT_DOMAIN/full/v1/aggregated_account_summary" \
  -H "Content-Type: application/json" \
  -H "Cookie: gravity=$GRVT_COOKIE" \
  -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
  --data '{}'
```

With lite field names:

```sh
curl -sS "https://trades.$GRVT_DOMAIN/lite/v1/aggregated_account_summary" \
  -H "Content-Type: application/json" \
  -H "Cookie: gravity=$GRVT_COOKIE" \
  -H "X-Grvt-Account-Id: $GRVT_ACCOUNT_ID" \
  --data '{}'
```
