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

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[]optional

On-chain quote ids.

sourceAddressoptional

The deployment’s diamond address (the subgraph’s source).

partyAsreadonly Address[]optional

PartyA accounts.

startTimenumberoptional

Lower bound on the block timestamp (unix seconds, inclusive).

endTimenumberoptional

Upper bound on the block timestamp (unix seconds, inclusive).

firstnumberdefault 1000

Page size, 1–1000.

skipnumberdefault 0

Rows to skip. The Graph rejects values above 5000.

orderBy"timestamp" | "id"default timestamp

Sort field. Defaults to "id" when idGt is set.

orderDirection"asc" | "desc"default desc

Sort direction. Defaults to "asc" when idGt is set.

idGtstringoptional

Cursor: 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.

chainIdnumberoptional

Optional chain override.

Returns

GetQuoteFundingSettlementsReturnType
rowsQuoteFundingSettlementRow[]

The decoded settlements of this page.

hasMoreboolean

true when the page came back full, so another page may exist.

QuoteFundingSettlementRow

Amounts are 18-decimal wei bigint.

QuoteFundingSettlementRow
idstring

Subgraph entity id — stable; use it as a row key or idGt cursor.

sourceAddress

Diamond address the settlement was indexed from.

quoteIdbigint

On-chain quote id.

partyAAddress

PartyA of the quote.

partyBAddress

PartyB (the solver) of the quote.

symbolIdnumber

Market id.

positionTypePositionType

Long or short.

triggerstring

What triggered the settlement, as indexed.

openAmountbigint

Open amount the settlement applied to.

signedAmountbigint

Settled amount, signed as indexed.

paidByPartyAbigint

Amount PartyA paid.

receivedByPartyAbigint

Amount PartyA received.

previousAccumulatedPaidFundingbigint

Funding index before the settlement.

newAccumulatedPaidFundingbigint

Funding index after the settlement.

fundingDeltaPerUnitbigint

Funding index change per unit.

previousLastFundingPaymentTimestampnumber

Last payment time before the settlement, unix seconds.

newLastFundingPaymentTimestampnumber

Last payment time after the settlement, unix seconds.

previousPaidThroughEpochbigint | null

Epoch paid through before the settlement; null when not indexed.

newPaidThroughEpochbigint | null

Epoch paid through after the settlement; null when not indexed.

balanceChangedboolean

Whether the settlement moved a balance.

timestampnumber

Block timestamp, unix seconds.

blockNumberbigint

Block number.

transactionHex

Transaction 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.

Last updated on