getMuonPrice
Fetch a fresh Muon price attestation for a set of quote ids and normalize it to typed fields. The oracle URLs and the SYMMIO diamond address are resolved from config; gateways are tried in order until one succeeds.
import { getMuonPrice } from "@symmio/trading-core";
const p = await getMuonPrice(config, { quoteIds: [10n, 11n] });
console.log(p.prices, p.quoteIds);Parameters
quoteIdsreadonly bigint[]requiredThe quote ids to price. The partyB liquidation flow validates these prices.
chainIdnumberoptionalOptional chain override.
Returns
GetMuonPriceReturnTypequoteIdsbigint[]The attested quote ids (echoed from the request).
pricesbigint[]optionalValidated prices per quote id (18-decimal).
markPricesbigint[]optionalMark prices per quote id (18-decimal).
maxLeveragesbigint[]optionalMax leverage per quote id.
symbolsstring[]optionalSymbol names per quote id.
Plus the MuonAttestationBase signature envelope fields.
Query options
import { getMuonPriceQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getMuonPriceQueryOptions(config, { quoteIds: [10n, 11n] }));GetMuonPriceOptions requires quoteIds; the factory does not accept missing inputs or validate them inside queryFn. The getMuonPriceQueryKey builder still accepts partial inputs for cache matching and invalidation.