Builds point-in-time portfolio risk across venue/account domains.
The reader performs no writes and holds no state. Balances, positions, and open orders remain attached to their originating venue/account domain. Aggregates contain only compatible exposure buckets; failures and blocked buckets make incomplete results explicit.
Summary
Functions
Builds one venue/account scope for snapshot/2.
Reads and composes a multi-venue portfolio-risk snapshot.
Types
@type scope() :: %{ :exchange => Bourse.Exchange.t(), :account => term(), optional(:request_opts) => keyword() }
Functions
@spec scope(Bourse.Exchange.t(), term(), keyword()) :: scope()
Builds one venue/account scope for snapshot/2.
@spec snapshot( [scope()], keyword() ) :: {:ok, Bourse.PortfolioRisk.Snapshot.t()} | {:error, Bourse.Error.t()}
Reads and composes a multi-venue portfolio-risk snapshot.
Options:
:timeout— per-scope and per-component task timeout:observed_at— local observation timestamp override:max_age_ms— optional source-timestamp freshness limit for Greeks