forceCancelQuote
Force-cancel a stalled quote. Only valid once the quote is CANCEL_PENDING — you called requestToCancelQuote on a LOCKED order and partyB never acted — and the force-cancel cooldown has elapsed. Like the cancel request, it is routed through AccountLayer._call(account, …), so the connected wallet must be the subaccount’s owner.
Eligibility: now ≥ quote.statusModifyTimestamp + getCoolDownsOfMA()[1]. A PENDING (unlocked) quote cancels instantly via requestToCancelQuote and never reaches this path.
import { forceCancelQuote } from "@symmio/trading-core";
const hash = await forceCancelQuote(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_PENDING quote to force-cancel.
fromAddressoptionalOverride the wallet address that signs. Defaults to the account’s owner.
chainIdnumberoptionalOptional chain override.
Returns
HashMutation options
import { forceCancelQuoteMutationOptions } from "@symmio/trading-core";
import { useMutation } from "@tanstack/react-query";
useMutation(forceCancelQuoteMutationOptions(config));Related
- getCoolDownsOfMA — index 1 is the force-cancel cooldown gating this call.
- React
useForceCancelQuote— the hook wrapper. - Cancel a quote — the full lifecycle.