> For the complete documentation index, see [llms.txt](https://naviprotocol.gitbook.io/astros/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://naviprotocol.gitbook.io/astros/astros-perpetual/integrations/trading.md).

# Trading

## Opening Positions

Users can open positions by choosing either \[Buy/Long] or \[Sell/Short], utilizing leverage to enhance trading potential.

<div align="left"><figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdIT7oc6TOZckgTQatRdUA9ZSqW725e_nAz9ZvxsbVgxDs-8-x-LblAj-iiiX84qOPvLkDbOB5T7807fe9pUUlhMvndrSOjrocCv5PRg2F2vm1vKKFLhr0zR1o4GWjU1ZPOd-fzEw?key=DoQZ5Piz_l7a1tLlNidGQ4gB" alt="" width="375"><figcaption></figcaption></figure></div>

***

### **Order Types**

1. Market Order:
   1. Executes immediately at the current market price, prioritizing speed over price.
   2. May experience slippage due to market volatility.
2. Limit Order:
   1. Executes at a specified price or better.
   2. For buy orders, the trade will execute at the limit price or lower.
   3. For sell orders, the trade will execute at the limit price or higher.
   4. Note: If the market price doesn’t reach the specified limit price, the order may not execute.

***

### **Estimated Position Profit/Loss**

Long Position:

* Profit: Gains are realized when the price rises.
* Loss: Losses occur when the price falls.

For example:

* With 10x leverage, a 10% price increase results in a 100% profit.
* If the maintenance margin is 1.5%, an 8.5% price decrease leads to a total loss of 100%, causing the position to be liquidated.

Short Position:

* Profit: Gains are realized when the price falls.
* Loss: Losses occur when the price rises.

For example:

* With 1x leverage, a 10% price decrease results in a 10% profit.

If the maintenance margin is 1.5%, a 98.5% price increase leads to a total loss of 100%, causing liquidation.<br>

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXd6cy5sNn3J160uFqlyw1sExvBi00qkbns2KrdUyIuTAhF2GmAQSav7fh5fdUFn56Gl-sePv9OGwf8xpNGzxl-a-6zNACpXj_ppVA9Hy9sAEqCeQypyD5Osp875CKp4ebaSLAqa6A?key=DoQZ5Piz_l7a1tLlNidGQ4gB" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
The examples focus on price movement impacts. Actual positions may incur **funding fees**, and the profit/loss figures are for reference only.\
Maintenance margin rates vary per cryptocurrency, reflecting different levels of trading risk. Review the token-specific parameters before trading.<br>
{% endhint %}

***

### Position Management

Users can manage their positions directly from the trading interface.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXefTL6tsQj1NDpb_nPv7LQYadyV3DIj797qQb-dOVW0XWtbISL6i830db5QACbduT2ZOaqSzifRh_fqbrAV3WaoaZxulZDIkxwEEBoa5wlYPMc2mVHKsEuE7lv7ZeLLKHqZknoJ3A?key=DoQZ5Piz_l7a1tLlNidGQ4gB" alt=""><figcaption></figcaption></figure>

1. Adding Margin:
   1. &#x20;Isolated Margin: Add or reduce margin for a specific isolated position.
      1. Click the margin adjustment button to modify the margin, managing your risk exposure.
      2. Note: Initial margin cannot be reduced. &#x20;

         <div align="left"><figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXecIiktsccLDRyINyumHA2Bkv3fmxZOA2ZpUCY90PUwmaYEcIG9cyC69FfsDSg1frVikhQ1NiaezHmNkNC1ycYbRZJDa9NjmVLzpams46fEcFi0FJZNA2TL1Wo_2EyXpMUnA3UB7w?key=DoQZ5Piz_l7a1tLlNidGQ4gB" alt="" width="375"><figcaption></figcaption></figure></div>
      3. Cross Margin: Use available balance to supplement margin and lower position risk. \ <br>
2. Liquidation Price and Margin Levels:
   1. If the mark price reaches the liquidation price, the position will be liquidated, resulting in a total loss of associated margin.
   2. Monitor margin levels to manage risk. If the margin level reaches or exceeds 100%, the position will be liquidated.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXe2pzsK0h6KQ6lRtWZv5y6RIrmW-QhmTGXmYUqr0CCSW7097U_UDHfQO6npsERWRZ8KbVJnDMlsn8TT4rcf2amECu6L6bFoCZLTtl2uy6IgI4whL59JMmebq4COihPq2jAsCoSu?key=DoQZ5Piz_l7a1tLlNidGQ4gB" alt=""><figcaption></figcaption></figure>

***

### **Stop Loss and Take Profit**

* Pre-set stop loss and take profit prices for your positions.
* Orders execute automatically when the market price reaches the set levels.
* Note: These are processed as market orders and may experience slippage.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXffFw35dbXFcPOQQd8wOlReatbwZVP5fMkLSlhP-_JdAYHDNz7ytyTE1sj3LwNrBglli36CbvVyxqUUxnt_JGBxoE-HhZ94Dn8lOVIhNra4z5gGmuAavfQqHbKhpbXsTd8-CpfB?key=DoQZ5Piz_l7a1tLlNidGQ4gB" alt=""><figcaption></figcaption></figure>

<div align="left"><figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXepqhifsFArbUAIdl6aZL_bLOjqRyKbFvhE86WFs-5_33CzQoSFcbK2uspQTKcwHdG9rQQ5WTKDnmyxjq-fKNcnDvFyBD4f6tgT0Yvge53GkvRnqWXp88bbnJBeZk7Slshg4RyMVA?key=DoQZ5Piz_l7a1tLlNidGQ4gB" alt="" width="375"><figcaption></figcaption></figure></div>

***

### **Closing Positions**

1. Click \[Close] to close a position using either market or limit orders.
2. Alternatively, click \[Close All] to cancel all open orders and close all positions at the current market price.

<figure><img src="https://lh7-rt.googleusercontent.com/docsz/AD_4nXdfZYPp6cSwt9heq0X06CBWbaxo6LpWNcmu9WthNI2Fq-WzrpoIQMzwL68X4TyPPQnNwv4jcbveB4_4S_2q1i8wpAwuYn7IRlFWc4alyLFL1wC8cWnP0LZIJkYCf4Y9JDK97PwBXQ?key=DoQZ5Piz_l7a1tLlNidGQ4gB" alt=""><figcaption></figcaption></figure>

<br>


---

# 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://naviprotocol.gitbook.io/astros/astros-perpetual/integrations/trading.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.
