> For the complete documentation index, see [llms.txt](https://docs.yfx.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.yfx.com/yfx-v4/trading/position-modes.md).

# Position Modes

For position modes, YFX V4 supports both one-way mode and hedge mode, whick can be swithed in the order panel.

<figure><img src="/files/JU8hrZK1mae6Is4QD247" alt=""><figcaption></figcaption></figure>

## One-way mode

In one-way mode, traders can only hold a long or a short position for any trading pair. Positions in different directions will be merged. If the new trade is in the same direction as the original position, the position size will increase; if the new trade is in the opposite direction, the position size will decrease.

In one-way mode, the order types can only be "Long" or "Short."

{% hint style="warning" %}
In the one direction mode, due to issues with the execution order on the blockchain, there is currently no limit price liquidation function available, only market price liquidation.
{% endhint %}

<figure><img src="/files/PKpOAm8MLNGhifQZp8Sq" alt=""><figcaption></figcaption></figure>

## Hedge mode

In hedge mode, traders can simultaneously hold long and short positions for any trading pair. To open a position or add margin to an existing position in hedge mode, go to the "Order Panel." To close a position, click "Close" under the "Position Tab."

In hedge mode, margins are not shared between long and short positions. If the margin of a long/short position falls below the Maintenance Margin level, the long/short position is liquidated without affecting the other position.


---

# 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.yfx.com/yfx-v4/trading/position-modes.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.
