forceCancelCloseRequest
Force-cancel a stalled pending close. Only valid once the quote is CANCEL_CLOSE_PENDING — you called requestToCancelCloseRequest and partyB never acted — and the force-cancel-close cooldown has elapsed. The quote returns to OPENED. Routed through AccountLayer._call(account, …), so the connected wallet must be the subaccount’s owner.
Eligibility: now ≥ quote.statusModifyTimestamp + getCoolDownsOfMA()[2] (forceCancelCloseCooldown).
import { forceCancelCloseRequest } from "@symmio/trading-core";
const hash = await forceCancelCloseRequest(config, { account: "0xsub…", quoteId: 42n });Parameters
accountAddressrequiredThe subaccount (partyA) that owns the quote. Routed through the AccountLayer _call proxy so the diamond sees this
subaccount as the caller.
quoteIdbigintrequiredThe on-chain id of the CANCEL_CLOSE_PENDING quote to force-cancel the close on.
fromAddressoptionalOverride the wallet address that signs. Defaults to the account’s owner.
chainIdnumberoptionalOptional chain override.
gaslessboolean | GaslessWriteOptionsoptionalRelay this write through the gasless execution mode instead of the wallet. A
boolean for the common case, or a per-call GaslessWriteOptions bag; omitted, the chain’s execution.mode decides.
Returns
HashMutation options
import { forceCancelCloseRequestMutationOptions } from "@symmio/trading-core";
import { useMutation } from "@tanstack/react-query";
useMutation(forceCancelCloseRequestMutationOptions(config));Related
- getCoolDownsOfMA — index 2 is the force-cancel-close cooldown gating this call.
- React
useForceCancelCloseRequest— the hook wrapper. - Cancel a close — the full lifecycle.
Gasless execution
forceCancelCloseRequest is relayable through the gasless execution mode — pass
gasless: true (or set the chain’s execution.mode to "gasless") and the SDK signs the same calldata as an
InstantLayer operation, relays it, and returns the relayer’s broadcast hash; the return type and receipt behavior are
unchanged.