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

# Trading

How trading works on HyperLink, the prime broker for Hyperliquid: private order types, execution algorithms, leverage, margining, and liquidation.

Trade spot and perpetual markets privately in the HyperLink web app at [app.hyperlink.xyz](https://app.hyperlink.xyz). HyperLink is a prime broker for Hyperliquid: it routes your orders into Hyperliquid's liquidity while keeping your balances, positions, and orders off the public chain.

Trading mirrors Hyperliquid's, with the differences below. For order mechanics, margining, and liquidations not covered here, see Hyperliquid's docs (linked below).

## How HyperLink differs from Hyperliquid

| Aspect             | HyperLink                                                                                      | Hyperliquid                                                                                         |
| ------------------ | ---------------------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------------- |
| Privacy            | Balances, positions, and orders stay private inside the enclave.                               | Wallet-linked balances, positions, and orders are public.                                           |
| Order types        | Private Market, Limit, and [Pro order types](/trade/trading/pro-order-types.md).               | Native order types, TWAP, and order modification.                                                   |
| Max leverage       | Per-asset caps with a safety buffer below Hyperliquid's max tier.                              | Per-asset [max margin tiers](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/margin-tiers). |
| Maintenance margin | Half the initial margin at max leverage.                                                       | Same maintenance-margin model.                                                                      |
| Trading fees       | Lowest protocol-available rates through pooled volume and staking. See [Fees](/trade/fees.md). | Based on account volume and staking.                                                                |
| API keys           | Agent wallets with `readOnly` permissions and optional `ipWhitelist` allowlists.               | Agent wallets.                                                                                      |
| Account structure  | Pooled prime-broker account with OI/netting limits and a protocol-backed insurance fund.       | Individual account exposure.                                                                        |

{% hint style="warning" %}
Leverage increases both gains and losses. A leveraged position can be liquidated, wiping out the margin backing it. Size positions conservatively.
{% endhint %}

## Place an order

1. Select a market and **Buy / Long** or **Sell / Short**.
2. Pick an order type and enter size (and price for limit orders).
3. For perps, set leverage and review the shown margin mode before opening the position.
4. Review, submit, and sign the order in your wallet.

On Hyperliquid: [order types](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/order-types), [take-profit and stop-loss](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/take-profit-and-stop-loss-orders-tp-sl).

## Choose an order type

Use **Market** or **Limit** for direct execution. Open the **Pro** menu for advanced algorithms.

| Order type | How it executes                                                             | Main controls                                                                                 |
| ---------- | --------------------------------------------------------------------------- | --------------------------------------------------------------------------------------------- |
| **Market** | Submits the full size for immediate execution within your slippage setting. | Size, slippage, reduce-only for perps.                                                        |
| **Limit**  | Submits the full size at your chosen price.                                 | Price, size, `ALO`, `GTC`, or `IOC`, and reduce-only for perps.                               |
| **Pro**    | Runs the selected execution algorithm.                                      | [Scale, TWAP, VWAP, Chase, Chase TWAP, Iceberg, or Swarm](/trade/trading/pro-order-types.md). |

All order types preserve HyperLink account privacy. See [Pro Order Types](/trade/trading/pro-order-types.md) to compare algorithms, configure them, and keep browser-run orders active.

## Margining & liquidation

Margining mirrors Hyperliquid, applied to your account inside the enclave.

* **Max leverage:** HyperLink sets a per-asset cap derived from Hyperliquid's lowest-leverage margin tier. The trade panel shows the exact cap. For example, BTC is capped at 20x.
* **Margin mode:** each market uses the mode shown in the trade panel; open positions keep that mode until closed.
* **Liquidation:** if your account value falls below the position's maintenance margin, the position is liquidated.
* **Auto-deleveraging:** follows Hyperliquid's priority order — see the [FAQ](/more/faq.md#how-is-auto-deleveraging-adl-handled).

For mechanics, see Hyperliquid's [margining](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/margining) and [liquidations](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/liquidations).

## Open interest limit

HyperLink currently caps total open interest across all users at **5% of Hyperliquid's open interest per asset**. This limit will increase over time as HyperLink's risk system is validated.

## Open order limits

HyperLink limits how many resting orders an account can keep on the book at once. Pro orders count only their current resting orders, not unsubmitted size. Each resting Scale order counts separately.

The limit grows from 8 resting orders up to 250. You earn one additional slot for each $50k in weighted trading volume over the last 14 completed UTC days. Today's fills count toward the limit tomorrow.

Volume counts 1× for regular perps and 0.1× for growth-mode perps. Spot counts 2×, except pairs between quote assets, which count 0.4×.

| 14-day weighted volume | Resting orders |
| ---------------------- | -------------- |
| Under $50k             | 8              |
| $50k                   | 9              |
| $250k                  | 13             |
| $1M                    | 28             |
| $12.1M+                | 250            |

Accounts below $50k in weighted volume share a pool of 150 resting orders. Shared capacity limits can reject an order before your account reaches its own limit.

An order rejected for capacity returns `Too many open orders for this account right now.` Increase your 14-day weighted trading volume to raise the limit.

## Track your portfolio

Your portfolio shows spot balances, perpetual account value, unrealized PnL, margin used, withdrawable balance, open positions, open orders, and trade history. Everything is private: it is reconstructed from read queries that only your account can authorize. No third party, not even the operator, can see it.

To read the same data programmatically, query `POST /exchange` (`clearinghouseState`, `spotClearinghouseState`, `openOrders`, `userFills`) or stream it live over the [WebSocket API](/api/websocket.md). See [Exchange Methods](/api/exchange-methods.md) for schemas.

## Next steps

* [Pro Order Types](/trade/trading/pro-order-types.md): compare and run advanced execution algorithms.
* [Deposits & Withdrawals](/trade/deposits.md): fund or move funds.
* [API Quickstart](/api/setup.md): automate trading over the API.


---

# 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 by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.hyperlink.xyz/trade/trading.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

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.
