getQuoteHistory
Terminal (close / liquidation) events for a set of sub-accounts’ quotes. Each row is a single immutable QuoteEvent with its per-event metadata snapshot overlaid onto the (otherwise mutable) quote it belongs to — so a quote closed across several partial closes produces several distinct history rows.
import { getQuoteHistory } from "@symmio/trading-core";
const history = await getQuoteHistory(config, {
subAccounts: [subAccount],
first: 100,
});Parameters
subAccountsreadonly Address[]requiredThe accounts whose history to read — a SubAccount and/or its Virtual Accounts. The query filters on the quote’s
subAccount, so pass every account that may own the relevant quotes. An empty array reads nothing.
closeTypeQuoteCloseTypedefault AllClose-type filter: All, Closed (FILL_CLOSE), ForceClosed, EmergencyClosed, AdlClosed, or Liquidated.
firstnumberdefault 50Page size.
skipnumberdefault 0Page offset.
startTimenumberdefault 0Lower bound on the event timestamp (unix seconds).
endTimenumberdefault 2_000_000_000Upper bound on the event timestamp (unix seconds).
orderDirection"asc" | "desc"default descSort direction on the event timestamp.
chainIdnumberoptionalOptional chain override.
Returns
readonly QuoteHistoryRow[]Chronologically ordered history rows. Each is a terminal QuoteEvent (its type is one of the QuoteCloseEventType
values) with the event’s immutable metadata snapshot overlaid onto the quote’s fields, so partial closes read as
separate rows with the amounts they closed. See Unified quotes for the reconciled quote model these
rows decorate.
Solver fees
Each row carries the solver fees the event charged, decoded from the metadata snapshot’s solverFees list. All three are 18-decimal wei of collateral.
solverFeebigint | nullThe rate-based fee (SOLVER_FEE on the wire) — notional × rate, so it scales with the size this event settled.
null when the event carried no such entry.
staticSolverFeebigint | nullThe flat fee (STATIC_SOLVER_FEE on the wire) — a fixed per-event charge, independent of the settled size. null
when the event carried no such entry.
totalSolverFeebigint | nullSum of every entry in the list, including tags a future contracts release may add that have no named field here,
so the total never under-reports. null when the event recorded no solverFees at all.
Availability. Only FILL_CLOSE events record solver fees. Liquidation and ADL rows read null on all three fields, as do deployments indexed before the fee was recorded (Base analytics today). Treat null as “not recorded” and render it as such — a 0 would claim the solver charged nothing.
The untruncated list stays on rawMetadata, so a tag the SDK does not name individually is still reachable:
const { solverFees } = JSON.parse(row.rawMetadata ?? "{}");
// [["SOLVER_FEE", "659102399999999"], ["STATIC_SOLVER_FEE", "100000000000000000"]]Query options
import { getQuoteHistoryQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getQuoteHistoryQueryOptions(config, { subAccounts: [subAccount] }));