> 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/risk-limits.md).

# Risk Limits

AFX employs a tiered risk limit system that adjusts the maximum available leverage and maintenance margin rate (MMR) based on position size. As your position grows larger, the maximum leverage decreases and the maintenance margin requirement increases.

## How It Works

Each trading pair is assigned to a margin table. The table determines the leverage tiers and base MMR for that pair. Query live product metadata to map a market to its current `marginTableId`:

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

When a position's notional value crosses into a higher tier, the **entire position** is subject to the new tier's maximum leverage. If the current leverage exceeds the new tier's maximum, you will need to reduce leverage or close part of the position.

## Margin Table 1

Applies to: Not yet

| Position Notional (USDC) | Max Leverage | MMR   |
| ------------------------ | ------------ | ----- |
| 0 – 20,000,000           | 40x          | 1.25% |
| > 20,000,000             | 20x          | 1.25% |

## Margin Table 2

Example markets: XAUUSDC, CLUSDC, SOLUSDC, XRPUSDC

| Position Notional (USDC) | Max Leverage | MMR |
| ------------------------ | ------------ | --- |
| 0 – 2,000,000            | 25x          | 2%  |
| 2,000,000 – 5,000,000    | 20x          | 2%  |
| > 5,000,000              | 10x          | 2%  |

## Margin Table 3

Example markets: ZECUSDC, ONDOUSDC

| Position Notional (USDC) | Max Leverage | MMR  |
| ------------------------ | ------------ | ---- |
| 0 – 1,000,000            | 20x          | 2.5% |
| > 1,000,000              | 10x          | 2.5% |

## Margin Table 4

Example markets: equity, ETF, and other lower-leverage markets

| Position Notional (USDC) | Max Leverage | MMR |
| ------------------------ | ------------ | --- |
| 0 – 50,000               | 10x          | 5%  |
| > 50,000                 | 5x           | 5%  |

## Margin Table 5

Example markets: BTCUSDC, ETHUSDC

| Position Notional (USDC) | Max Leverage | MMR  |
| ------------------------ | ------------ | ---- |
| 0 – 1,000,000            | 100x         | 0.5% |
| 1,000,000 - 2,000,000    | 60x          | 0.5% |
| 2,000,000 - 20,000,000   | 40x          | 0.5% |
| > 20,000,000             | 20x          | 0.5% |

## Maintenance Margin Rate

The Maintenance Margin Rate (MMR) is the minimum margin percentage required to keep a position open. For the lowest tier of each type, the base MMR is shown in the table. Higher tiers have a proportionally higher effective MMR, calculated as:

```
Effective MMR = 1 / (2 × Max Leverage)
```

When the margin ratio (Maintenance Margin / Position Equity) reaches 100%, the position is liquidated. See [Liquidation](/trading-rules/liquidation.md) for details.


---

# 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/risk-limits.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.
