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

getMuonUpnlB

Fetch a fresh Muon uPnl_B attestation for partyB against partyA and normalize it to typed fields — the partyB’s uPnL is computed against the given partyA (used in lockQuote solvency validation). The oracle URLs and the SYMMIO diamond address are resolved from config; gateways are tried in order until one succeeds.

import { getMuonUpnlB } from "@symmio/trading-core"; const b = await getMuonUpnlB(config, { partyB: "0xpb...", partyA: "0xva..." }); console.log(b.uPnl, b.quoteIds);

Parameters

partyBAddressrequired

The partyB (a hedger/solver) to attest.

partyAAddressrequired

The partyA the partyB’s uPnL is computed against.

chainIdnumberoptional

Optional chain override.

Returns

GetMuonUpnlBReturnType
partyBAddress

The attested partyB.

partyAAddress

The partyA the attestation is computed against.

uPnlbigintrequired

Signed unrealized PnL (18-decimal, signed).

notionalValueSumbigintoptional

Sum of notional values across the partyB’s positions with the partyA.

quoteIdsbigint[]

Quote ids included in the attestation.

Plus the MuonAttestationBase signature envelope fields.

Query options

import { getMuonUpnlBQueryOptions } from "@symmio/trading-core"; import { useQuery } from "@tanstack/react-query"; useQuery(getMuonUpnlBQueryOptions(config, { partyB, partyA }));

GetMuonUpnlBOptions requires partyB and partyA; the factory does not accept missing inputs or validate them inside queryFn. The getMuonUpnlBQueryKey builder still accepts partial inputs for cache matching and invalidation.

Last updated on