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

getPoolQuotes

Read a pool’s quote book from the analytics subgraph.

import { getPoolQuotes, POOL_OPEN_QUOTE_STATUSES } from "@symmio/trading-core"; const { quotes } = await getPoolQuotes(config, { symbolId: 1, quoteStatuses: POOL_OPEN_QUOTE_STATUSES, first: 25, });

This is pool-wide, not account-scoped. The query carries no partyA or partyB filter, so it returns every trader’s quotes on the market and partyA differs row to row. If you want one account’s quotes, this is the wrong read — use getSubAccountQuotes.

Rows are scoped by the pool’s symbolId and by source — the SYMMIO diamond the quotes were opened against, which the SDK resolves from the chain’s symmioAddress. Nothing extra to configure.

Which rows you get is the status filter

quoteStatuses takes raw QuoteStatus ordinals, because that is what the subgraph stores and filters on. Two sets are exported for the common cases:

  • POOL_OPEN_QUOTE_STATUSES ([4]) — open on-chain, i.e. live positions. This is what a pool page’s “open quotes” tab shows: one row per position, every trader.
  • POOL_PENDING_QUOTE_STATUSES ([0, 2]) — sent but not yet accepted. The default, but short-lived: a solver accepts within seconds, so against a busy market this is usually a small or empty list. Reach for it for a “pending orders” view, not the open book.

Parameters

chainIdnumberoptional

Target chain id. Defaults to the config’s defaultChainId.

symbolIdnumber | null | undefinedrequired

The pool’s solver market id. A pool with no symbolId is not tradable and has no book, so the action returns an empty list without issuing a request and the query factory stays enabled: false.

quoteStatusesreadonly number[]optional

Raw QuoteStatus ordinals to include. Defaults to POOL_PENDING_QUOTE_STATUSES.

firstnumberoptional

Page size. Defaults to 50.

skipnumberoptional

Page offset. Defaults to 0.

orderDirection"asc" | "desc"optional

Sort direction on the quote timestamp. Defaults to "desc".

Returns

{ quotes: PoolQuoteBookEntry[] }. Each entry extends PoolQuote with orderPrice and orderNotional, both bigint | null at 18 decimals. Requested price takes precedence over opened price; explicit zero is retained. Notional uses the full requested quantity. Missing required inputs yield null. These fields describe requested orders, not the remaining marked value of open positions.

Amounts and prices use the protocol’s scale, which happens to match the listing backend’s but is a separate thing. null means the subgraph had no value for that field.

idstring

Subgraph row id ({quoteId}-{source}); stable, use as a table key.

quoteIdbigint

Protocol quote id.

quoteStatusnumber | null

Raw QuoteStatus ordinal.

positionTypenumber | null

Raw PositionType ordinal — 0 long, 1 short.

orderTypeOpennumber | null

Raw OrderType ordinal of the open — 0 limit, 1 market.

symbolstring | null

Market ticker, when the subgraph carries one.

symbolIdnumber | null

Solver market id.

partyAstring

The account that opened the quote. Varies row to row.

partyBstring | null

The solver that took the other side.

quantitybigint | null

Quote size.

closedAmountbigint | null

How much of quantity has been closed.

quantityToClosebigint | null

Size of an in-flight close request.

openedPricebigint | null

Price the quote actually opened at.

requestedOpenPricebigint | null

Price the opener asked for.

averageClosedPricebigint | null

Size-weighted average of the closes so far.

closePricebigint | null

Price of an in-flight close request.

initialOpenedPricebigint | null

Open price before any modification.

liquidateAmountbigint | null

Size liquidated, when the quote was liquidated.

liquidatePricebigint | null

Price the liquidation executed at.

timestampnumber

Block timestamp of the last update, Unix seconds.

blockNumberbigint

Block the quote was last updated in.

Throws

  • UNSUPPORTED_CHAIN / no analytics subgraph — a SymmError (kind: "config").
  • A SymmApiError when the subgraph request itself fails.

Quote metrics and ownership

PoolQuote retains timestampSendQuote, timestampOpenPosition, ownerAddress, closedPrice, marketPrice, tradingFee, closeFee, leverage, signed initialCva/initialPartyAmm/initialLf, and paid/received funding. Timestamps use seconds, monetary/rate protocol fields use raw 18-decimal bigints, and unavailable fields stay null. Use the original open timestamp instead of the mutable last-action timestamp for position age.

Last updated on