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

QuoteGroupFunding

Aggregated funding for one grouped position, folded from the per-quote QuoteFundingData rows the analytics subgraph returned for its children. Produced by aggregateGroupFunding.

Every amount is 18-decimal wei bigint, matching UnifiedQuote.

Sign conventionnetReceived = received − paid, the P&L perspective. A positive netReceived means the group has earned funding; a negative one means it has paid for it. This matches QuoteFundingData.netReceived and QuoteGroupUpnl.upnl, so a “green = income” UI renders it directly. It is the inverse of the on-chain int256, which is cost-positive.

Settled to date only — these totals cover funding the protocol has already charged and the analytics subgraph has indexed. Funding accrued since the last charge is not included: it is not indexed anywhere, so it cannot be part of this sum.

Properties

paidbigintrequired

Σ funding partyA paid across the group’s resolved children (wei).

receivedbigintrequired

Σ funding partyA received across the group’s resolved children (wei).

netReceivedbigintrequired

Σ received − paid across the group’s resolved children (wei). Positive = the group earned funding; negative = it paid for it. A lower bound while isComplete is false — it is never suppressed to 0n.

resolvedCountnumberrequired

Number of distinct child quote ids that produced a funding row.

expectedCountnumberrequired

Number of distinct on-chain quote ids among the children — the rows this group expects. Optimistic children (no quoteId yet) are not counted.

missingQuoteIdsbigint[]required

Expected quote ids with no funding row yet (subgraph indexing lag), in the order the ids first appear in the group’s children.

isCompletebooleanrequired

true only when the group has at least one on-chain child and every one of them resolved — i.e. the amounts above are the group’s complete settled-to-date funding. Check it before presenting netReceived as final.

Why a consumer must check isComplete

netReceived is always the sum over whatever resolved, so an incomplete aggregate still renders a number — just a smaller one than the truth. isComplete: false means one of two things, and both are “funding unknown”, never “no funding”:

  • missingQuoteIds is non-empty — the subgraph has not indexed those children yet. Show a loading or partial state.
  • expectedCount is 0 — the group is all-optimistic (or empty), so there is nothing to resolve. netReceived is 0n because nothing was summed, not because funding was zero.
if (!funding.isComplete) { /** Still indexing (or nothing on-chain yet) — do not render `netReceived` as the final total. */ return <FundingSkeleton />; }
Last updated on