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

getMuonUpnlA

Fetch a fresh Muon uPnl_A attestation for partyA and normalize it to typed fields. This returns the raw attestation; for the contract-ready SingleUpnlSig that removeMargin needs, use getDeallocateUpnlSig instead. The oracle URLs and the SYMMIO diamond address are resolved from config; gateways are tried in order until one succeeds.

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

Parameters

partyAAddressrequired

The partyA (virtual account for lowcap) to attest.

chainIdnumberoptional

Optional chain override.

Returns

GetMuonUpnlAReturnType
partyAAddress

The attested partyA.

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 { getMuonUpnlAQueryOptions } from "@symmio/trading-core"; import { useQuery } from "@tanstack/react-query"; useQuery(getMuonUpnlAQueryOptions(config, { partyA }));

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

Last updated on