> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fairground.fi/llms.txt
> Use this file to discover all available pages before exploring further.

# Troubleshooting

> Common problems and what causes them

### Why was my position liquidated?

Your position margin fell below the maintenance margin, so anyone could trigger liquidation. Once liquidation is triggered, the protocol's close order stays open even if the price moves back before it fills. What you get back depends on your position's status when the close fills. See [Liquidation](https://docs.fairground.fi/trading/advanced/liquidation.md).

### Why hasn't my order filled?

The most common reasons:

* **Your price threshold isn't met.** An order can fill only when the current oracle price is within its execution price threshold. Longs need the oracle price at or below your limit; shorts need it at or above.
* **The market is closed.** Orders don't fill while their market is closed. See [Trading Hours](https://docs.fairground.fi/trading-hours.md).
* **There isn't enough opposing flow.** Matching fills one side up to the size of the other. Any unfilled size stays open for the next matching cycle.
* **Matching hasn't run yet.** Matching runs when a standard order is placed or a matching transaction is sent. See [Order Matching](https://docs.fairground.fi/trading/advanced/order-matching.md).

### Why did my order fill at a different price than I saw when I placed it?

Every order fills at the oracle price at the moment its matching cycle runs, which can differ from the price when you placed it. A limit price sets the worst price you will accept. See [Pricing](https://docs.fairground.fi/trading/pricing.md).

### Why can't I remove margin?

Removing margin can't push the position's leverage above the market's maximum leverage at the current oracle price. Try a smaller amount.

### Why can't I update my position?

If liquidation has been triggered for the position, you can no longer update it. The protocol will close it at the next matching cycle.

### What does a hex error code mean?

Transactions that revert return a 4-byte error selector, such as `0x6223f681`. Look it up in the [Error Selector Reference](https://docs.fairground.fi/developers/error-selector-reference.md).

### Why don't I see my XP yet?

XP is calculated after each weekly epoch ends, not in real time. See [XP Program troubleshooting](https://docs.fairground.fi/earn/xp-program.md#troubleshooting).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.