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

getSubgraphQuotes

The analytics subgraph’s Quote entities, as indexed. Reach for it when you need what the subgraph tracks per quote — the funding index and last payment time, the settled funding totals, the lifecycle timestamps — for many quotes in one request, or for quotes long closed.

import { getSubgraphQuotes } from "@symmio/trading-core"; const { rows, hasMore } = await getSubgraphQuotes(config, { quoteIds: [7334n], source: diamond, });

Indexed, not live. These rows are the subgraph’s copy of each quote, and they lag the chain. For the live on-chain struct read getQuote; for the reconciled quote a trading UI renders, see Unified quotes.

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.

Parameters

quoteIdsreadonly bigint[]optional

On-chain quote ids. Pass source with them when one subgraph indexes several diamonds, whose quote ids can collide.

sourceAddressoptional

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

partyAsreadonly Address[]optional

Owning accounts (partyA).

firstnumberdefault 1000

Page size, 1–1000.

skipnumberdefault 0

Rows to skip. The Graph rejects values above 5000.

orderBy"timestamp" | "id"default timestamp

Sort field. "timestamp" is the entity timestamp. Defaults to "id" when idGt is set.

orderDirection"asc" | "desc"default desc

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

idGtstringoptional

Cursor: only quotes 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

GetSubgraphQuotesReturnType
rowsSubgraphQuoteRow[]

The decoded quotes of this page.

hasMoreboolean

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

SubgraphQuoteRow

Amounts and prices are 18-decimal wei bigint. A null marks a field the subgraph has not indexed for this quote — never read it as zero.

SubgraphQuoteRow
idstring

Subgraph entity id, <quoteId>-<source> — use it as an idGt cursor.

sourceAddress

Diamond address the quote was indexed from.

quoteIdbigint

On-chain quote id.

quoteStatusQuoteStatus | null

Lifecycle status.

partyAAddress

PartyA — the SubAccount or Virtual Account.

partyBAddress | null

PartyB, the solver.

symbolIdnumber | null

Market id.

symbolstring | null

Market ticker.

positionTypePositionType | null

Long or short.

quantitybigint | null

Quote quantity.

fillAmountbigint | null

Filled quantity.

closedAmountbigint | null

Quantity closed so far.

openedPricebigint | null

Current open price.

accumulatedPaidFundingbigint | null

Funding index the quote has paid through — signed, and an index, not an amount. See Funding.

lastFundingPaymentTimestampnumber | null

Last funding payment, unix seconds.

userPaidFundingbigint | null

Cumulative funding PartyA paid.

userReceivedFundingbigint | null

Cumulative funding PartyA received.

timestampSendQuotenumber | null

When the quote was sent, unix seconds.

timestampOpenPositionnumber | null

When the position opened, unix seconds.

timestampFullyClosenumber | null

When the position fully closed, unix seconds.

timestampnumber

Entity timestamp, unix seconds.

blockNumberbigint

Block number of the last update.

Query options

import { getSubgraphQuotesQueryOptions } from "@symmio/trading-core"; import { useQuery } from "@tanstack/react-query"; useQuery(getSubgraphQuotesQueryOptions(config, { quoteIds: [7334n], source: diamond }));

The query is disabled while quoteIds or partyAs is an empty array.

Last updated on