getQuoteFundingSettlements
One entity per funding settlement on a quote, from the analytics subgraph’s quoteFundingSettlements collection: what PartyA paid or received, the open amount it applied to, the funding index before and after, and the epochs paid through. Reach for it when the summed totals of getQuoteFunding are not enough — a per-settlement audit, or one of the raw inputs of a per-epoch funding timeline.
import { getQuoteFundingSettlements } from "@symmio/trading-core";
// Every settlement of one quote, oldest first.
const { rows, hasMore } = await getQuoteFundingSettlements(config, {
quoteIds: [7334n],
orderDirection: "asc",
});Every filter is optional and applied only when passed; an empty list filter reads nothing. One call returns one page — see Filters and paging for the shared rules and for paging by cursor.
Settled to date, signs as indexed. These are the settlements the subgraph has indexed; funding accrued since a
quote’s last settlement is on-chain only — read it with
getQuotePendingFunding. signedAmount keeps the subgraph’s sign
and is never re-signed. To net a row the SDK way (income-positive), use receivedByPartyA − paidByPartyA.
Parameters
quoteIdsreadonly bigint[]optionalOn-chain quote ids.
sourceAddressoptionalThe deployment’s diamond address (the subgraph’s source).
partyAsreadonly Address[]optionalPartyA accounts.
startTimenumberoptionalLower bound on the block timestamp (unix seconds, inclusive).
endTimenumberoptionalUpper bound on the block timestamp (unix seconds, inclusive).
firstnumberdefault 1000Page size, 1–1000.
skipnumberdefault 0Rows to skip. The Graph rejects values above 5000.
orderBy"timestamp" | "id"default timestampSort field. Defaults to "id" when idGt is set.
orderDirection"asc" | "desc"default descSort direction. Defaults to "asc" when idGt is set.
idGtstringoptionalCursor: only settlements whose id sorts after this one. Sorts by id ascending unless a sort is passed; any other
sort throws INVALID_SUBGRAPH_CURSOR. See Paging by cursor.
chainIdnumberoptionalOptional chain override.
Returns
GetQuoteFundingSettlementsReturnTyperowsQuoteFundingSettlementRow[]The decoded settlements of this page.
hasMorebooleantrue when the page came back full, so another page may exist.
QuoteFundingSettlementRow
Amounts are 18-decimal wei bigint.
QuoteFundingSettlementRowidstringSubgraph entity id — stable; use it as a row key or idGt cursor.
sourceAddressDiamond address the settlement was indexed from.
quoteIdbigintOn-chain quote id.
partyAAddressPartyA of the quote.
partyBAddressPartyB (the solver) of the quote.
symbolIdnumberMarket id.
positionTypePositionTypeLong or short.
triggerstringWhat triggered the settlement, as indexed.
openAmountbigintOpen amount the settlement applied to.
signedAmountbigintSettled amount, signed as indexed.
paidByPartyAbigintAmount PartyA paid.
receivedByPartyAbigintAmount PartyA received.
previousAccumulatedPaidFundingbigintFunding index before the settlement.
newAccumulatedPaidFundingbigintFunding index after the settlement.
fundingDeltaPerUnitbigintFunding index change per unit.
previousLastFundingPaymentTimestampnumberLast payment time before the settlement, unix seconds.
newLastFundingPaymentTimestampnumberLast payment time after the settlement, unix seconds.
previousPaidThroughEpochbigint | nullEpoch paid through before the settlement; null when not indexed.
newPaidThroughEpochbigint | nullEpoch paid through after the settlement; null when not indexed.
balanceChangedbooleanWhether the settlement moved a balance.
timestampnumberBlock timestamp, unix seconds.
blockNumberbigintBlock number.
transactionHexTransaction hash.
Query options
import { getQuoteFundingSettlementsQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getQuoteFundingSettlementsQueryOptions(config, { quoteIds: [7334n] }));The query is disabled while quoteIds or partyAs is an empty array.
Related
getFundingIndexCheckpoints— the market’s funding index between settlements.getQuoteFunding— the summed totals per quote.getQuotesEventsByType— theCHARGE_*funding events, with their decoded metadata.- Funding — settled vs pending, and every sign convention.
- React
useQuoteFundingSettlements— the hook over this action.