> For the complete documentation index, see [llms.txt](https://docs.afx.xyz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.afx.xyz/trading-rules/leverage.md).

# Leverage

AFX offers adjustable leverage for all perpetual contracts. The maximum leverage available depends on the asset tier and your notional position size.

## Leverage Settings

* Leverage is set **per trading pair**.
* In Hedge Mode, long and short positions on the same pair share the same leverage setting.
* Leverage can be adjusted at any time, including when you have open positions or orders.
* When adjusting leverage on an existing isolated position, additional margin may be transferred from your available balance, or excess margin may be released.

## Maximum Leverage by Market

Maximum leverage decreases as your position size increases. The current leverage cap for each market is returned by live product metadata:

```
GET /info/public/product-meta
```

Use the `maxLeverage` and `marginTableId` fields together with [Risk Limits](/trading-rules/risk-limits.md). Do not hardcode symbol codes or leverage tiers in trading systems; listed markets and risk parameters can expand over time.

Example current maximum leverage values:

| Example Market | Max Leverage |
| -------------- | ------------ |
| BTCUSDC        | Up to 100x   |
| ETHUSDC        | Up to 100x   |
| XAUUSDC        | Up to 25x    |
| CLUSDC         | Up to 25x    |
| SOLUSDC        | Up to 25x    |
| XRPUSDC        | Up to 25x    |

## Leverage Adjustment Rules

**No open positions or orders:**

* Simply select your desired leverage. The system shows the corresponding maximum position size.

**With open positions or orders:**

* A risk notice is displayed when adjusting leverage.
* Increasing leverage: The initial margin requirement decreases; excess margin is released back to your available balance (isolated) or remains in the shared pool (cross).
* Decreasing leverage: Additional margin is required. If your available balance is insufficient, the adjustment will fail — you must either deposit more funds or reduce your position first.
* If the selected leverage is too low for your current position, the system will prompt you to increase leverage or add margin.


---

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

```
GET https://docs.afx.xyz/trading-rules/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.
