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

# Savings Balances

> Deposits held in onchain savings products in USD, with the deposit cap, gross and net flows, share tokens outstanding and share price. Each series is one savings balance, keyed by protocol, chain, savings product, token, balance type and balance subtype. Many series, so name the balances you need.

One row per savings balance, keyed by protocol, chain, savings product, token, balance type and balance subtype: the parent protocol and product, chain, token and the mapped protocol, project and network records. The id is the series key of the savings-balances timeseries model.

| | |
| - | - |
| Access | Lending-protocols-dataset |
| Tabular model | `savings-balances`: primary key `id` |
| Timeseries model | `savings-balances`: intervals `1d`, series key `id` (Savings Balance ID), series must be named (up to 10 per call) |

## Endpoints

> [card] [List Savings Balances](https://docs.blockworks.com/api-reference/data-api/savings/tabular-savings-balances.md)
>
> One page of rows with per-column filters, sorting and pagination.

> [card] [Batch Get Savings Balance timeseries](https://docs.blockworks.com/api-reference/data-api/savings/timeseries-savings-balances.md)
>
> Up to 10 series in one request, named by Savings Balance ID in `series`.

> [card] [Get Savings Balance timeseries](https://docs.blockworks.com/api-reference/data-api/savings/timeseries-savings-balances-by-id.md)
>
> One series over a time window, keyed by its Savings Balance ID.

## Metrics

7 metrics. Use the `Field` value in `selections`; every point starts with the timestamp and continues in this order.

| Field | Name | Type | Unit | Description |
| - | - | - | - | - |
| `balanceUSD` | Balance (USD) | float64 | | Balance in USD. |
| `balanceCapUSD` | Balance Cap (USD) | float64 | | Balance cap in USD. |
| `grossInflowUSD` | Gross Inflow (USD) | float64 | | Gross inflow to the balance in USD. |
| `grossOutflowUSD` | Gross Outflow (USD) | float64 | | Gross outflow from the balance in USD, stored as a negative number. |
| `netFlowUSD` | Net Flow (USD) | float64 | | Net flow (inflow plus outflow) in USD. |
| `totalShares` | Total Shares | float64 | | Total share tokens outstanding. |
| `sharePrice` | Share Price | float64 | | Share token price in the underlying token. |

## Columns

Use the `Field` value in `selections`, `sortBy`, and as the base of a filter parameter (`Field` plus one of its `Filters` suffixes).

| Field | Type | Filters | Sort | Description |
| - | - | - | - | - |
| `id` | string | `Eq`, `IsOneOf` | | The series key of the savings-balances timeseries model, the parent slug, chain, savings id, token address, balance type and balance subtype, joined with underscores. (primary key) |
| `name` | string | `Eq`, `IsOneOf`, `Contains` | default | The display name of the balance, the savings product name, token symbol and balance subtype (or type). |
| `slug` | string | `Eq`, `IsOneOf` | yes | The parent protocol's project slug, the slug used for the same protocol across the API. |
| `parentSlug` | string | `Eq`, `IsOneOf` | yes | The parent protocol's short name. |
| `productSlug` | string | `Eq`, `IsOneOf` | | The product or version within the parent protocol. |
| `chain` | string | `Eq`, `IsOneOf` | | The short name of the chain (ethereum, base, solana). |
| `savingsID` | string | `Eq`, `IsOneOf` | | The savings product's identifier. |
| `tokenAddress` | string | `Eq`, `IsOneOf` | | The token contract address (the mint address on Solana); null when unlabeled. |
| `balanceType` | string | `Eq`, `IsOneOf` | | The balance type as classified by Blockworks Research. |
| `balanceSubtype` | string | `Eq`, `IsOneOf` | | The finer balance classification; null where none is distinguished. |
| `savingsName` | string | `Eq`, `IsOneOf`, `Contains` | | The savings product's display name. |
| `tokenSymbol` | string | `Eq`, `IsOneOf`, `Contains` | yes | The token's ticker symbol. |
| `protocolSlug` | string | `Eq`, `IsOneOf` | | The slug of the protocol record mapped to the product; null when unmapped. |
| `protocolName` | string | `Eq`, `IsOneOf` | | The name of the protocol record mapped to the product; null when unmapped. |
| `projectID` | string | `Eq`, `IsOneOf` | | The identifier of the parent protocol's project record; null when unmapped. |
| `networkID` | string | `Eq`, `IsOneOf` | | The chain's networkID in the blockchains model; null when unmapped. |

## Example

```bash curl theme={null}
curl "https://api.blockworks.com/query/timeseries/savings-balances/1d/<id>?timeframe=7d&selections=balanceUSD,balanceCapUSD" \
  -H "X-Blockworks-API-Key: $BLOCKWORKS_API_KEY"
```

See [Get Savings Balance timeseries](https://docs.blockworks.com/api-reference/data-api/savings/timeseries-savings-balances-by-id.md) for the response and the errors.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.