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

getForceClosePriceSig

Fetch a fresh Muon priceRange attestation for a time window, assembled into the contract-ready HighLowPriceSig that forceClosePosition / settleAndForceClosePosition verify — the proof that the market traded through the position’s close price during the window. For the raw, un-assembled attestation (all returned fields), use getMuonPriceRange 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 and short-lived — fetch it immediately before submitting, not ahead of time.

import { getForceClosePriceSig } from "@symmio/trading-core"; const sig = await getForceClosePriceSig(config, { partyA, partyB: solverAddress, symbolId: 1n, t0: windowStart, t1: windowEnd, });

Parameters

t0bigintrequired

Window start timestamp (unix seconds).

t1bigintrequired

Window end timestamp (unix seconds).

partyAAddressrequired

PartyA of the position being force-closed.

partyBAddressrequired

PartyB (the solver) of the position being force-closed.

symbolIdbigintrequired

Market symbol id of the position.

chainIdnumberoptional

Optional chain override.

Returns

A contract-ready struct mirroring the on-chain HighLowPriceSig tuple field-for-field, so it encodes directly as the contract argument.

Three of the wire names differ from the struct’s: Muon returns mean for averagePrice, price for currentPrice, and uPnlB / uPnlA for upnlPartyB / upnlPartyA. Note also that upnlPartyB is declared before upnlPartyA — swapping them type-checks green and silently mis-encodes the call.

HighLowPriceSig
reqIdHex

Muon request id (opaque bytes).

timestampbigint

Attestation timestamp (seconds).

symbolIdbigint

Symbol id the price range is for.

highestbigint

Highest price observed in the window, 18-decimal fixed point.

lowestbigint

Lowest price observed in the window, 18-decimal fixed point.

averagePricebigint

Mean price over the window, 18-decimal fixed point.

startTimebigint

Window start timestamp (seconds).

endTimebigint

Window end timestamp (seconds).

upnlPartyBbigint

PartyB’s signed unrealized PnL, int256. Declared before upnlPartyA.

upnlPartyAbigint

PartyA’s signed unrealized PnL, int256.

currentPricebigint

Current price at attestation time, 18-decimal fixed point.

gatewaySignatureHex

Muon gateway signature over the request (opaque bytes).

sigsSchnorrSign

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

Query options

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

GetForceClosePriceSigOptions requires every action input; the factory does not accept missing inputs or validate them inside queryFn. The getForceClosePriceSigQueryKey builder still accepts partial inputs for cache matching and invalidation. Because the signature is short-lived, prefer fetching on demand right before the write over serving a cached one.

Last updated on