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

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

The 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 All

Close-type filter: All, Closed (FILL_CLOSE), ForceClosed, EmergencyClosed, AdlClosed, or Liquidated.

firstnumberdefault 50

Page size.

skipnumberdefault 0

Page offset.

startTimenumberdefault 0

Lower bound on the event timestamp (unix seconds).

endTimenumberdefault 2_000_000_000

Upper bound on the event timestamp (unix seconds).

orderDirection"asc" | "desc"default desc

Sort direction on the event timestamp.

chainIdnumberoptional

Optional 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 | null

The 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 | null

The 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 | null

Sum 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] }));
Last updated on