getQuote
Read one quote struct by id. Quote ids are 1-based.
import { getQuote } from "@symmio/trading-core";
const quote = await getQuote(config, { quoteId: 42n });Parameters
quoteIdbigintrequiredThe quote id to read. Quote ids are 1-based.
chainIdnumberoptionalOptional chain override.
Returns
Quote | nullThe raw on-chain quote struct, or null if no quote exists with that id. See Unified Quotes for the
higher-level quote model built on top of it.
Query options
import { getQuoteQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getQuoteQueryOptions(config, { quoteId: 42n }));Last updated on