> For the complete documentation index, see [llms.txt](https://prodigyfi.gitbook.io/perps-user-guide/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://prodigyfi.gitbook.io/perps-user-guide/positions/closing-positions.md).

# Closing positions

Perpetual contracts do not come with a predetermined expiry date. A perpetual position remains active until it is either manually closed or forcibly liquidated due to unfavorable price movements.

To terminate an open position:

1. Click the **Positions** tab located at the bottom of the trading page.&#x20;
2. On the right-hand side of the position row, note **Close position**. Click this button to open a modal where you can select the exact amount of your position that you wish to close.

<mark style="color:yellow;">Click</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">**MAX**</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">to pre-fill the amount to fully close your position.</mark>

<mark style="color:yellow;">Once you have selected the parameters for your position, more fields will appear to provide additional details about your position and trade execution.</mark>

<mark style="color:yellow;">Once you have entered the amount you want to close, click</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">**Close position**</mark> <mark style="color:yellow;"></mark><mark style="color:yellow;">and you will receive a notification indicating the trade to close your position has been filled! The position then disappears from the Position section.</mark>

<mark style="color:yellow;">You can also manually close your position by selling your long position or buying your short position. Manually closing your position allows you to use Limit and Stop orders, which may reduce the execution price.</mark>


---

# 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://prodigyfi.gitbook.io/perps-user-guide/positions/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.
