Skip to Content
Symmio Trading-SDK — the SDK surface for builders on Arbitrum
CoreUnified QuotesaggregateGroupMetrics

aggregateGroupMetrics

Compute the pure, price-independent QuoteGroupMetrics for a set of child quotes. Called for you by groupQuotes; exported so a consumer can re-aggregate an arbitrary subset (for example, only the legs a user selected).

  • openQuantity / quantity are plain sums.
  • initialNotional = Σ(quantity × (initialOpenedPrice ?? requestedOpenPrice)) — the frozen at-open notional; partial closes do not shrink it.
  • weightedOpenPrice = Σ(openQuantity × openPrice) / Σ openQuantity, suppressed when there is no open size or any child has an unsettled open price.
  • leverage divides the at-open notional by Σ of every locked leg, each child preferring its frozen initialLockedValues.

Pure and order-independent. Empty input yields all-zero amounts with the optional fields undefined.

Parameters

The group’s child quotes.

Returns

The aggregated metrics.

Last updated on