getMuonUpnlAWithSymbolPrice
Fetch a fresh Muon uPnl_A_withSymbolPrice attestation for partyA and a single symbolId, and normalize it to typed fields. This bundles partyA’s uPnL with one symbol’s price — it feeds the sendQuoteWithAffiliate flow. The oracle URLs and the SYMMIO diamond address are resolved from config; gateways are tried in order until one succeeds.
import { getMuonUpnlAWithSymbolPrice } from "@symmio/trading-core";
const a = await getMuonUpnlAWithSymbolPrice(config, { partyA: "0xva...", symbolId: 1n });
console.log(a.uPnl, a.price);Parameters
partyAAddressrequiredThe partyA (virtual account, lowcap) to attest.
symbolIdbigintrequiredThe symbol whose price is attested alongside the uPnL.
chainIdnumberoptionalOptional chain override.
Returns
GetMuonUpnlAWithSymbolPriceReturnTypepartyAAddressThe attested partyA.
symbolIdbigintThe symbol whose price is attested.
pricebigintoptionalThe attested price for symbolId (18-decimal).
uPnlbigintrequiredSigned unrealized PnL (18-decimal, signed).
notionalValueSumbigintoptionalSum of notional values across the partyA’s positions.
symbolIdsbigint[]Symbol ids included in the attestation.
quoteIdsbigint[]Quote ids included in the attestation.
Plus the MuonAttestationBase signature envelope fields.
Query options
import { getMuonUpnlAWithSymbolPriceQueryOptions } from "@symmio/trading-core";
import { useQuery } from "@tanstack/react-query";
useQuery(getMuonUpnlAWithSymbolPriceQueryOptions(config, { partyA, symbolId }));GetMuonUpnlAWithSymbolPriceOptions requires partyA and symbolId; the factory does not accept missing inputs or validate them inside queryFn. The getMuonUpnlAWithSymbolPriceQueryKey builder still accepts partial inputs for cache matching and invalidation.