> For the complete documentation index, see [llms.txt](https://help.openloyalty.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://help.openloyalty.io/technical-guide/data-exports/data-structure-and-types/wallet-balance.md).

# Wallet Balance

The balance of every member wallet at the end of each day, exported as a full snapshot.

The Wallet Balance file contains the balance of **every** member wallet at the end of the day: earned, spent, active, pending, blocked, and expired units.

{% hint style="warning" %}
**Snapshot export.** This is **not** a delta file. Each file contains one row for every wallet that existed at the end of the day, including wallets that did not change and wallets with a zero balance. Replace the previous day's data with the new file, or keep each file as a dated partition to build a daily balance history. Do not sum files together.
{% endhint %}

**File:** `analytics/WalletBalance/wallet_balance_YYYY_MM_DD.csv`\
**Primary key:** `walletId`

`wallet_balance_2026_09_24.csv` contains balances as of the **end of 24 September 2026 (23:59:59 UTC)**. Every value is calculated from all transfers created before `2026-09-25 00:00:00 UTC`, so it can be compared directly with the Unit Transfers files up to and including `points_2026_09_24.csv`.

A sample file is provided below:

{% file src="/files/nSewbdJ0Wy14NWiZin6Q" %}

**Available Data** (in column order, see Column types for how each type is written):

<table><thead><tr><th width="188.68359375">Column</th><th width="133.4765625">Type</th><th width="124.71875">Can be empty</th><th>Description</th></tr></thead><tbody><tr><td><code>tenantId</code></td><td>uuid</td><td>No</td><td>ID of the tenant where the wallet is registered</td></tr><tr><td><code>memberId</code></td><td>uuid</td><td>No</td><td>ID of the member who owns the wallet</td></tr><tr><td><code>walletId</code></td><td>uuid</td><td>No</td><td>Unique ID of the wallet (links to <code>walletId</code> in the Unit Transfers file and <code>defaultAccount.accountId</code> in the Members file)</td></tr><tr><td><code>walletTypeCode</code></td><td>string</td><td>No</td><td>Code of the wallet type (for example <code>default</code>, <code>coins</code>)</td></tr><tr><td><code>earnedUnits</code></td><td>decimal</td><td>No</td><td>Lifetime units earned in this wallet (<code>adding</code> transfers that are active and not cancelled)</td></tr><tr><td><code>transferredUnits</code></td><td>decimal</td><td>No</td><td>Lifetime units received from other members (<code>p2p_adding</code>)</td></tr><tr><td><code>spentUnits</code></td><td>decimal</td><td>No</td><td>Lifetime units spent or sent to other members (<code>spending</code> and <code>p2p_spending</code>)</td></tr><tr><td><code>activeUnits</code></td><td>decimal</td><td>No</td><td>Current balance available for use</td></tr><tr><td><code>lockedUnits</code></td><td>decimal</td><td>No</td><td>Units currently pending (not yet active)</td></tr><tr><td><code>blockedUnits</code></td><td>decimal</td><td>No</td><td>Units currently blocked by an administrator</td></tr><tr><td><code>expiredUnits</code></td><td>decimal</td><td>No</td><td>Lifetime units expired</td></tr><tr><td><code>createdAt</code></td><td>datetime</td><td>No</td><td>Date when the wallet was created</td></tr><tr><td><code>updatedAt</code></td><td>datetime</td><td>Yes</td><td>Date of the most recent transfer on the wallet. Empty if the wallet has no transfers.</td></tr></tbody></table>

{% hint style="info" %}
This file uses a different format from the other exports: timestamps are written as `YYYY-MM-DD HH:MM:SS.ffffff` (UTC, without an offset), and unit values can have trailing zeros, for example `100.000000`.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://help.openloyalty.io/technical-guide/data-exports/data-structure-and-types/wallet-balance.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
