# Replace position

You can edit all the attributes of a position from here:&#x20;

* Add margin
* Remove margin
* Edit leverage
* Switch side, i.e long -> short or short -> long

{% hint style="success" %}
This is the Swiss-knife feature.&#x20;
{% endhint %}

{% hint style="danger" %}
This feature doesn’t exist on Hyperliquid — we built it from scratch. To reproduce it there, you would need to close your position and reopen a new one. If that’s required, a message will be displayed informing you that your current position will be closed and a new one opened. This also means you’ll pay fees twice and your PnL will be reset.
{% endhint %}

{% embed url="<https://mass-assets.lon1.cdn.digitaloceanspaces.com/Documentation/edit_position.mp4>" %}
Perps - Edit position
{% endembed %}


---

# 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.mass.money/general/perps/market-orders/replace-position.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.
