# getAccountTotalStorageSize

> **getAccountTotalStorageSize**(`client`, `options`): [`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/warm-storage/namespaces/getaccounttotalstoragesize/type-aliases/outputtype/)\>

Defined in: [packages/synapse-core/src/warm-storage/get-account-total-storage-size.ts:58](https://github.com/FilOzone/synapse-sdk/blob/0c729dad461472f017e4d84f8e6ac16e6afbe7c0/packages/synapse-core/src/warm-storage/get-account-total-storage-size.ts#L58)

Get the total FWSS-priced approximate storage size for an account.

Fetches all datasets for the given address from FWSS, checks liveness via
PDP Verifier, converts each aggregate data-set leaf count using the same
approximation as FWSS pricing, and sums the results. This is not the exact
sum of raw piece payload sizes.

## Parameters

| Parameter | Type | Description |
| ------ | ------ | ------ |
| `client` | `Client`\<`Transport`, `Chain`\> | The client to use to get the account total storage size. |
| `options` | [`OptionsType`](/reference/filoz/synapse-core/warm-storage/namespaces/getaccounttotalstoragesize/type-aliases/optionstype/) | [getAccountTotalStorageSize.OptionsType](/reference/filoz/synapse-core/warm-storage/namespaces/getaccounttotalstoragesize/type-aliases/optionstype/) |

## Returns

[`Promise`](https://developer.mozilla.org/docs/Web/JavaScript/Reference/Global_Objects/Promise)\<[`OutputType`](/reference/filoz/synapse-core/warm-storage/namespaces/getaccounttotalstoragesize/type-aliases/outputtype/)\>

Total storage size and dataset count [getAccountTotalStorageSize.OutputType](/reference/filoz/synapse-core/warm-storage/namespaces/getaccounttotalstoragesize/type-aliases/outputtype/)

## Example

```ts
import { getAccountTotalStorageSize } from '@filoz/synapse-core/warm-storage'
import { calibration } from '@filoz/synapse-core/chains'
import { createPublicClient, http } from 'viem'

const client = createPublicClient({
  chain: calibration,
  transport: http(),
})

const { totalSizeBytes, datasetCount } = await getAccountTotalStorageSize(client, {
  address: '0x...',
})
```

## Throws

Errors [getAccountTotalStorageSize.ErrorType](/reference/filoz/synapse-core/warm-storage/namespaces/getaccounttotalstoragesize/type-aliases/errortype/)