Beancount.Schemas.Price (beancount_ex v0.6.0)

Copy Markdown View Source

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
}

Summary

Types

t()

@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()
}