Skip to Content
Symmio Trading-SDK — the SDK surface for builders on HyperEVM
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.

Query options

import { getQuoteHistoryQueryOptions } from "@symmio/trading-core"; import { useQuery } from "@tanstack/react-query"; useQuery(getQuoteHistoryQueryOptions(config, { subAccounts: [subAccount] }));
Last updated on