> For the complete documentation index, see [llms.txt](https://docs.symm.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.symm.io/trader-documentation/how-trading-works-in-symmio/force-closing-positions.md).

# Force Closing Positions

Symmio is a peer-to-peer perpetuals protocol: every position you hold is against a specific solver (PartyB), and filling your close requests is that solver's job. Usually this is uneventful. You submit a close, the solver fills it, the position settles. But solvers are off-chain actors, and once in a while one could go offline, fall behind, or ignore a close it no longer likes. Force close is the backstop. If the market has clearly reached your close price and your solver still hasn't filled, you can close the position yourself, directly against the contract, without the solver's cooperation.

This page covers when force close is available, what price you get, what it costs, and the handful of things that can make it fail.

### When you can force close

* **There's an open close request.** The quote must be in `CLOSE_PENDING`, meaning you've already submitted a `requestToClosePosition` that the solver hasn't filled.
* **The close request is a LIMIT order.** Market closes can't be force-closed, because there's no specific price the solver has failed to honor.
* **The cooldowns have elapsed.** Two timers protect the solver from being force-closed on a brief spike: an initial cooldown after the close request is submitted, and a second one measured from the moment the market hits your price. Both must pass.
* **The market has reached your close price.** The contract checks this against a signed Muon oracle price.

If any of these fails, the transaction reverts and the close stays pending as usual.

### The price you actually get

Your force-close price is your requested close price, nudged slightly against you by a small gap. The gap exists so a solver isn't punished for a single wick that touches your limit and then retraces. Its size is set per symbol by `forceCloseGapRatio`, and your frontend should show the estimated force-close price before you submit, so you know what you're agreeing to.

That gap is why force close is best treated as a safety net rather than an execution strategy: you'll get a price near your limit, but not quite at it. When a solver is filling you normally, `fillCloseRequest` will almost always give you a better price.

### The close fee

Force close runs a full solvency check before it touches your position, and that check includes a close fee on top of any open-side trading fee already baked into the quote. It's computed as:

```
closeFee = filledAmount × closedPrice × quote.closeFee / 1e36
```

and subtracted from your available balance in the solvency math. The close fee rate depends on the affiliate your frontend is registered under, so different frontends can charge different close fees on the same symbol.

{% hint style="info" %}
If you're force-closing a losing position near your maintenance margin, the close fee is one more subtraction that can tip the solvency check negative. Make sure you have enough margin to cover it.
{% endhint %}

### What happens under the hood

You submit one transaction. Internally the contract walks through up to three stages:

1. **Initialize.** Validates the cooldowns and order type, reads the market price from a signed oracle snapshot, computes your force-close price including the gap, and runs the solvency check.
2. **Settle (conditional).** If you or the solver doesn't currently have enough free balance to cover the close, usually because the funds are sitting as unrealized profit in *other* open positions, this stage realizes those profits into available balance so the close can finalize. Most force closes skip it; it only kicks in when funds are tied up elsewhere.
3. **Finalize.** Refreshes the price snapshot, closes the position, transfers the uPnL, and emits a `ForceClosePosition` event.

Frontend builders can run all three in a single bundled call, `forceCloseAndSettlePositionsUnified`.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.symm.io/trader-documentation/how-trading-works-in-symmio/force-closing-positions.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
