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

Persisted `price` directive (table `beancount_prices`).

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

## Fields

  * `date` - the day the price holds.
  * `commodity` - the commodity being priced, e.g. `"AAPL"`.
  * `amount` - price as `Decimal.t()`.
  * `currency` - quote currency of `amount`, e.g. `"USD"`.
  * `metadata` - arbitrary key/value map.
  * `file_order` - zero-based position of the directive in the source.

## Example

    %Beancount.Schemas.Price{
      date: ~D[2026-01-02],
      commodity: "AAPL",
      amount: Decimal.new("150"),
      currency: "USD",
      metadata: %{},
      file_order: 9
    }

# `t`

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

---

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