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

getPoolTradeHistory

Read a pool’s realized trade history from the analytics subgraph.

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

Pool-wide, not account-scoped: no partyA filter, so these are every trader’s closes on the market. The account-scoped counterpart is getQuoteHistory, which filters by the accounts you pass. Reaching for the wrong one gives an empty table or someone else’s trades.

One row per close event, not per quote

Rows come from the immutable quoteEvents collection with each event’s frozen metadata snapshot overlaid. A quote closed across three partial closes therefore yields three rows, each showing the size and price of that close rather than the quote’s final state.

That makes summing the rows correct, and makes reading a single row as “the quote” wrong.

Parameters

chainIdnumberoptional

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

symbolIdnumber | null | undefinedrequired

The pool’s solver market id. Absent means the pool is not tradable, so the action returns an empty result without issuing a request and the query factory stays enabled: false.

closeTypeQuoteCloseTypeoptional

Close-type filter. Defaults to QuoteCloseType.All.

firstnumberoptional

Page size. Defaults to 50.

skipnumberoptional

Page offset. Defaults to 0.

orderDirection"asc" | "desc"optional

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

Returns

{ rows: QuoteHistoryRow[] } — the same row type as getQuoteHistory, decoded by the same mapper, so a history table can render either read without branching.

Throws

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