Skip to Content
Symmio Trading-SDK — the SDK surface for builders on Arbitrum
CoreMuon OraclegetSendQuoteUpnlSig

getSendQuoteUpnlSig

Fetch a fresh Muon uPnl_A_withSymbolPrice attestation, assembled into the contract-ready SingleUpnlAndPriceSig that sendQuoteWithAffiliateAndData takes as its upnlSig argument. Solvers that enforce Muon verification (majors) require a live attestation here; the lowcap InstantLayer flow instead signs a placeholder and delegates the byte range to the solver, so it does not call this. For the raw, un-assembled attestation (all returned fields), use getMuonUpnlAWithSymbolPrice instead. The oracle URLs and the SYMMIO diamond address are resolved from config; gateways are tried in order until one succeeds.

The attestation is timestamped, short-lived, and signed inside the quote calldata — fetch it immediately before signing, never ahead of time and never from cache.

import { getSendQuoteUpnlSig } from "@symmio/trading-core"; const upnlSig = await getSendQuoteUpnlSig(config, { partyA: subAccountAddress, symbolId: 1n, });

Parameters

partyAAddressrequired

The Muon partyA to attest. For cross-margin solvers this is the sub-account; for lowcap it is the virtual account.

symbolIdbigintrequired

Market symbol id whose price is attested alongside the uPnL.

chainIdnumberoptional

Optional chain override.

Returns

Like getDeallocateUpnlSig, this returns a contract-ready struct — not a MuonAttestationBase subtype. It mirrors the on-chain SingleUpnlAndPriceSig tuple field-for-field so it encodes directly as the contract argument. Compare SingleUpnlSig, which is the uPnL-only variant with no price.

SingleUpnlAndPriceSig
reqIdHex

Muon request id (opaque bytes).

timestampbigint

Attestation timestamp (seconds).

upnlbigint

Signed unrealized PnL of the party, int256 (may be negative).

pricebigint

Attested symbol price as 18-decimal fixed point. Falls back to 0n when the gateway omits it.

gatewaySignatureHex

Muon gateway signature over the request (opaque bytes).

sigsSchnorrSign

The Schnorr TSS signature pieces (signature, owner, nonce).

Query options

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

GetSendQuoteUpnlSigOptions requires both partyA and symbolId; the factory does not accept missing inputs or validate them inside queryFn. The getSendQuoteUpnlSigQueryKey builder still accepts partial inputs for cache matching and invalidation. Caching is only appropriate for display — a cached signature is never valid to sign a quote with.

Last updated on