# `Beancount.Schemas.Balance`
[🔗](https://github.com/thanos/beancount_ex/blob/v0.6.0/lib/beancount/schemas/directives.ex#L119)

Persisted `balance` assertion (table `beancount_balances`).

Storage-layer counterpart of `Beancount.Directives.Balance`.

## Fields

  * `date` - the day the assertion is checked (start of day).
  * `account` - account whose balance is asserted.
  * `amount` - expected balance as `Decimal.t()`.
  * `currency` - commodity of the expected balance.
  * `tolerance` - optional `Decimal.t()` tolerance (`± amount`), or `nil`.
  * `metadata` - arbitrary key/value map.
  * `file_order` - zero-based position of the directive in the source.

## Example

    %Beancount.Schemas.Balance{
      date: ~D[2026-06-01],
      account: "Assets:Bank",
      amount: Decimal.new("100"),
      currency: "USD",
      tolerance: nil,
      metadata: %{},
      file_order: 8
    }

# `t`

```elixir
@type t() :: %Beancount.Schemas.Balance{
  __meta__: term(),
  account: term(),
  amount: term(),
  currency: term(),
  date: term(),
  file_order: term(),
  id: term(),
  inserted_at: term(),
  metadata: term(),
  tolerance: term(),
  updated_at: term()
}
```

---

*Consult [api-reference.md](api-reference.md) for complete listing*
