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

getMuonSettleUpnl

Fetch a fresh Muon settle_upnl attestation for partyA over quoteIds and normalize it to typed fields. This produces the uPnL settlement data that settleUpnl requires. The oracle URLs and the SYMMIO diamond address are resolved from config; gateways are tried in order until one succeeds.

import { getMuonSettleUpnl } from "@symmio/trading-core"; const s = await getMuonSettleUpnl(config, { partyA: "0xva...", quoteIds: [10n, 11n] }); console.log(s.uPnlA, s.quoteIds);

Parameters

partyAAddressrequired

The partyA (virtual account for lowcap) whose quotes to settle.

quoteIdsreadonly bigint[]required

Quote ids to include in the settlement attestation.

chainIdnumberoptional

Optional chain override.

Returns

GetMuonSettleUpnlReturnType
partyAAddress

The attested partyA.

quoteIdsbigint[]

Quote ids included in the attestation.

uPnlAbigintoptional

Signed unrealized PnL for partyA (18-decimal, signed).

notionalValueSumAbigintoptional

Sum of notional values across partyA’s settled positions.

Plus the MuonAttestationBase signature envelope fields.

Query options

import { getMuonSettleUpnlQueryOptions } from "@symmio/trading-core"; import { useQuery } from "@tanstack/react-query"; useQuery(getMuonSettleUpnlQueryOptions(config, { partyA, quoteIds: [10n, 11n] }));

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

Last updated on