getQuoteTpSl
Read the raw TP/SL rows for one quote from the handler.
Hits GET /api/v5/?quote_id=<id> and returns the full row list (every state). Framework layers (@symmio/trading-react) fold and filter these into UI-facing snapshots — core keeps the raw shape so consumers can apply their own selection rules.
import { getQuoteTpSl } from "@symmio/trading-core";
const rows = await getQuoteTpSl(config, {
quoteId: 42n,
});Parameters
quoteIdbigintrequiredOn-chain quote id. A negative hedger tempQuoteId is also accepted, so a pre-chain quote’s TP/SL can be read the
moment the hedger accepts an instant open.
chainIdnumberoptionalTarget chain id. Defaults to the config’s defaultChainId.
Returns
Every conditional-order row for the quote, in every state. See QuoteTpSlRow for the
field list.
Throws
SymmErrorwhen the chain has notpslconfig.SymmApiErrorwhen the HTTP request fails.
Query options
import { getQuoteTpSlQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getQuoteTpSlQueryOptions(config, { quoteId: 42n }));getQuoteTpSlQueryOptions is disabled until quoteId is a real id (present and non-zero); it accepts negative ids so a pre-chain quote can be read without waiting for on-chain reconciliation. GetQuoteTpSlOptions requires quoteId. The getQuoteTpSlQueryKey builder stringifies quoteId for cache matching.
Related
QuoteTpSlRow— the raw row shape.useQuoteTpSl— React binding that folds rows into a per-side snapshot.