# Margin and Leverage

**IMPORTANT NOTE: Currently, all \[XYZ] Markets are Isolated-Only Hyperliquid markets. This means you cannot remove margin from an open \[XYZ] position.**

Trading with leverage means you can amplify gains and losses, so understanding margin is critical. Our margin and leverage logic are provided by Hyperliquid as a HIP-3 DEX. As such, while we provide a general summary of these mechanics below, you should review Hyperliquid's documentation related to [margining and leverage](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/margining):

* **Margin Mode**: A default margin mode is selected when opening any position. For Hyperliquid perps, cross margin is the default.&#x20;
  * *Cross Margin*: For Hyperliquid perps, cross margin is the default. This allows for maximal capital efficiency by sharing collateral between other cross margin positions but also means that liquidations in that asset may effect other cross positions.&#x20;
  * *Isolated Margin*. Isolated margin allows an asset's collateral to be constrained to that asset. This prevents liquidations in that asset from affecting other isolated positions or cross positions. It also ensures that position is not affected by other cross liquidations or isolated liquidations.&#x20;
  * *Isolated-Only*. Some assets are isolated-only, which are the same as isolated margin, but with an additional constraint that margin cannot be removed. In isolated-only markets, margin is proportionally removed as the position is closed.&#x20;


---

# 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.trade.xyz/trading/margin-and-leverage.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.
