Skip to Content
Symmio Trading-SDK — the SDK surface for builders on HyperEVM
CoreMuon OraclegetMuonUpnlAWithSymbolPrice

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

partyAAddressrequired

The partyA (virtual account, lowcap) to attest.

symbolIdbigintrequired

The symbol whose price is attested alongside the uPnL.

chainIdnumberoptional

Optional chain override.

Returns

GetMuonUpnlAWithSymbolPriceReturnType
partyAAddress

The attested partyA.

symbolIdbigint

The symbol whose price is attested.

pricebigintoptional

The attested price for symbolId (18-decimal).

uPnlbigintrequired

Signed unrealized PnL (18-decimal, signed).

notionalValueSumbigintoptional

Sum 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.

Last updated on