# Opening/Closing Positions

### Opening a position

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

* **Trade Type** and whether it is **long (buy) or short (sell)**.
  1. **Market:** To be used to open a trade immediately via a delayed market order.
  2. **Limit**: To be used when you want to go long at a lower price than present or to go short if the price reaches a higher price than present.&#x20;
  3. **Stop:** To be used when you want to go long if the price reaches a higher price than present (breakup) or to go short if the price reaches a lower price than present (breakdown).&#x20;

{% hint style="info" %}
Conditional orders execute at an exact price, if the price reaches the condition. Fill may slightly vary depending on the Oracle price at the time the delayed order execution is complete.
{% endhint %}

* **Collateral:** Maximum amount you are risking if you are liquidated. Your collateral to open your planned trade.
* **Leverage/Positions Size:** Traders can either pick a leverage multiplier or set their position size changes in one field will always correspond with changes in the other.
* **Your Stop Loss and Take Profit.** You are not obligated to use a stop loss, but this allows you to set up the entire trade before submitting an order.

### Closing an open position

{% hint style="info" %}
Closing an open position if all margin is exhausted or the trader doesn't have enough margin to reserve to execute the trade, the close has to be done through the `close position` modal by selecting `close` on the positions table on an open position.
{% endhint %}

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

Traders can only close a position by opening the opposite direction of the current trade only if they have sufficient margin for the order to reserve for execution.


---

# Agent Instructions: 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:

```
GET https://docs.kwenta.io/using-kwenta/perpetual-futures/smart-margin/trading-on-kwenta/opening-closing-positions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
