# Introduction

HyperLink is a prime broker for Hyperliquid: confidential trading through a secure enclave with Hyperliquid's liquidity, lowest fees, and provable solvency.

HyperLink is a prime broker for Hyperliquid. You trade through a shared smart contract from inside a secure enclave (TEE), so your balances, positions, and orders stay confidential, while your orders route into Hyperliquid's order book for full liquidity and execution. The goal is to give traders a VIP trading experience on Hyperliquid by pooling economies of scale, without leaving Hyperliquid's markets.

{% embed url="<https://www.youtube.com/watch?v=hyoh-3vy8qA>" %}

## What you get

| Feature                        | What it means                                                                                                                                                         |
| ------------------------------ | --------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Confidential trading**       | Balances, positions, and orders never touch the public chain. You trade through a shared contract, so only the contract is visible on Hyperliquid, never your wallet. |
| **Hyperliquid-compatible API** | `POST /exchange` mirrors Hyperliquid's API and EIP-712 signing. Point existing Hyperliquid tooling at the HyperLink base URL.                                         |
| **Lowest Hyperliquid fees**    | HyperLink pools volume and staking benefits so users can access the lowest Hyperliquid trading fee rates available to the protocol. See [Fees](/trade/fees).          |
| **Provable solvency**          | HyperLink commits reserve data on-chain. You can verify your own backing without revealing anyone's totals.                                                           |
| **Always exitable**            | You can withdraw on-chain even if HyperLink goes offline. Funds are never trapped.                                                                                    |

## How it works

You deposit on-chain, trade confidentially through the shared contract, and withdraw on-chain. Only the two on-chain steps are public.

1. **Deposit (public).** Transfer funds on HyperCore to HyperLink. Your balance is credited once the transfer confirms.
2. **Trade (confidential).** Sign orders client-side. The enclave validates them, then routes them into Hyperliquid through the shared contract. Your activity stays off the public chain.
3. **Withdraw (public).** Request a withdrawal; HyperLink submits it on-chain for you (gasless).

| Confidential (inside the enclave) | Public (on-chain on HyperCore) |
| --------------------------------- | ------------------------------ |
| Balances, positions, open orders  | Deposits                       |
| Order and fill history            | Withdrawals                    |

## Start here

* **Trade in the app:** [Getting Started](/start/getting-started), then open [app.hyperlink.xyz](https://app.hyperlink.xyz).
* **Build on the API:** [API Quickstart](/api/setup). HyperLink mirrors Hyperliquid's API and signing, so existing tooling works against the HyperLink base URL.
* **Trust model:** [Security](/security/security) and [Risks](/security/risks).


# Why Build HyperLink

Why HyperLink is building the prime brokerage layer for Hyperliquid: pooled volume for lower fees, private execution, and a familiar API for serious trading teams.

HyperLink is building the prime brokerage layer for Hyperliquid.

We started with a private trading gateway for algorithmic traders because that is where the need is clearest. Serious teams want Hyperliquid's liquidity, speed, API, and lowest protocol-available fees without broadcasting wallet-linked strategy, inventory, and execution flow.

Prime brokers give clients economies of scale by pooling activity to win lower fees than any single account could. HyperLink brings that to Hyperliquid, aggregating volume and HYPE staking across users to reach the lowest fee rates available to the protocol.

The broader goal is a Hyperliquid-native VIP trading experience: familiar API access, self-custodied exits, and infrastructure built by traders, for traders.

For users, HyperLink makes Hyperliquid feel like a professional venue. For the ecosystem, it helps bring more serious flow on-chain without leaving Hyperliquid's markets.


# Getting Started

Get started trading confidentially on HyperLink, the prime broker for Hyperliquid: connect a wallet, deposit funds, and place your first private trade.

Start trading confidentially on HyperLink, a prime broker for Hyperliquid. Connect a wallet, deposit, and trade in the web app at [app.hyperlink.xyz](https://app.hyperlink.xyz).

HyperLink routes your orders into Hyperliquid from inside a secure enclave, so your balances, positions, and open orders stay confidential. Deposits and withdrawals happen on HyperCore and are publicly visible.

## Before you start

* An EVM wallet (Rabby and similar).
* Funds on Hyperliquid (HyperCore) in an allowlisted token. The app shows the current deposit list. Deposits and withdrawals are gasless.

## Trading access

A wallet must meet one requirement:

* Have at least $5 million in weighted lifetime trading volume on Hyperliquid.
* Link a valid invite code.

## Start trading

1. Open [app.hyperlink.xyz](https://app.hyperlink.xyz) and connect your wallet.
2. **Deposit** an allowlisted token from your Hyperliquid balance. Your balance is credited once the transfer confirms. See [Fees](/trade/fees) for current minimums and withdrawal fees.
3. **Trade.** Open spot and perpetual positions, set leverage, and manage orders.
4. **Withdraw** any time in one step (gasless).

## In the app

| Do this                                              | Where                                     |
| ---------------------------------------------------- | ----------------------------------------- |
| Deposit and withdraw funds                           | [Deposits & Withdrawals](/trade/deposits) |
| Place orders, manage positions, track your portfolio | [Trading](/trade/trading)                 |
| Stake HYPE for hlHYPE                                | [Staking (hlHYPE)](/more/staking)         |

## Prefer to build?

Automate trading over the API. HyperLink mirrors Hyperliquid's API and EIP-712 signing, so you point a Hyperliquid client at the HyperLink base URL. See [API Quickstart](/api/setup).


# Deposits & Withdrawals

How to deposit and withdraw funds on HyperLink, the prime broker for Hyperliquid: gasless HyperCore transfers into and out of your trading account.

Fund your HyperLink account with a gasless HyperCore transfer, and withdraw the same way. HyperLink is a prime broker for Hyperliquid: deposits and withdrawals are public on HyperCore, while your balances, positions, and orders stay private.

## Before you start

* An EVM wallet (Rabby and similar) to sign with.
* A funded Hyperliquid (HyperCore) account holding an allowlisted token. The app shows the current deposit list. New to Hyperliquid? Fund your account first at [Hyperliquid](https://app.hyperliquid.xyz).

There is no deposit fee. Deposits and withdrawals are gasless. See [Fees](/trade/fees) for current minimums and withdrawal fees.

## Deposit

1. Open [app.hyperlink.xyz](https://app.hyperlink.xyz) and connect your wallet.
2. Click **Deposit**, select an allowlisted token, and enter an amount at or above the minimum.
3. Sign the transfer. The app submits a HyperCore transfer (the `sendAsset` action) from your Hyperliquid balance to HyperLink. It is gasless; no HYPE required.

Your balance is credited once the transfer confirms on HyperCore, then it is usable for trading.

## Withdraw

Withdrawals are gasless and submitted for you:

1. Open the app, go to **Withdraw**, and select the token and amount.
2. Sign the withdrawal request with your wallet to authenticate it.
3. HyperLink submits the transfer for you, and your funds return to your Hyperliquid account.

Withdrawals require your **master account** signature. Agent / API keys can trade and query but cannot withdraw. Withdrawals are rate-limited; if a withdrawal cannot complete, your balance is restored.

### Withdraw if HyperLink is offline

You do not need HyperLink to stay online to recover your funds. If HyperLink goes offline, you can still withdraw on-chain to your wallet. See [Security](/security/security).

## Troubleshooting

| Problem                         | Fix                                                                                |
| ------------------------------- | ---------------------------------------------------------------------------------- |
| Token not in the deposit dialog | It is not currently allowlisted. Choose a token shown in the dialog.               |
| Deposit fails on submit         | Make sure you hold a funded Hyperliquid (HyperCore) balance in the selected token. |
| Balance not showing             | Wait for HyperCore confirmation; balances update only after the transfer clears.   |

## Next steps

* [Trading](/trade/trading): place orders and track your account.
* [Getting Started](/start/getting-started): full onboarding.


# 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).               | 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). | 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 to split, schedule, or reprice an order.

| 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, or Iceberg](/trade/trading/pro-order-types). |

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

## Control out-of-limit execution

TWAP and VWAP support a Price Limit and configurable out-of-limit behavior. See [Control out-of-limit execution](/trade/trading/pro-order-types#control-out-of-limit-execution).

## Margining & liquidation

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

* **Max leverage:** HyperLink sets each asset's cap a step below Hyperliquid's: it trims a small safety buffer and rounds down to a multiple of 5. For example, BTC is 40x on Hyperliquid and 25x on HyperLink. The trade panel shows the exact cap.
* **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#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 order limits

HyperLink limits how many resting orders an account can keep on the book at once. Standing limit orders count toward this limit; market and `IOC` orders execute immediately and don't. 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.` Cancel or replace a resting order to free a slot, or retry when shared capacity is available.

## 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). See [Exchange Methods](/api/exchange-methods) for schemas.

## Next steps

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


# Pro Order Types

Compare HyperLink Pro order types and learn how to run Scale, TWAP, VWAP, Chase, Chase TWAP, and Iceberg in the web app.

Use Pro order types in the [HyperLink web app](https://app.hyperlink.xyz) to split, schedule, or reprice orders while preserving account privacy.

## Choose a Pro order type

Open the **Pro** menu in the trade panel, then choose an algorithm based on how you want the order to execute.

| Order type     | How it executes                                                                                                                                                                  | Main controls                                                                                        |
| -------------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------- |
| **Scale**      | Submits 2–20 limit orders at evenly spaced prices between the start and end prices. Size Skew controls how size changes across the range.                                        | Price range, total orders, Size Skew, `ALO`, `GTC`, or `IOC`, and reduce-only for perps.             |
| **TWAP**       | Splits the size into equal slices over 5 minutes to 24 hours.                                                                                                                    | Runtime, optional size randomization, optional Price Limit, and reduce-only for perps.               |
| **VWAP**       | Splits the size over 5 minutes to 24 hours and sizes each slice from the market's 7-day intraday volume profile. It falls back to equal slices when volume data is insufficient. | Runtime, optional size randomization, optional Price Limit, and reduce-only for perps.               |
| **Chase**      | Places a post-only order near the best available price, then reprices the unfilled size as the market moves.                                                                     | Optional Max Chase Distance in price or percent, and reduce-only for perps.                          |
| **Chase TWAP** | Works a timed schedule with a repricing post-only order. Attempts market sweeps for any shortfall every 5 clips and at the end.                                                  | Runtime, optional size randomization, optional Price Limit, slippage, and reduce-only for perps.     |
| **Iceberg**    | Submits one visible limit-order slice at a time at a fixed price. Submits the next slice only after the current one fully fills.                                                 | Price, total size, Tip size, optional size randomization, `ALO` or `GTC`, and reduce-only for perps. |

Scale submits its full set of orders when you sign. TWAP, VWAP, Chase, Chase TWAP, and Iceberg run in your browser, submitting orders as execution progresses.

## Keep browser-run orders active

{% hint style="warning" %}
Keep the app tab open and your wallet connected while a browser-run Pro order is active. Refreshing or closing the tab, switching wallets, connecting the same wallet in another browser, or disconnecting interrupts it. Any resting order stays open until filled or canceled. Cancel it under **Open Orders** if needed.
{% endhint %}

Track Pro orders under **Open Orders**. Use **Cancel** on an algorithm's row to stop it and attempt to cancel any resting order. If cancellation fails, check **Open Orders** for the remaining order. Recent finished algorithms appear under **Order History** for the current browser session.

## Run a Scale order

Select **Pro > Scale** to distribute a total order size across a price range.

1. Enter the total size and the **Start** and **End** prices. Buy prices must stay at or below the current mid price; sell prices must stay at or above it.
2. Enter **Total Orders** from 2 to 20.
3. Set **Size Skew**. `1.00` makes every order equal; `2.00` makes the order at the end price twice the size of the order at the start price.
4. Choose `ALO`, `GTC`, or `IOC`, then review and submit.

HyperLink submits every Scale order together. Each resting order counts separately toward your [open order limit](/trade/trading#open-order-limits).

## Run a TWAP

Select **Pro > TWAP** to divide the total size evenly over time.

1. Enter the total size and a **Running time** from 5 minutes to 24 hours. The minimum total order value is $100.
2. Optionally enable **Randomize** to vary individual slice sizes.
3. Optionally enable **Price Limit**, then choose how execution behaves while price is outside the limit.
4. Review the slice count and interval, then submit.

The app chooses the slice count from the runtime and order size. Slices are at least 30 seconds apart and must meet the minimum order value.

## Run a VWAP

Select **Pro > VWAP** to weight execution toward the market's historically busier periods.

1. Enter the total size and a **Running time** from 5 minutes to 24 hours. The minimum total order value is $100.
2. Optionally enable **Randomize** to vary individual slice sizes.
3. Optionally enable **Price Limit**, then choose how execution behaves while price is outside the limit.
4. Review the slice count and interval, then submit.

VWAP uses the market's 7-day intraday volume profile to size each slice. It falls back to equal slices when volume data is insufficient.

## Control out-of-limit execution

Enable **Price Limit** on TWAP or VWAP to set the worst price a slice may fill at. Set a maximum price for buys or a minimum price for sells.

Choose how the algorithm behaves while price is out of limit (OOL):

* Enable **Pause when out of limit** to stop submitting slices. Execution resumes when price returns within the limit, and the end time moves by the paused duration.
* Leave it disabled to skip out-of-limit slices and keep the original end time. When price returns, later slices can grow to catch up, up to 3x their planned size.

When Price Limit is enabled, unavailable price data also blocks execution. The limit still applies to each submitted slice.

## Run a Chase order

Select **Pro > Chase** to seek maker fills while following the best available price.

1. Enter the total size.
2. Optionally enable **Max Chase Distance** and enter the distance as a price or percentage. The maximum distance is 5% of the current price.
3. For perps, optionally enable **Reduce Only**, then submit.

Chase places a post-only order near the best price and reprices the unfilled size as the market moves. When Max Chase Distance is enabled, the order rests at the boundary instead of moving past it.

Run up to 5 Chase orders at once in the browser, with one per market across both directions. Canceling or modifying the resting order stops its Chase.

## Run a Chase TWAP

Select **Pro > Chase TWAP** to spread execution over time while seeking maker fills before taking liquidity.

1. Enter the total size and a **Running time** from 5 minutes to 24 hours. The minimum total order value is $100.
2. Optionally enable **Randomize** to vary the scheduled size increments.
3. Optionally enable **Price Limit**: a maximum fill price for buys or a minimum for sells. Review your slippage setting for market sweeps.
4. Review the clip count and interval, then submit.

A clip is one interval in the schedule. Clips are at least 1 minute apart; smaller orders use fewer, longer clips to meet the minimum order value. Unfilled size carries forward. Every 5 clips and at the end, the algorithm cancels its resting order and attempts an `IOC` market sweep for the amount still due. Sweeps can incur taker fees.

Price Limit applies to both the post-only order and market sweeps. Chase TWAP does not have **Pause when out of limit**: the resting order is capped at the limit and the schedule keeps its original end time. Price limits, slippage, or order rejections can leave part or all of the order unfilled.

For example, a $1,000 order over 10 minutes with Randomize disabled schedules 10 clips. At the end of clip 5, a sweep attempts to fill any shortfall against the first half of the target size. At the end of clip 10, a final sweep attempts the remaining size within your price and slippage limits.

Run up to 5 Chase TWAPs at once in the browser, with one per market across both directions. Canceling or modifying the resting order stops its Chase TWAP.

## Run an Iceberg

Select **Pro > Iceberg** to work a larger limit order while exposing only the current slice to the order book.

1. Enter the limit price and total size.
2. Enter **Tip size** in the same unit as the total size. The tip must be worth at least $10 at the limit price and cannot exceed the total size.
3. Choose `ALO` for post-only slices or `GTC` to allow immediate fills when the price crosses the book. `IOC` is not available.
4. Optionally enable **Randomize** to vary slice sizes around the tip, then review the estimated slice count and submit.

The form allows up to 100 slices, accounting for smaller randomized tips. Randomize applies up to ±5% variation before size rounding and minimum-order adjustments. A small remainder can be merged into the preceding slice, so Tip size is not a strict maximum. Each slice uses the same limit price; partially filled slices stay open until fully filled.

For example, a 1 BTC order at a $100,000 limit price with a 0.1 BTC tip and Randomize disabled submits ten 0.1 BTC slices, one after another as each fills.

Run up to 5 Icebergs at once in the browser, with one per market across both directions. Canceling or modifying the visible slice stops its Iceberg.

Want another execution algorithm or order type? Join [HyperLink Discord](https://discord.gg/hyperlink) and post your request in the #feedback channel.

## Next steps

* [Trading](/trade/trading): learn about margining, liquidation, order limits, and portfolio tracking.
* [Fees](/trade/fees): review maker and taker fees.


# Fees

HyperLink trading, deposit, and withdrawal fees, including volume waivers and referral cashback.

Trading through HyperLink may include a Hyperliquid trading fee, a HyperLink fee, and an optional application builder fee. HyperLink does not add a spread.

## Hyperliquid trading fees

HyperLink pools trading volume and staking discounts to lower your Hyperliquid fees.

Example base rates at Hyperliquid tier 3 (over $100M in pooled 14d weighted volume) with a 30% staking discount:

| Market             |     Maker |    Taker | HyperLink savings (maker / taker) |
| ------------------ | --------: | -------: | --------------------------------: |
| Spot               |   0.7 bps |  2.8 bps |                     3.3 / 4.2 bps |
| Perp               |  0.28 bps |  2.1 bps |                    1.22 / 2.4 bps |
| Perp (growth mode) | 0.028 bps | 0.21 bps |                  0.122 / 0.24 bps |
| Stable pair        |  0.14 bps | 0.56 bps |                   0.66 / 0.84 bps |

Savings compare with Hyperliquid tier 0 without staking or referral discounts. Rates and savings exclude HyperLink and application fees. Actual rates vary with pooled volume, staking, HIP-3 deployer fees, and aligned-quote discounts; see [Hyperliquid fees](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/fees).

## HyperLink fee

HyperLink charges **0.5 bp (0.005%)**, or **$0.50 per $10,000 traded**, on fills from eligible orders.

| Order                                            | HyperLink fee |
| ------------------------------------------------ | ------------: |
| Perp, excluding growth mode and post-only        |        0.5 bp |
| Spot sell, excluding post-only                   |        0.5 bp |
| Growth-mode Perp, post-only (`Alo`), or spot buy |          None |

Growth-mode markets pay no HyperLink fee; Hyperliquid trading fees still apply. A maker fill is not automatically exempt: use post-only (`Alo`) to avoid the HyperLink fee.

Example Perp taker fee: **2.1 + 0.5 = 2.6 bps**, saving **1.9 bps** versus tier 0 (4.5 bps), before cashback or application fees.

Linking a referral code earns 10% cashback on eligible HyperLink fees, subject to the [Referral Program](/trade/referral-program) limits.

## Volume waiver

HyperLink trading and withdrawal fees are waived above **$1M in 14d weighted volume**. Hyperliquid and optional application fees still apply.

Perps count 1×, spot 2×, and growth-mode Perps 0.1×. These weights affect volume thresholds only; fees use actual trade amounts.

## Application builder fees

Applications may charge a separate per-order builder fee that you explicitly approve. See [Builder Codes](/api/builder-codes).

## Deposit and withdrawal fees

| Action     | Fee                                                                              |
| ---------- | -------------------------------------------------------------------------------- |
| Deposit    | None                                                                             |
| Withdrawal | 5 bps (0.05%), capped at $1; waived above the [volume threshold](#volume-waiver) |

Deposits and withdrawals are gasless. Minimum deposit or withdrawal is $1.


# Referral Program

HyperLink Referral Program rewards: earn fee cashback with a referral code or earn commissions from traders you refer directly.

Link a referral code with an available slot to earn cashback on eligible HyperLink fees, or register your own code to earn commissions from traders you refer directly.

Rewards come only from HyperLink fees. Fee-exempt trades, including growth-mode Perps, still count toward weighted volume but generate no cashback or commission. See [Fees](/trade/fees) for eligibility and waivers.

**Weighted volume:** Perps count 1×, spot 2×, and growth-mode Perps 0.1×. All volume thresholds use these weights; fees and rewards use actual trade amounts.

Reward periods start when the code is linked, or at program launch for codes linked earlier. Only volume after that start counts toward cashback limits and commission tiers.

## Trader cashback

Earn **10% cashback** on eligible HyperLink fees until the earlier of:

* 90 days from the reward period's start; or
* $100M in cumulative volume during that period.

HyperLink charges the full fee on the fill and adds cashback to your claimable rewards. Cashback does not apply to Hyperliquid or application fees.

{% hint style="warning" %}
Once you link a referral code, you cannot switch to another.
{% endhint %}

## Referrer commissions

Earn commissions from each direct referral for **365 days** from their reward start date. Your tier depends on your referrals' combined 30d weighted volume.

| Tier    | 30d referred volume | Fee share after cashback |
| ------- | ------------------: | -----------------------: |
| Partner |             < $100M |                      10% |
| Pro     | ≥ $100M and < $500M |                      15% |
| Elite   |             ≥ $500M |                      20% |

Only direct referrals generate commissions. There are no downstream or multi-level commissions.

For example, a $50 HyperLink fee produces $5 cashback and a **$4.50 Partner commission** (10% of the remaining $45). After cashback ends, commissions apply to the full fee until the 365-day period ends.

## Register a referral code

Trade at least $10,000 in weighted lifetime volume on HyperLink, then submit `registerReferrer`. Choose an unused code of 3–16 ASCII letters or digits; codes are uppercased. See [Referrals](/api/exchange-methods#referrals) for actions and code capacity.

## Track and claim rewards

Reward totals include referral rewards and any [builder-code rewards](/api/builder-codes) earned by the same account.

Use `claimRewards` to claim rewards to your HyperLink spot balance in the same token. Each exchange/token reward balance must exceed one whole token; smaller balances remain unclaimed. See [Claim rewards](/api/builder-codes#claim-rewards) for the signed request.


# API Quickstart

Quickstart for HyperLink's API: base URLs, request signing, and a working code example to start trading Hyperliquid markets programmatically today.

HyperLink mirrors Hyperliquid's `/exchange` action format and EIP-712 signing, so point an existing Hyperliquid trading client at the HyperLink base URL.

## Quickstart

1. Create an agent wallet, which is your API key, in the web app or with `approveAgent`. See [Authentication & Keys](/api/api-keys).
2. Store the agent private key in `AGENT_PRIVATE_KEY`.
3. Install the HyperLink Python SDK and send a signed `/exchange` request.

## Base URL

* **HTTP:** `https://api.hyperlink.xyz`
* **WebSocket:** `wss://api.hyperlink.xyz/ws`

## Endpoints

| Method | Path        | Purpose                                                                                 |
| ------ | ----------- | --------------------------------------------------------------------------------------- |
| `POST` | `/exchange` | Signed trading actions and private read queries.                                        |
| `GET`  | `/ws`       | WebSocket subscriptions and signed `post` actions. See [WebSocket API](/api/websocket). |

## Request envelope

SDKs build the `/exchange` envelope for you: `action`, `signature`, `nonce`, plus optional `expiresAfter` and `vaultAddress`. There are no bearer tokens or API secrets; authentication is the signature on each request.

For raw request fields, response shapes, and signed read query schemas, see [Exchange Methods](/api/exchange-methods). EIP-712 signatures use Hyperliquid-compatible signing chainIds, not the HyperEVM network chainId `999`; see [Authentication & Keys](/api/api-keys).

## First request

Use the HyperLink Python SDK. It is a minimal fork of the Hyperliquid Python SDK with HyperLink defaults and signed private reads. The import paths still use `hyperliquid.*`.

HyperLink requires a client order ID (`cloid`) on every order. Pass it through the SDK's `cloid` parameter or the raw order action's `c` field.

```bash
pip install hyperlink-python-sdk
```

```python
import os
from eth_account import Account
from hyperliquid.exchange import Exchange
from hyperliquid.utils.types import Cloid

# Your API key is the agent private key. Keep it in an env var, never hardcode.
agent = Account.from_key(os.environ["AGENT_PRIVATE_KEY"])

# The HyperLink SDK defaults to the HyperLink base URL. Set it explicitly if your client code passes a URL.
exchange = Exchange(agent, base_url="https://api.hyperlink.xyz")

# Place a resting limit buy: 0.1 BTC at 50000, good-till-cancel.
result = exchange.order(
    name="BTC",
    is_buy=True,
    sz=0.1,
    limit_px=50000,
    order_type={"limit": {"tif": "Gtc"}},
    cloid=Cloid.from_str("0x1234567890abcdef1234567890abcdef"),  # required
)
print(result)
```

For TypeScript and longer SDK examples, see [SDKs](/api/sdks).

## Migrate from Hyperliquid

Trading actions need one change: set the base URL to HyperLink. Order structures, asset indexes, and EIP-712 signing stay Hyperliquid-compatible. The [HyperLink Python SDK PR](https://github.com/hyperlink-xyz/hyperlink-python-sdk/pull/1) shows the minimal changes needed to add HyperLink support to a Hyperliquid SDK fork.

| Need                  | What to do                                                                                    |
| --------------------- | --------------------------------------------------------------------------------------------- |
| Trading actions       | Use the HyperLink Python SDK, or keep your Hyperliquid client and set the HyperLink base URL. |
| Private account reads | Send signed `POST /exchange` queries instead of public `/info` account-state calls.           |
| Public market data    | Keep using Hyperliquid public `/info` for `meta`, `allMids`, `l2Book`, and `candleSnapshot`.  |

The HyperLink Python SDK adds helpers for signed private reads. In other SDKs, build those as raw signed requests, or see [SDKs](/api/sdks). For every signed read query and schema, see [Exchange Methods](/api/exchange-methods).

## Next steps

* [Authentication & Keys](/api/api-keys): create agent keys and sign requests.
* [SDKs](/api/sdks): Python and TypeScript client examples.
* [Exchange Methods](/api/exchange-methods): actions, queries, and schemas.
* [WebSocket API](/api/websocket): real-time subscriptions.


# Authentication & Keys

How HyperLink API keys work: agent wallets, EIP-712 signing, permissions, and how to create or revoke keys for programmatic Hyperliquid trading access.

HyperLink authenticates every request with an **EIP-712 signature**, not bearer tokens or API secrets. An API key is an approved **agent wallet**: a keypair your master account authorizes to sign trading actions and read queries on its behalf.

HyperLink is a prime broker for Hyperliquid. It mirrors Hyperliquid's agent model and EIP-712 signing, so existing Hyperliquid tooling works against the HyperLink base URL. For a working signed-request example, see [API Quickstart](/api/setup).

## How it works

The agent private key signs each request; the enclave verifies the agent is approved by your master account, then executes. There are no shared secrets.

## Create an API key

### In the web app

1. Connect your master wallet to the [web app](https://app.hyperlink.xyz).
2. Go to **Settings → API** and click **Generate**.
3. Copy and securely store the private key. It is shown **once** and cannot be recovered.

### With the approveAgent action

Generate the agent keypair locally, then approve its address with an `approveAgent` action signed by your **master account** (agents cannot approve other agents). The full schema is in [Exchange Methods](/api/exchange-methods).

## Limits and permissions

| Limit                      | Value         |
| -------------------------- | ------------- |
| Named agents per account   | 5             |
| Unnamed agents per account | 1             |
| Agent name length          | 64 characters |

Agents **can** place and cancel orders, update leverage and margin, and run read queries. Agents **cannot** withdraw funds, approve or revoke other agents, or run master-account transfer actions such as `sendAsset` and `usdClassTransfer`. Those require your master account's own user-signed signature. A `readOnly` agent can query but not trade.

## Signing

Each request to `/exchange` (and each WebSocket subscription) carries an EIP-712 signature plus a millisecond `nonce`. There are two signing domains; an SDK selects the right one per action.

| Scheme            | EIP-712 domain               | `chainId` | Used for                                                                   | Signed by               |
| ----------------- | ---------------------------- | --------- | -------------------------------------------------------------------------- | ----------------------- |
| Agent (L1 action) | `Exchange`                   | `1337`    | Orders, cancels, margin, leverage, agent transfers, queries, subscriptions | Agent or master account |
| User-signed       | `HyperliquidSignTransaction` | `42161`   | `withdraw`, `approveAgent`, `usdClassTransfer`, `sendAsset`                | Master account only     |

Both domains use `version` `"1"` and `verifyingContract` `0x0000000000000000000000000000000000000000`.

{% hint style="warning" %}
These signing `chainId` values (`1337`, `42161`) are Hyperliquid-compatible EIP-712 domain values, **not** the HyperEVM network chainId (`999`). Use the network chainId only for direct on-chain contract calls, such as staking.
{% endhint %}

**Nonces:** set `nonce` to the current Unix time in milliseconds. Each is single-use per signer; a nonce older than 2 days or more than 1 day in the future is rejected.

{% hint style="info" %}
Sign with an SDK, not by hand. A bad signature recovers a different address and fails with an unhelpful `"User or API Wallet … does not exist"`. The HyperLink [Python SDK](https://github.com/hyperlink-xyz/hyperlink-python-sdk) and Hyperliquid [TypeScript SDK](https://github.com/nktkas/hyperliquid) implement both schemes correctly, and the Hyperliquid [signing reference](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/signing) applies unchanged.
{% endhint %}

Common causes of signing failures: wrong scheme for the action, field-order or encoding mismatches, trailing zeroes on numeric string fields, or upper-case address characters (lowercase addresses before signing).

## Revoke an API key

1. Open **Settings → API** in the [web app](https://app.hyperlink.xyz).
2. Find the agent by name or address.
3. Click **Revoke** and sign with your **master wallet**.

A revoked agent can no longer access your account.

## Next steps

* [API Quickstart](/api/setup): base URLs, envelope, and a working example.
* [Exchange Methods](/api/exchange-methods): actions, queries, and schemas.
* [WebSocket API](/api/websocket): real-time subscriptions.


# Exchange Methods

Reference for HyperLink's unified POST /exchange endpoint: request format, action families, and Hyperliquid-compatible order and query examples used.

Every HyperLink action and read query is a `POST /exchange` request. There is no separate `/info` host. This page covers the request format and the action families; the pages below it list each method's full request and response schema.

HyperLink is a prime broker for Hyperliquid and mirrors Hyperliquid's `/exchange` action format and signing, so existing trading tooling can point at the HyperLink base URL.

## Request format

Each request uses the standard [envelope](/api/setup#request-envelope): an `action`, an EIP-712 `signature`, and a millisecond `nonce`. Two signing domains apply: agent-signed for trading and queries, user-signed for withdrawals and transfers. See [Authentication & Keys](/api/api-keys).

* **Write actions** return a status wrapper.
* **Read queries** return raw JSON.

## Example: place a limit order

A GTC limit buy of `0.1` of asset index `0`, agent-signed. Order fields use Hyperliquid's short-form names (`a` asset, `b` buy, `p` price, `s` size, `r` reduceOnly, `t` type, `c` client order id). HyperLink **requires** a `c` (cloid) on every order.

```bash
curl -X POST https://api.hyperlink.xyz/exchange \
  -H "Content-Type: application/json" \
  -d '{
  "action": {
    "type": "order",
    "orders": [
      { "a": 0, "b": true, "p": "50000", "s": "0.1", "r": false, "t": { "limit": { "tif": "Gtc" } }, "c": "0x1234567890abcdef1234567890abcdef" }
    ],
    "grouping": "na"
  },
  "nonce": 1712140800000,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}'
```

A resting order returns its order ID:

```json
{ "status": "ok", "response": { "type": "order", "data": { "statuses": [ { "resting": { "oid": 77738308 } } ] } } }
```

Larger client batches are accepted and split automatically; each internal batch carries up to **256 orders**. HyperLink enforces no minimum order size; Hyperliquid enforces a notional minimum (\~$10). See the **order** method below for the full schema.

## Action families

Each method below has its full schema and examples.

### Trading

Modify replaces a resting order in place: same asset, same side, new price or size. To change side or asset, cancel and place a new order.

| Action          | Purpose                                                   |
| --------------- | --------------------------------------------------------- |
| `order`         | Place limit or trigger orders.                            |
| `modify`        | Reprice or resize one resting order.                      |
| `batchModify`   | Reprice or resize up to 100 resting orders in one action. |
| `cancel`        | Cancel resting orders by order ID (`oid`).                |
| `cancelByCloid` | Cancel resting orders by client order ID (`cloid`).       |

Both modify actions target a resting order by `oid` or `cloid`, and reject the replacement unless:

* It carries its own `c`, distinct from the target's `cloid`.
* It is `Gtc` or `Alo`. Replacements rest post-only, so one that would cross the book is rejected, not filled.
* It is not a trigger order, an `Ioc`, or a builder-code order, and omits `a` (always place).
* Any reduce-only leg is a perp and stays within the target's remaining size.

One `batchModify` carries up to 100 entries, all spot or all perp, with no duplicate targets or replacement `cloid`s. Each entry resolves independently: a rejected leg returns its own error in `statuses` while the rest proceed.

### Margin

Leverage is **per-asset** (no single global cap); margin mode cannot change with an open position.

| Action                    | Purpose                                    |
| ------------------------- | ------------------------------------------ |
| `updateLeverage`          | Set leverage and margin mode (`is_cross`). |
| `updateIsolatedMargin`    | Add or remove isolated margin.             |
| `topUpIsolatedOnlyMargin` | Set isolated margin to a target leverage.  |

### Transfers & withdrawals

Withdrawals are **user-signed** and gasless: you sign the request, HyperLink submits it on-chain for you. Agents cannot withdraw. See [Deposits & Withdrawals](/trade/deposits).

| Action             | Signing | Purpose                                                                 |
| ------------------ | ------- | ----------------------------------------------------------------------- |
| `withdraw`         | User    | Request a gasless on-chain withdrawal.                                  |
| `sendAsset`        | User    | Transfer funds between your own DEX balances (spot, perp).              |
| `usdClassTransfer` | User    | Move funds between spot and perp balances (legacy; prefer `sendAsset`). |
| `agentSendAsset`   | Agent   | Transfer assets with agent authorization.                               |

### Builder codes

Applications routing orders can charge a user-approved per-order fee. See [Builder Codes](/api/builder-codes).

| Action              | Signing | Purpose                                                                               |
| ------------------- | ------- | ------------------------------------------------------------------------------------- |
| `approveBuilderFee` | User    | Approve a maximum builder fee rate for a builder.                                     |
| `claimRewards`      | Agent   | Claim builder fees, referral cashback, and referral commissions to your spot balance. |

### Referrals

`setReferrer` links another account's referral code and grants trading access. Linking is permanent and requires an available slot. Accounts with at least $5 million in weighted lifetime Hyperliquid volume qualify without a code.

After $10,000 HyperLink weighted volume, use `registerReferrer` to create a code with 3–16 ASCII letters or digits. Codes are uppercased and start with 10 slots. Query `referral` for `cap` and `remaining`.

| Action             | Purpose                             |
| ------------------ | ----------------------------------- |
| `setReferrer`      | Bind the signer to a referral code. |
| `registerReferrer` | Register a referral code.           |

### Queries (raw JSON, agent-signed)

| Query                         | Returns                                                                |
| ----------------------------- | ---------------------------------------------------------------------- |
| `clearinghouseState`          | Perp positions, margin summary, withdrawable.                          |
| `spotClearinghouseState`      | Spot balances.                                                         |
| `openOrders`                  | Open orders.                                                           |
| `userFills`                   | Recent fills.                                                          |
| `portfolio`                   | Account value and PnL history.                                         |
| `userHistoricalOrders`        | Historical orders.                                                     |
| `userFundings`                | Funding payments.                                                      |
| `userNonFundingLedgerUpdates` | Deposits, withdrawals, transfers.                                      |
| `userRateLimit`               | Rate-limit usage.                                                      |
| `activeAssetData`             | Per-asset leverage and margin context.                                 |
| `extraAgents`                 | Approved agents.                                                       |
| `maxBuilderFee`               | Approved builder fee rate for one builder, in tenths of a basis point. |
| `approvedBuilders`            | Builder addresses the account has approved.                            |
| `referral`                    | Referral state.                                                        |

## Streaming

For real-time data and signed actions over a persistent connection, use the [WebSocket API](/api/websocket) instead of polling.


# order

## POST /exchange

> order

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - order","version":"1.0.0"},"tags":[{"name":"order"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["order"],"summary":"order","operationId":"exchange_order","requestBody":{"description":"Signed `order` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/BulkOrderRequest","description":"Submit one or more orders"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["order"]}}}],"description":"Submit one or more orders"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"BulkOrderRequest":{"type":"object","description":"Bulk order submission containing multiple orders.","required":["orders","grouping"],"properties":{"builder":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/BuilderInfo","description":"Optional downstream builder attribution bound by the user's L1 signature."}]},"grouping":{"type":"string","description":"Grouping strategy: \"na\" (no grouping), \"positionTpsl\" (position TP/SL)"},"orders":{"type":"array","items":{"$ref":"#/components/schemas/OrderRequest"},"description":"List of orders to submit"}}},"BuilderInfo":{"type":"object","description":"Builder fee information for MEV-protected orders.","required":["b","f"],"properties":{"b":{"type":"string","description":"Builder address (must be lowercase hex)"},"f":{"type":"integer","format":"int32","description":"Fee in tenths of a basis point (for example, 10 = 1 bp = 0.01%).","minimum":0}}},"OrderRequest":{"type":"object","description":"A request to place one or more orders.","required":["a","b","p","s","t","c"],"properties":{"a":{"type":"integer","format":"int32","description":"Asset index (e.g., 0 for BTC-PERP)","minimum":0},"b":{"type":"boolean","description":"True for buy, false for sell"},"c":{"type":"string","description":"Client order ID for tracking"},"p":{"type":"string","description":"Limit price as string (e.g., \"50000.5\")"},"r":{"type":"boolean","description":"If true, only reduce existing position"},"s":{"type":"string","description":"Order size as string (e.g., \"0.1\")"},"t":{"$ref":"#/components/schemas/Order","description":"Order type (limit or trigger)"}}},"Order":{"oneOf":[{"type":"object","description":"Standard limit order","required":["limit"],"properties":{"limit":{"$ref":"#/components/schemas/Limit","description":"Standard limit order"}}},{"type":"object","description":"Trigger/stop order","required":["trigger"],"properties":{"trigger":{"$ref":"#/components/schemas/Trigger","description":"Trigger/stop order"}}}],"description":"Order type: either a limit order or a trigger (stop) order."},"Limit":{"type":"object","description":"Limit order parameters.","required":["tif"],"properties":{"tif":{"type":"string","description":"Time in force: \"Ioc\" (immediate-or-cancel), \"Gtc\" (good-til-cancel), \"Alo\"\n(add-liquidity-only)"}}},"Trigger":{"type":"object","description":"Trigger order parameters (stop-loss / take-profit).","required":["isMarket","triggerPx","tpsl"],"properties":{"isMarket":{"type":"boolean","description":"If true, execute as market order when triggered"},"tpsl":{"type":"string","description":"Type: \"tp\" (take-profit) or \"sl\" (stop-loss)"},"triggerPx":{"type":"string","description":"Price at which to trigger the order"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# modify

## POST /exchange

> modify

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - modify","version":"1.0.0"},"tags":[{"name":"modify"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["modify"],"summary":"modify","operationId":"exchange_modify","requestBody":{"description":"Signed `modify` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/ModifyRequest","description":"Replace one existing order"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["modify"]}}}],"description":"Replace one existing order"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"ModifyRequest":{"type":"object","description":"Single-order modify request.","required":["oid","order"],"properties":{"a":{"type":["boolean","null"],"description":"Present only when true. Hyperlink rejects this mode."},"oid":{"$ref":"#/components/schemas/OidOrCloid","description":"Existing Hyperliquid order ID or client order ID."},"order":{"$ref":"#/components/schemas/ModifyOrderWire","description":"Replacement order."}}},"OidOrCloid":{"oneOf":[{"type":"integer","format":"int64","minimum":0},{"type":"string"}],"description":"Hyperliquid order identifier used by modify actions."},"ModifyOrderWire":{"type":"object","description":"Replacement order encoded with Hyperliquid's canonical short keys.","required":["a","b","p","s","r","t"],"properties":{"a":{"type":"integer","format":"int32","description":"Asset index.","minimum":0},"b":{"type":"boolean","description":"True for buy, false for sell."},"c":{"type":["string","null"],"description":"Optional replacement client order ID."},"p":{"type":"string","description":"Limit price."},"r":{"type":"boolean","description":"Whether the replacement is reduce-only."},"s":{"type":"string","description":"Order size."},"t":{"$ref":"#/components/schemas/Order","description":"Replacement order type."}}},"Order":{"oneOf":[{"type":"object","description":"Standard limit order","required":["limit"],"properties":{"limit":{"$ref":"#/components/schemas/Limit","description":"Standard limit order"}}},{"type":"object","description":"Trigger/stop order","required":["trigger"],"properties":{"trigger":{"$ref":"#/components/schemas/Trigger","description":"Trigger/stop order"}}}],"description":"Order type: either a limit order or a trigger (stop) order."},"Limit":{"type":"object","description":"Limit order parameters.","required":["tif"],"properties":{"tif":{"type":"string","description":"Time in force: \"Ioc\" (immediate-or-cancel), \"Gtc\" (good-til-cancel), \"Alo\"\n(add-liquidity-only)"}}},"Trigger":{"type":"object","description":"Trigger order parameters (stop-loss / take-profit).","required":["isMarket","triggerPx","tpsl"],"properties":{"isMarket":{"type":"boolean","description":"If true, execute as market order when triggered"},"tpsl":{"type":"string","description":"Type: \"tp\" (take-profit) or \"sl\" (stop-loss)"},"triggerPx":{"type":"string","description":"Price at which to trigger the order"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# batchModify

## POST /exchange

> batchModify

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - batchModify","version":"1.0.0"},"tags":[{"name":"batchModify"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["batchModify"],"summary":"batchModify","operationId":"exchange_batchModify","requestBody":{"description":"Signed `batchModify` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/BatchModifyRequest","description":"Replace one or more existing orders"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["batchModify"]}}}],"description":"Replace one or more existing orders"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"BatchModifyRequest":{"type":"object","description":"Multi-order modify request.","required":["modifies"],"properties":{"a":{"type":["boolean","null"],"description":"Present only when true. Hyperlink rejects this mode."},"modifies":{"type":"array","items":{"$ref":"#/components/schemas/ModifyOrderRequest"},"description":"Order replacements submitted in one Hyperliquid action."}}},"ModifyOrderRequest":{"type":"object","description":"One order replacement within a modify action.","required":["oid","order"],"properties":{"oid":{"$ref":"#/components/schemas/OidOrCloid","description":"Existing Hyperliquid order ID or client order ID."},"order":{"$ref":"#/components/schemas/ModifyOrderWire","description":"Replacement order."}}},"OidOrCloid":{"oneOf":[{"type":"integer","format":"int64","minimum":0},{"type":"string"}],"description":"Hyperliquid order identifier used by modify actions."},"ModifyOrderWire":{"type":"object","description":"Replacement order encoded with Hyperliquid's canonical short keys.","required":["a","b","p","s","r","t"],"properties":{"a":{"type":"integer","format":"int32","description":"Asset index.","minimum":0},"b":{"type":"boolean","description":"True for buy, false for sell."},"c":{"type":["string","null"],"description":"Optional replacement client order ID."},"p":{"type":"string","description":"Limit price."},"r":{"type":"boolean","description":"Whether the replacement is reduce-only."},"s":{"type":"string","description":"Order size."},"t":{"$ref":"#/components/schemas/Order","description":"Replacement order type."}}},"Order":{"oneOf":[{"type":"object","description":"Standard limit order","required":["limit"],"properties":{"limit":{"$ref":"#/components/schemas/Limit","description":"Standard limit order"}}},{"type":"object","description":"Trigger/stop order","required":["trigger"],"properties":{"trigger":{"$ref":"#/components/schemas/Trigger","description":"Trigger/stop order"}}}],"description":"Order type: either a limit order or a trigger (stop) order."},"Limit":{"type":"object","description":"Limit order parameters.","required":["tif"],"properties":{"tif":{"type":"string","description":"Time in force: \"Ioc\" (immediate-or-cancel), \"Gtc\" (good-til-cancel), \"Alo\"\n(add-liquidity-only)"}}},"Trigger":{"type":"object","description":"Trigger order parameters (stop-loss / take-profit).","required":["isMarket","triggerPx","tpsl"],"properties":{"isMarket":{"type":"boolean","description":"If true, execute as market order when triggered"},"tpsl":{"type":"string","description":"Type: \"tp\" (take-profit) or \"sl\" (stop-loss)"},"triggerPx":{"type":"string","description":"Price at which to trigger the order"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# cancelByCloid

## POST /exchange

> cancelByCloid

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - cancelByCloid","version":"1.0.0"},"tags":[{"name":"cancelByCloid"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["cancelByCloid"],"summary":"cancelByCloid","operationId":"exchange_cancelByCloid","requestBody":{"description":"Signed `cancelByCloid` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/BulkCancelCloidRequest","description":"Cancel orders by client order ID"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["cancelByCloid"]}}}],"description":"Cancel orders by client order ID"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"BulkCancelCloidRequest":{"type":"object","description":"Bulk cancel by client order IDs.","required":["cancels"],"properties":{"cancels":{"type":"array","items":{"$ref":"#/components/schemas/CancelRequestCloid"},"description":"List of orders to cancel by cloid"},"f":{"type":["boolean","null"],"description":"Hyperliquid fast cancel flag, encoded as action-level `f`."}}},"CancelRequestCloid":{"type":"object","description":"Cancel order by client order ID.","required":["asset","cloid"],"properties":{"asset":{"type":"integer","format":"int32","description":"Asset index","minimum":0},"cloid":{"type":"string","description":"Client order ID to cancel"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# cancel

## POST /exchange

> cancel

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - cancel","version":"1.0.0"},"tags":[{"name":"cancel"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["cancel"],"summary":"cancel","operationId":"exchange_cancel","requestBody":{"description":"Signed `cancel` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/BulkCancelRequest","description":"Cancel orders by order ID"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["cancel"]}}}],"description":"Cancel orders by order ID"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"BulkCancelRequest":{"type":"object","description":"Bulk cancel by order IDs.","required":["cancels"],"properties":{"cancels":{"type":"array","items":{"$ref":"#/components/schemas/CancelRequest"},"description":"List of orders to cancel by oid"},"f":{"type":["boolean","null"],"description":"Hyperliquid fast cancel flag, encoded as action-level `f`."}}},"CancelRequest":{"type":"object","description":"Cancel order by order ID.\nUses short field names to match Hyperliquid wire format.","required":["a","o"],"properties":{"a":{"type":"integer","format":"int32","description":"Asset index","minimum":0},"o":{"type":"integer","format":"int64","description":"Order ID to cancel","minimum":0}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# withdraw

## POST /exchange

> withdraw

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - withdraw","version":"1.0.0"},"tags":[{"name":"withdraw"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["withdraw"],"summary":"withdraw","operationId":"exchange_withdraw","requestBody":{"description":"Signed `withdraw` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/WithdrawRequest","description":"Withdraw funds from the enclave"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["withdraw"]}}}],"description":"Withdraw funds from the enclave"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"WithdrawRequest":{"type":"object","description":"Withdraw funds from the Hyperlink enclave.","required":["token","amount"],"properties":{"amount":{"type":"string","description":"Amount to withdraw as a human decimal string in Hyperliquid token units (e.g. \"1.5\")"},"to":{"type":["string","null"],"description":"Optional destination address (defaults to signer)"},"token":{"type":"string","description":"Token address or symbol to withdraw"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# approveAgent

## POST /exchange

> approveAgent

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - approveAgent","version":"1.0.0"},"tags":[{"name":"approveAgent"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["approveAgent"],"summary":"approveAgent","operationId":"exchange_approveAgent","requestBody":{"description":"Signed `approveAgent` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/ApproveAgentRequest","description":"Approve an agent for delegated trading"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["approveAgent"]}}}],"description":"Approve an agent for delegated trading"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"ApproveAgentRequest":{"type":"object","description":"Approve an agent to trade on behalf of the user.","required":["agentAddress","nonce"],"properties":{"agentAddress":{"type":"string","description":"Agent address to approve"},"agentName":{"type":["string","null"],"description":"Optional agent name for identification"},"ipWhitelist":{"type":"array","items":{"type":"string"},"description":"Optional IP allowlist. Omitted or empty means unrestricted."},"nonce":{"type":"integer","format":"int64","description":"Request nonce (must match signature)","minimum":0},"permission":{"oneOf":[{"type":"null"},{"$ref":"#/components/schemas/ApiKeyPermission","description":"Optional permission scope for this API key. Defaults to trade."}]},"signatureChainId":{"type":["string","null"],"description":"Chain ID for EIP-712 signature verification"}}},"ApiKeyPermission":{"type":"string","enum":["readOnly","trade"]},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# approveBuilderFee

## POST /exchange

> approveBuilderFee

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - approveBuilderFee","version":"1.0.0"},"tags":[{"name":"approveBuilderFee"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["approveBuilderFee"],"summary":"approveBuilderFee","operationId":"exchange_approveBuilderFee","requestBody":{"description":"Signed `approveBuilderFee` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/ApproveBuilderFeeRequest","description":"Approve a downstream builder fee"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["approveBuilderFee"]}}}],"description":"Approve a downstream builder fee"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"ApproveBuilderFeeRequest":{"type":"object","description":"Approve a maximum builder fee for a downstream builder.","required":["hyperliquidChain","maxFeeRate","builder","nonce"],"properties":{"builder":{"type":"string","description":"Downstream builder address"},"hyperliquidChain":{"type":"string","description":"Chain identifier: \"Mainnet\" or \"Testnet\""},"maxFeeRate":{"type":"string","description":"Maximum fee as an exact percent string (for example, \"0.1%\")"},"nonce":{"type":"integer","format":"int64","description":"Request nonce","minimum":0},"signatureChainId":{"type":["string","null"],"description":"Chain ID for EIP-712 signature verification"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# claimRewards

## POST /exchange

> claimRewards

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - claimRewards","version":"1.0.0"},"tags":[{"name":"claimRewards"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["claimRewards"],"summary":"claimRewards","operationId":"exchange_claimRewards","requestBody":{"description":"Signed `claimRewards` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/ClaimRewardsRequest","description":"Claim accrued builder and referral rewards"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["claimRewards"]}}}],"description":"Claim accrued builder and referral rewards"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"ClaimRewardsRequest":{"type":"object","description":"Claim accrued builder and referral rewards above one whole settlement token into the signer's\nspot balance."},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# usdClassTransfer

## POST /exchange

> usdClassTransfer

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - usdClassTransfer","version":"1.0.0"},"tags":[{"name":"usdClassTransfer"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["usdClassTransfer"],"summary":"usdClassTransfer","operationId":"exchange_usdClassTransfer","requestBody":{"description":"Signed `usdClassTransfer` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/UsdClassTransferRequest","description":"Transfer between spot and perp accounts (legacy)"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["usdClassTransfer"]}}}],"description":"Transfer between spot and perp accounts (legacy)"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"UsdClassTransferRequest":{"type":"object","description":"Transfer funds between spot and perp accounts.","required":["hyperliquidChain","amount","toPerp","nonce"],"properties":{"amount":{"type":"string","description":"Amount to transfer (as string, e.g., \"100.5\")"},"hyperliquidChain":{"type":"string","description":"Chain identifier: \"Mainnet\" or \"Testnet\""},"nonce":{"type":"integer","format":"int64","description":"Request nonce","minimum":0},"signatureChainId":{"type":["string","null"],"description":"Chain ID for EIP-712 signature verification"},"toPerp":{"type":"boolean","description":"True to transfer to perp account, false to transfer to spot"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# sendAsset

## POST /exchange

> sendAsset

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - sendAsset","version":"1.0.0"},"tags":[{"name":"sendAsset"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["sendAsset"],"summary":"sendAsset","operationId":"exchange_sendAsset","requestBody":{"description":"Signed `sendAsset` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/SendAssetRequest","description":"Transfer assets between DEX pools (generalized)"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["sendAsset"]}}}],"description":"Transfer assets between DEX pools (generalized)"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"SendAssetRequest":{"type":"object","description":"Transfer assets between DEX pools (generalized sendAsset).","required":["hyperliquidChain","destination","sourceDex","destinationDex","token","amount","nonce"],"properties":{"amount":{"type":"string","description":"Amount to transfer (as string, e.g., \"100.5\")"},"destination":{"type":"string","description":"Destination address (must equal sender; no cross-user transfers)"},"destinationDex":{"type":"string","description":"Destination DEX pool name (\"\" for perp, \"spot\" for spot, or builder name)"},"fromSubAccount":{"type":"string","description":"Sub-account address to transfer from (\"\" if not from sub-account)"},"hyperliquidChain":{"type":"string","description":"Chain identifier: \"Mainnet\" or \"Testnet\""},"nonce":{"type":"integer","format":"int64","description":"Request nonce","minimum":0},"signatureChainId":{"type":["string","null"],"description":"Chain ID for EIP-712 signature verification"},"sourceDex":{"type":"string","description":"Source DEX pool name (\"\" for perp, \"spot\" for spot, or builder name)"},"token":{"type":"string","description":"Token name or address to transfer"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# agentSendAsset

## POST /exchange

> agentSendAsset

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - agentSendAsset","version":"1.0.0"},"tags":[{"name":"agentSendAsset"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["agentSendAsset"],"summary":"agentSendAsset","operationId":"exchange_agentSendAsset","requestBody":{"description":"Signed `agentSendAsset` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/AgentSendAssetRequest","description":"Transfer assets between DEX pools using agent authorization"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["agentSendAsset"]}}}],"description":"Transfer assets between DEX pools using agent authorization"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"AgentSendAssetRequest":{"type":"object","description":"Transfer assets between DEX pools using Hyperliquid agent authorization.","required":["destination","sourceDex","destinationDex","token","amount","nonce"],"properties":{"amount":{"type":"string","description":"Amount to transfer (as string, e.g., \"100.5\")"},"destination":{"type":"string","description":"Destination address (must equal sender; no cross-user transfers)"},"destinationDex":{"type":"string","description":"Destination DEX pool name (\"\" for perp, \"spot\" for spot, or builder name)"},"fromSubAccount":{"type":"string","description":"Sub-account address to transfer from (\"\" if not from sub-account)"},"nonce":{"type":"integer","format":"int64","description":"Request nonce; must match the outer exchange request nonce","minimum":0},"sourceDex":{"type":"string","description":"Source DEX pool name (\"\" for perp, \"spot\" for spot, or builder name)"},"token":{"type":"string","description":"Token name or name:tokenId to transfer"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# setReferrer

## POST /exchange

> setReferrer

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - setReferrer","version":"1.0.0"},"tags":[{"name":"setReferrer"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["setReferrer"],"summary":"setReferrer","operationId":"exchange_setReferrer","requestBody":{"description":"Signed `setReferrer` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/SetReferrerRequest","description":"Bind signer to an existing HyperLink referral code"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["setReferrer"]}}}],"description":"Bind signer to an existing HyperLink referral code"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"SetReferrerRequest":{"type":"object","description":"Bind the signer to an existing HyperLink referral code.","required":["code"],"properties":{"code":{"type":"string","description":"Referral code shared by another HyperLink user."}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# registerReferrer

## POST /exchange

> registerReferrer

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - registerReferrer","version":"1.0.0"},"tags":[{"name":"registerReferrer"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["registerReferrer"],"summary":"registerReferrer","operationId":"exchange_registerReferrer","requestBody":{"description":"Signed `registerReferrer` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/RegisterReferrerRequest","description":"Register a HyperLink referral code"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["registerReferrer"]}}}],"description":"Register a HyperLink referral code"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"RegisterReferrerRequest":{"type":"object","description":"Register a HyperLink referral code for the signer.","required":["code"],"properties":{"code":{"type":"string","description":"Desired referral code."}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# updateLeverage

## POST /exchange

> updateLeverage

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - updateLeverage","version":"1.0.0"},"tags":[{"name":"updateLeverage"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["updateLeverage"],"summary":"updateLeverage","operationId":"exchange_updateLeverage","requestBody":{"description":"Signed `updateLeverage` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/UpdateLeverageRequest","description":"Update leverage/margin mode for an asset"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["updateLeverage"]}}}],"description":"Update leverage/margin mode for an asset"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"UpdateLeverageRequest":{"type":"object","description":"Request to update leverage and margin mode for an asset.","required":["asset","isCross","leverage"],"properties":{"asset":{"type":"integer","format":"int32","description":"Asset index","minimum":0},"isCross":{"type":"boolean","description":"True for cross margin, false for isolated margin"},"leverage":{"type":"integer","format":"int32","description":"Leverage multiplier (e.g., 10 for 10x)","minimum":0}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# updateIsolatedMargin

## POST /exchange

> updateIsolatedMargin

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - updateIsolatedMargin","version":"1.0.0"},"tags":[{"name":"updateIsolatedMargin"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["updateIsolatedMargin"],"summary":"updateIsolatedMargin","operationId":"exchange_updateIsolatedMargin","requestBody":{"description":"Signed `updateIsolatedMargin` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/UpdateIsolatedMarginRequest","description":"Add/remove isolated margin"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["updateIsolatedMargin"]}}}],"description":"Add/remove isolated margin"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"UpdateIsolatedMarginRequest":{"type":"object","description":"Request to add/remove margin from an isolated position.","required":["asset","isBuy","ntli"],"properties":{"asset":{"type":"integer","format":"int32","description":"Asset index","minimum":0},"isBuy":{"type":"boolean","description":"Side indicator (reserved for hedge mode)"},"ntli":{"type":"integer","format":"int64","description":"Amount in 6 decimals (positive=add, negative=remove)"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# topUpIsolatedOnlyMargin

## POST /exchange

> topUpIsolatedOnlyMargin

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - topUpIsolatedOnlyMargin","version":"1.0.0"},"tags":[{"name":"topUpIsolatedOnlyMargin"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["topUpIsolatedOnlyMargin"],"summary":"topUpIsolatedOnlyMargin","operationId":"exchange_topUpIsolatedOnlyMargin","requestBody":{"description":"Signed `topUpIsolatedOnlyMargin` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for the `/exchange` endpoint.\n\nAll exchange requests must include:\n- `action`: The action to perform\n- `signature`: EIP-712 signature authorizing the action\n- `nonce`: Unix timestamp in milliseconds (must be within validity window)","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/TopUpIsolatedOnlyMarginRequest","description":"Set isolated margin by target leverage"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["topUpIsolatedOnlyMargin"]}}}],"description":"Set isolated margin by target leverage"},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for L1-signed actions.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this action"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"TopUpIsolatedOnlyMarginRequest":{"type":"object","description":"Request to set isolated margin by target leverage.","required":["asset","leverage"],"properties":{"asset":{"type":"integer","format":"int32","description":"Asset index","minimum":0},"leverage":{"type":"string","description":"Target leverage as float string (e.g., \"5.0\")"}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# spotClearinghouseState

## POST /exchange

> spotClearinghouseState

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - spotClearinghouseState","version":"1.0.0"},"tags":[{"name":"spotClearinghouseState"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["spotClearinghouseState"],"summary":"spotClearinghouseState","operationId":"exchange_spotClearinghouseState","requestBody":{"description":"Signed `spotClearinghouseState` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/SpotClearinghouseStateRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["spotClearinghouseState"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"SpotClearinghouseStateRequest":{"type":"object","description":"Spot account state request payload with `type: \"spotClearinghouseState\"`."},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# clearinghouseState

## POST /exchange

> clearinghouseState

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - clearinghouseState","version":"1.0.0"},"tags":[{"name":"clearinghouseState"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["clearinghouseState"],"summary":"clearinghouseState","operationId":"exchange_clearinghouseState","requestBody":{"description":"Signed `clearinghouseState` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/ClearinghouseStateRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["clearinghouseState"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"ClearinghouseStateRequest":{"type":"object","description":"Perpetual account state request payload with `type: \"clearinghouseState\"`.","properties":{"dex":{"type":["string","null"],"description":"Optional DEX name to filter positions. If None, returns only regular perps.\nIf specified, returns only positions for that builder-deployed DEX."}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# extraAgents

## POST /exchange

> extraAgents

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - extraAgents","version":"1.0.0"},"tags":[{"name":"extraAgents"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["extraAgents"],"summary":"extraAgents","operationId":"exchange_extraAgents","requestBody":{"description":"Signed `extraAgents` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/ExtraAgentsRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["extraAgents"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"ExtraAgentsRequest":{"type":"object","description":"Delegated agent list request payload with `type: \"extraAgents\"`."},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# openOrders

## POST /exchange

> openOrders

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - openOrders","version":"1.0.0"},"tags":[{"name":"openOrders"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["openOrders"],"summary":"openOrders","operationId":"exchange_openOrders","requestBody":{"description":"Signed `openOrders` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/OpenOrdersRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["openOrders"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"OpenOrdersRequest":{"type":"object","description":"Open orders request payload with `type: \"openOrders\"`.","properties":{"dex":{"type":["string","null"],"description":"Optional DEX name to filter open orders. If None, returns the default perp/spot orders.\nIf `ALL_DEXS`, returns default plus builder DEX orders.\nOtherwise returns only orders for that builder-deployed DEX."}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# activeAssetData

## POST /exchange

> activeAssetData

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - activeAssetData","version":"1.0.0"},"tags":[{"name":"activeAssetData"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["activeAssetData"],"summary":"activeAssetData","operationId":"exchange_activeAssetData","requestBody":{"description":"Signed `activeAssetData` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/ActiveAssetDataRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["activeAssetData"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"ActiveAssetDataRequest":{"type":"object","description":"Active asset data request payload with `type: \"activeAssetData\"`.","required":["coin"],"properties":{"coin":{"type":"string","description":"Perp coin to query."}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# userFills

## POST /exchange

> userFills

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - userFills","version":"1.0.0"},"tags":[{"name":"userFills"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["userFills"],"summary":"userFills","operationId":"exchange_userFills","requestBody":{"description":"Signed `userFills` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/UserFillsRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userFills"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"UserFillsRequest":{"type":"object","description":"User fills request payload with `type: \"userFills\"`.","properties":{"aggregateByTime":{"type":["boolean","null"],"description":"Optional aggregation by time (matches Hyperliquid)"},"startTime":{"type":["integer","null"],"format":"int64","description":"Optional start time in milliseconds (returns fills after this time)","minimum":0}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# portfolio

## POST /exchange

> portfolio

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - portfolio","version":"1.0.0"},"tags":[{"name":"portfolio"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["portfolio"],"summary":"portfolio","operationId":"exchange_portfolio","requestBody":{"description":"Signed `portfolio` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/UserPortfolioRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["portfolio"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"UserPortfolioRequest":{"type":"object","description":"Portfolio history request payload with `type: \"portfolio\"`.\n\nThe signed user is derived from EIP-712 signature, so this payload is empty."},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# userRateLimit

## POST /exchange

> userRateLimit

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - userRateLimit","version":"1.0.0"},"tags":[{"name":"userRateLimit"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["userRateLimit"],"summary":"userRateLimit","operationId":"exchange_userRateLimit","requestBody":{"description":"Signed `userRateLimit` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/UserRateLimitRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userRateLimit"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"UserRateLimitRequest":{"type":"object","description":"User rate limit request payload with `type: \"userRateLimit\"`.\n\nThe signed user is derived from EIP-712 signature, so this payload is empty.","additionalProperties":false},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# userHistoricalOrders

## POST /exchange

> userHistoricalOrders

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - userHistoricalOrders","version":"1.0.0"},"tags":[{"name":"userHistoricalOrders"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["userHistoricalOrders"],"summary":"userHistoricalOrders","operationId":"exchange_userHistoricalOrders","requestBody":{"description":"Signed `userHistoricalOrders` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/UserHistoricalOrdersRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userHistoricalOrders"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"UserHistoricalOrdersRequest":{"type":"object","description":"Historical orders request payload with `type: \"userHistoricalOrders\"`."},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# userFundings

## POST /exchange

> userFundings

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - userFundings","version":"1.0.0"},"tags":[{"name":"userFundings"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["userFundings"],"summary":"userFundings","operationId":"exchange_userFundings","requestBody":{"description":"Signed `userFundings` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/UserFundingsRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userFundings"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"UserFundingsRequest":{"type":"object","description":"Funding history request payload with `type: \"userFundings\"`.","properties":{"startTime":{"type":["integer","null"],"format":"int64","minimum":0}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# userNonFundingLedgerUpdates

## POST /exchange

> userNonFundingLedgerUpdates

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - userNonFundingLedgerUpdates","version":"1.0.0"},"tags":[{"name":"userNonFundingLedgerUpdates"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["userNonFundingLedgerUpdates"],"summary":"userNonFundingLedgerUpdates","operationId":"exchange_userNonFundingLedgerUpdates","requestBody":{"description":"Signed `userNonFundingLedgerUpdates` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/UserNonFundingLedgerUpdatesRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["userNonFundingLedgerUpdates"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"UserNonFundingLedgerUpdatesRequest":{"type":"object","description":"Non-funding ledger history request payload with `type: \"userNonFundingLedgerUpdates\"`.","required":["startTime"],"properties":{"endTime":{"type":["integer","null"],"format":"int64","description":"Inclusive end time in milliseconds.","minimum":0},"startTime":{"type":"integer","format":"int64","description":"Inclusive start time in milliseconds.","minimum":0}}},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# maxBuilderFee

## POST /exchange

> maxBuilderFee

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - maxBuilderFee","version":"1.0.0"},"tags":[{"name":"maxBuilderFee"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["maxBuilderFee"],"summary":"maxBuilderFee","operationId":"exchange_maxBuilderFee","requestBody":{"description":"Signed `maxBuilderFee` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/MaxBuilderFeeRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["maxBuilderFee"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"MaxBuilderFeeRequest":{"type":"object","description":"Query the signer's approved max fee rate for one downstream builder.\nResponds with the approved rate in tenths of a basis point (0 when unapproved).","required":["user","builder"],"properties":{"builder":{"type":"string","description":"Downstream builder address."},"user":{"type":"string","description":"Authenticated user being queried."}},"additionalProperties":false},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# approvedBuilders

## POST /exchange

> approvedBuilders

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - approvedBuilders","version":"1.0.0"},"tags":[{"name":"approvedBuilders"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["approvedBuilders"],"summary":"approvedBuilders","operationId":"exchange_approvedBuilders","requestBody":{"description":"Signed `approvedBuilders` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/ApprovedBuildersRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["approvedBuilders"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"ApprovedBuildersRequest":{"type":"object","description":"Query the signer's active downstream builder approvals.\nResponds with builder addresses, matching Hyperliquid's `approvedBuilders` shape.","required":["user"],"properties":{"user":{"type":"string","description":"Authenticated user being queried."}},"additionalProperties":false},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# referral

## POST /exchange

> referral

```json
{"openapi":"3.1.0","info":{"title":"Hyperlink Exchange - referral","version":"1.0.0"},"tags":[{"name":"referral"}],"servers":[{"url":"https://api.hyperlink.xyz","description":"Mainnet"}],"paths":{"/exchange":{"post":{"tags":["referral"],"summary":"referral","operationId":"exchange_referral","requestBody":{"description":"Signed `referral` exchange request.","required":true,"content":{"application/json":{"schema":{"type":"object","description":"Request envelope for read-only actions submitted to `/exchange`.\n\nAuthorizes private queries for balances, positions, orders, portfolio, fees, and referrals.","required":["action","signature","nonce"],"properties":{"action":{"allOf":[{"$ref":"#/components/schemas/ReferralRequest"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["referral"]}}}]},"expiresAfter":{"type":["integer","null"],"format":"int64","description":"Optional expiry for signed query requests.","minimum":0},"nonce":{"type":"integer","format":"int64","description":"Request nonce (Unix timestamp in milliseconds)","minimum":0},"signature":{"$ref":"#/components/schemas/Signature","description":"EIP-712 signature authorizing this query"},"vaultAddress":{"type":["string","null"],"description":"Optional vault address for vault operations"}}}}}},"responses":{"200":{"description":"Request successful. Response format depends on the requested action.","content":{"application/json":{"schema":{}}}},"400":{"description":"Request body was not valid JSON","content":{"text/plain":{"schema":{"type":"string"}}}},"422":{"description":"JSON body did not match a supported exchange schema","content":{"text/plain":{"schema":{"type":"string"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeResponse"}}}}}}}},"components":{"schemas":{"ReferralRequest":{"type":"object","description":"Query HyperLink referral statistics and builder rewards for the signer.","required":["user"],"properties":{"user":{"type":"string","description":"Authenticated user being queried."}},"additionalProperties":false},"Signature":{"type":"object","description":"EIP-712 signature components.","required":["r","s","v"],"properties":{"r":{"type":"string","description":"r component (hex string with 0x prefix)"},"s":{"type":"string","description":"s component (hex string with 0x prefix)"},"v":{"type":"integer","format":"int32","description":"v component (27 or 28)","minimum":0}}},"ExchangeResponse":{"type":"object","description":"Exchange response envelope matching Hyperliquid's format exactly.\nUsed for order placement, cancellation, and other exchange actions.","required":["status","response"],"properties":{"response":{"$ref":"#/components/schemas/ExchangeResponseData","description":"Response payload"},"status":{"type":"string","description":"Status: \"ok\" or \"error\""}}},"ExchangeResponseData":{"type":"object","description":"Inner response object for exchange operations.","required":["type"],"properties":{"data":{"description":"Response data payload (omitted when null, e.g. for \"default\" responses)"},"type":{"type":"string","description":"Response type (e.g., \"order\", \"cancel\", \"default\", \"error\")"}}}}}}
```


# Builder Codes

Builder codes on HyperLink: charge an approved per-order fee on the orders your app routes to Hyperliquid, with fixed fee tiers and API-based claims.

Builder codes let applications charge a fee on the orders they send through HyperLink on a user's behalf. The user approves a maximum fee rate for each builder with their main wallet and can revoke it at any time. The fee is set per order and accrues to the builder's HyperLink account.

The flow mirrors [Hyperliquid's builder codes](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/builder-codes): approve a rate with `approveBuilderFee`, then attach `{"b": builder, "f": fee}` to order actions.

## Differences from Hyperliquid

|                   | HyperLink                                           | Hyperliquid                      |
| ----------------- | --------------------------------------------------- | -------------------------------- |
| Per-order fee `f` | One of four tiers: `5`, `10`, `15`, `20` (0.5–2 bp) | Any value up to the approved max |
| Maximum fee rate  | 0.02% (2 bp) on perps and spot                      | 0.1% on perps, 1% on spot        |

Everything else carries over: approvals are signed by the user's main wallet, `f` is in tenths of a basis point (`10` = 1 bp), fees are charged in the quote or collateral asset, and each user can have at most 10 active builder approvals.

## Approve a builder fee

The user signs an `approveBuilderFee` action with their main wallet; agent (API) keys cannot approve builder fees. `maxFeeRate` is a percent string with up to three decimals, at most `"0.02%"`.

```json
{
  "action": {
    "type": "approveBuilderFee",
    "hyperliquidChain": "Mainnet",
    "signatureChainId": "0xa4b1",
    "maxFeeRate": "0.01%",
    "builder": "0x8c67a1b3d5e9f2407b6a0c4d8e1f5a3b7c9d0e2f",
    "nonce": 1712140800000
  },
  "nonce": 1712140800000,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}
```

The action uses the user-signed EIP-712 domain, identical to Hyperliquid's `HyperliquidTransaction:ApproveBuilderFee` type; see [Authentication & Keys](/api/api-keys) for signing chainIds. A success returns `{ "status": "ok", "response": { "type": "default" } }`.

With the HyperLink Python SDK, construct the client with the main wallet key:

```python
import os
from eth_account import Account
from hyperliquid.exchange import Exchange

wallet = Account.from_key(os.environ["WALLET_PRIVATE_KEY"])  # main wallet, not an agent key
exchange = Exchange(wallet, base_url="https://api.hyperlink.xyz")
exchange.approve_builder_fee("0x8c67a1b3d5e9f2407b6a0c4d8e1f5a3b7c9d0e2f", "0.01%")
```

To revoke a builder, approve them with `"0%"`. Approving an 11th builder is rejected until one is revoked.

## Attach the fee to orders

Once approved, order actions may include the optional `builder` field. `b` is the builder address in lowercase hex; `f` is the fee in tenths of a basis point and must be one of the four tiers, at or below the user's approved max.

| `f`  | Fee rate        |
| ---- | --------------- |
| `5`  | 0.5 bp (0.005%) |
| `10` | 1 bp (0.01%)    |
| `15` | 1.5 bp (0.015%) |
| `20` | 2 bp (0.02%)    |

```json
{
  "action": {
    "type": "order",
    "orders": [
      { "a": 0, "b": true, "p": "50000", "s": "0.1", "r": false, "t": { "limit": { "tif": "Gtc" } }, "c": "0x1234567890abcdef1234567890abcdef" }
    ],
    "grouping": "na",
    "builder": { "b": "0x8c67a1b3d5e9f2407b6a0c4d8e1f5a3b7c9d0e2f", "f": 10 }
  },
  "nonce": 1712140800000,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}
```

Or through the SDK's `builder` parameter (orders can use your regular agent-keyed client):

```python
from hyperliquid.utils.types import Cloid

result = exchange.order(
    name="BTC",
    is_buy=True,
    sz=0.1,
    limit_px=50000,
    order_type={"limit": {"tif": "Gtc"}},
    cloid=Cloid.from_str("0x1234567890abcdef1234567890abcdef"),  # required on HyperLink
    builder={"b": "0x8c67a1b3d5e9f2407b6a0c4d8e1f5a3b7c9d0e2f", "f": 10},
)
```

Fees are calculated from fill notional and accrue in the market's quote or collateral token. They apply to both sides of perp trades and to spot sells on any configured quote token. Spot buys do not accrue builder fees (same as Hyperliquid).

## Query approvals

Two signed `POST /exchange` queries cover approvals; in both, `user` must be the authenticated account.

`approvedBuilders` lists the builder addresses the account has approved:

```json
{
  "action": {
    "type": "approvedBuilders",
    "user": "0x742d35cc6634c0532925a3b844bc9e7595f0beb1"
  },
  "nonce": 1712140800000,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}
```

Response:

```json
["0x8c67a1b3d5e9f2407b6a0c4d8e1f5a3b7c9d0e2f"]
```

`maxBuilderFee` returns the approved rate for one builder in tenths of a basis point, or `0` when unapproved:

```json
{
  "action": {
    "type": "maxBuilderFee",
    "user": "0x742d35cc6634c0532925a3b844bc9e7595f0beb1",
    "builder": "0x8c67a1b3d5e9f2407b6a0c4d8e1f5a3b7c9d0e2f"
  },
  "nonce": 1712140800000,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}
```

Response:

```json
10
```

## Track accrued fees

As on Hyperliquid, accrued builder fees are part of the `referral` query response. `builderRewards` is the cumulative total, `unclaimedRewards` is what is currently claimable, and `claimedRewards` is what has been claimed. Top-level amounts are USDC; `tokenToState` breaks the same figures down per settlement token index. The response also carries the account's referral statistics.

```json
{
  "action": {
    "type": "referral",
    "user": "0x8c67a1b3d5e9f2407b6a0c4d8e1f5a3b7c9d0e2f"
  },
  "nonce": 1712140800000,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}
```

Response:

```json
{
  "referredUserCount": 0,
  "referredUserTotalVolume": "0.0",
  "builderRewards": "1.5",
  "unclaimedRewards": "1.0",
  "claimedRewards": "0.5",
  "tokenToState": [
    [0, { "cumVlm": "0.0", "unclaimedRewards": "1.0", "claimedRewards": "0.5", "builderRewards": "1.5" }]
  ],
  "code": null
}
```

## Claim rewards

Use the `claimRewards` action to claim builder fees, referral cashback, and referral commissions. It credits each eligible DEX/token reward bucket to the account's HyperLink spot balance in the same settlement token. Each bucket must exceed one whole settlement token; smaller buckets remain unclaimed. The action takes no parameters and can be agent-signed.

```json
{
  "action": { "type": "claimRewards" },
  "nonce": 1712140800000,
  "signature": { "r": "0x...", "s": "0x...", "v": 27 }
}
```

## Errors

The API returns `Builder fee has not been approved.` when approval is missing, revoked, or below the order's `f`. Other builder-code admission failures return `Order rejected.`; verify the builder address and fee tier.

## Next steps

* [Exchange Methods](/api/exchange-methods): full `approveBuilderFee`, `claimRewards`, `approvedBuilders`, and `maxBuilderFee` schemas.
* [Authentication & Keys](/api/api-keys): agent-signed vs user-signed actions.
* [Fees](/trade/fees): HyperLink's own fee schedule.
* [Referral Program](/trade/referral-program): referral cashback and commissions.


# WebSocket API

HyperLink's WebSocket API for real-time private order, fill, and account updates, plus signed trading actions over one persistent connection to Hyperliquid.

HyperLink's WebSocket API delivers real-time order, fill, and account updates and accepts signed trading actions over one persistent connection. It mirrors Hyperliquid's WebSocket protocol, so existing Hyperliquid tooling works against the HyperLink base URL. Only **private user-state** channels are streamed; there are no public market-data feeds.

Use WebSocket for live updates or low-latency order entry; use [Exchange Methods](/api/exchange-methods) (`POST /exchange`) for one-off requests.

## Connect

Open an HTTP upgrade to `/ws` at `wss://api.hyperlink.xyz/ws`. All messages are JSON text frames; the maximum message size is 1 MiB.

```bash
websocat wss://api.hyperlink.xyz/ws
```

Keep the connection alive with a ping; the server replies on the `pong` channel:

```json
{ "method": "ping" }
```

## Send signed actions: the `post` channel

The `post` channel runs the same signed payload as `POST /exchange`. Wrap the full `/exchange` envelope as `request.payload`. Only `type: "action"` is supported.

| Field             | Required | Notes                                                                                                     |
| ----------------- | -------- | --------------------------------------------------------------------------------------------------------- |
| `method`          | Yes      | Must be `"post"`.                                                                                         |
| `id`              | Yes      | Client-chosen `u64`, echoed back to correlate the response.                                               |
| `request.type`    | Yes      | Must be `"action"`.                                                                                       |
| `request.payload` | Yes      | The full `/exchange` envelope (`action`, `signature`, `nonce`, optional `expiresAfter` / `vaultAddress`). |

**Send** a GTC limit buy of `0.1` of asset index `0`:

```json
{
  "method": "post",
  "id": 1,
  "request": {
    "type": "action",
    "payload": {
      "action": {
        "type": "order",
        "orders": [
          { "a": 0, "b": true, "p": "50000", "s": "0.1", "r": false, "t": { "limit": { "tif": "Gtc" } }, "c": "0x1234567890abcdef1234567890abcdef" }
        ],
        "grouping": "na"
      },
      "signature": { "r": "0x...", "s": "0x...", "v": 27 },
      "nonce": 1712140800000
    }
  }
}
```

**Receive** on the `post` channel with the matching `id`; the inner `payload` mirrors the HTTP `/exchange` response:

```json
{
  "channel": "post",
  "data": {
    "id": 1,
    "response": {
      "type": "action",
      "payload": { "status": "ok", "response": { "type": "order", "data": { "statuses": [ { "resting": { "oid": 77738308 } } ] } } }
    }
  }
}
```

On a rejected request, `response.type` is `"error"`. Read queries (for example `openOrders`) also work over `post`.

## Subscriptions

Subscribe to stream updates for one account. Each subscribe message is signed with the **Agent** EIP-712 domain, the same signing used for queries (see [Authentication & Keys](/api/api-keys)); an SDK builds this for you.

| Field               | Required    | Notes                                                  |
| ------------------- | ----------- | ------------------------------------------------------ |
| `method`            | Yes         | `"subscribe"` or `"unsubscribe"`.                      |
| `subscription.type` | Yes         | One of the types below.                                |
| `subscription.user` | Yes         | Master account address to stream.                      |
| `subscription.coin` | Conditional | Required for `activeAssetData`; ignored otherwise.     |
| `subscription.dex`  | No          | For `openOrders` only; omit or set `"ALL_DEXS"`.       |
| `signature`         | Yes         | Agent-domain signature over the `subscription` object. |
| `nonce`             | Yes         | Unix time in milliseconds, single-use per signer.      |

**Send:**

```json
{
  "method": "subscribe",
  "subscription": { "type": "orderUpdates", "user": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb1" },
  "signature": { "r": "0x...", "s": "0x...", "v": 27 },
  "nonce": 1712140800000
}
```

The server acknowledges on `subscriptionResponse`, then pushes updates on a channel named after the subscription type:

```json
{
  "channel": "orderUpdates",
  "data": [
    { "order": { "coin": "ETH", "side": "B", "limitPx": "50000", "sz": "0.1", "oid": 77738308, "timestamp": 1712140800123 }, "status": "open", "statusTimestamp": 1712140800123 }
  ]
}
```

### Subscription types

| Type                          | Streams                                                   |
| ----------------------------- | --------------------------------------------------------- |
| `orderUpdates`                | Order status changes (open, filled, canceled, rejected).  |
| `openOrders`                  | Current open orders across all DEXs.                      |
| `userFills`                   | Real-time fills.                                          |
| `spotState`                   | Spot token balances.                                      |
| `allDexsClearinghouseState`   | Perp positions and margin summary across all DEXs.        |
| `activeAssetData`             | Per-asset leverage and margin context. Requires a `coin`. |
| `userHistoricalOrders`        | Historical order status changes.                          |
| `userFundings`                | Funding payments.                                         |
| `userNonFundingLedgerUpdates` | Deposits, withdrawals, transfers.                         |

To stop, send the same `subscription` object with `method: "unsubscribe"` (no signature or nonce needed).

## Errors

Subscription and frame-level errors return on the `error` channel; errors tied to a `post` request return on the `post` channel with the request's `id` and `response.type: "error"`.

```json
{ "channel": "error", "data": { "message": "Invalid signature" } }
```

Common errors: `Invalid signature`, `Invalid nonce: <reason>`, `Unknown subscription type: <type>`, `Invalid user address`, `activeAssetData subscription requires non-empty coin`, `No matching subscription found`, and `Too many pending requests`. Malformed frames with no `id` are dropped silently.

## Rate limits

The connection enforces per-IP limits on connections, subscriptions, message rate, and in-flight `post` requests. Exceeding the message rate or connection cap closes the connection; exceeding the in-flight `post` cap returns `"Too many pending requests"`.

## Next steps

* [Exchange Methods](/api/exchange-methods): the `/exchange` envelope shared by the `post` channel.
* [Authentication & Keys](/api/api-keys): EIP-712 domains for actions and subscriptions.


# SDKs

Python and TypeScript SDKs for trading on HyperLink, the prime broker for Hyperliquid, using Hyperliquid-compatible signing and order formats throughout.

Use the HyperLink Python SDK for Python integrations. For other languages, use a Hyperliquid SDK pointed at the HyperLink base URL because HyperLink mirrors Hyperliquid's `/exchange` action format and EIP-712 signing.

{% hint style="info" %}
The HyperLink Python SDK is a minimal fork of `hyperliquid-python-sdk`. See [PR #1](https://github.com/hyperlink-xyz/hyperlink-python-sdk/pull/1) for the changes needed to add HyperLink support to a Hyperliquid SDK fork.
{% endhint %}

## Base URL

Point clients at `https://api.hyperlink.xyz`. WebSocket: `wss://api.hyperlink.xyz/ws`.

| Language   | Package                | Repository                                                                                             |
| ---------- | ---------------------- | ------------------------------------------------------------------------------------------------------ |
| TypeScript | `@nktkas/hyperliquid`  | [github.com/nktkas/hyperliquid](https://github.com/nktkas/hyperliquid)                                 |
| Python     | `hyperlink-python-sdk` | [github.com/hyperlink-xyz/hyperlink-python-sdk](https://github.com/hyperlink-xyz/hyperlink-python-sdk) |

{% hint style="info" %}
HyperLink **requires** a client order id (`cloid`) on every order. Pass it via the SDK's `cloid` parameter (Python) or the `c` field (TypeScript), as shown below.
{% endhint %}

## TypeScript

```bash
npm install @nktkas/hyperliquid viem
```

Set the transport's `apiUrl` to the HyperLink host. Everything else matches the Hyperliquid SDK.

```typescript
import { ExchangeClient, HttpTransport } from "@nktkas/hyperliquid";
import { privateKeyToAccount } from "viem/accounts";

// Point the transport at HyperLink instead of Hyperliquid.
const transport = new HttpTransport({ apiUrl: "https://api.hyperlink.xyz" });

const wallet = privateKeyToAccount(process.env.PRIVATE_KEY as `0x${string}`);

// Signed trading actions.
const exchange = new ExchangeClient({ transport, wallet });

// Place a limit order. Asset is the numeric index (perps 0-9999, spot 10000+index).
const result = await exchange.order({
  orders: [
    {
      a: 0,             // asset index
      b: true,          // isBuy
      p: "50000",       // limit price
      s: "0.1",         // size
      r: false,         // reduceOnly
      t: { limit: { tif: "Gtc" } },
      c: "0x1234567890abcdef1234567890abcdef", // cloid (required)
    },
  ],
  grouping: "na",
});

console.log(result);
```

For streaming, set the WebSocket transport's `url` to the HyperLink WS endpoint:

```typescript
import { SubscriptionClient, WebSocketTransport } from "@nktkas/hyperliquid";

const wsTransport = new WebSocketTransport({ url: "wss://api.hyperlink.xyz/ws" });
const subs = new SubscriptionClient({ transport: wsTransport });
```

## Python

```bash
pip install hyperlink-python-sdk
```

Pass `base_url="https://api.hyperlink.xyz"` to the `Exchange` constructor.

```python
import os

import eth_account
from hyperliquid.exchange import Exchange
from hyperliquid.utils.types import Cloid

BASE_URL = "https://api.hyperlink.xyz"

wallet = eth_account.Account.from_key(os.environ["PRIVATE_KEY"])

# Signed actions.
exchange = Exchange(wallet, base_url=BASE_URL)

# Place a limit order. "BTC" resolves to the perp asset index via Hyperliquid meta.
result = exchange.order(
    name="BTC",
    is_buy=True,
    sz=0.1,
    limit_px=50000,
    order_type={"limit": {"tif": "Gtc"}},
    reduce_only=False,
    cloid=Cloid.from_str("0x1234567890abcdef1234567890abcdef"),  # required
)

print(result)
```

| Parameter  | Required | Description                                                                                                      |
| ---------- | -------- | ---------------------------------------------------------------------------------------------------------------- |
| `wallet`   | Required | An `eth_account` local account that signs actions. Use an approved [agent (API key)](/api/api-keys) for trading. |
| `base_url` | Optional | Set to a HyperLink host when you need to override the default.                                                   |

## Discovering asset indexes

There is no HyperLink asset-mapping endpoint. Discover perp and spot indexes through Hyperliquid's `/info` `meta` and `spotMeta` responses, then use those indexes in HyperLink order actions.

| Market          | Index range                    |
| --------------- | ------------------------------ |
| Perps           | `0`-`9999`                     |
| Spot            | `10000 + index`                |
| Builder perps   | `100000 + dex * 10000 + index` |
| Outcome markets | Not supported                  |

## Signed private reads

The HyperLink Python SDK includes helpers for signed private reads. In other SDKs, build raw signed requests using the [Authentication & Keys](/api/api-keys) signing scheme:

| Feature                                    | Action / endpoint                                                                               |
| ------------------------------------------ | ----------------------------------------------------------------------------------------------- |
| Private balances, positions, orders, fills | `clearinghouseState`, `spotClearinghouseState`, `openOrders`, `userFills` over `POST /exchange` |

## Next steps

* [Authentication & Keys](/api/api-keys): signing and agent keys.
* [Exchange Methods](/api/exchange-methods): the unified `POST /exchange` actions and schemas.
* [API Quickstart](/api/setup): networks, base URLs, and your first request.


# Security

How HyperLink's secure enclave keeps Hyperliquid trading confidential, provably solvent, and always exitable, and what you still rely on to trust it.

HyperLink runs your trading inside a secure enclave (TEE), so your balances, positions, and open orders stay confidential. No one outside the enclave can read them. The deployed code measurement, reserve commitments, and exit path are verifiable on-chain.

## What HyperLink guarantees

* **Confidential by default.** Your balances, positions, and orders never touch the public chain. Only on-chain deposits and withdrawals are visible.
* **Provably solvent.** HyperLink commits reserve data on-chain. You can verify your own backing without revealing anyone's totals.
* **Always exitable.** You can withdraw on-chain even if HyperLink goes offline. Funds are never trapped.
* **Verifiable code.** The enclave publishes a measurement of the running code, so it can be compared with the expected deployment measurement.

## What you still rely on

HyperLink reduces trust but does not eliminate it. You rely on the integrity of the enclave hardware, the correctness of the deployed code, and the on-chain contracts staying live. The guarantees are strongest when you verify them yourself rather than assume.

## Verify it yourself

The on-chain contracts hold the code attestation, reserve commitments, and withdrawal logic behind these guarantees. See [Smart Contracts](/security/smart-contracts) for addresses, [Audits](/security/audits) for independent reviews, and [Risks](/security/risks) for the full risk picture.


# Risks

Risks to understand before using HyperLink, the prime broker for Hyperliquid: smart contract, enclave, market, privacy, and dependency risk categories.

HyperLink is a prime broker for Hyperliquid. Read these risks before depositing. This list is not exhaustive; evaluate each category against your own risk tolerance.

## Smart contract risk

HyperLink's withdrawals and on-chain verification depend on smart contracts on HyperEVM. A bug or vulnerability in any of them can lead to loss of funds. Addresses are listed on [Smart Contracts](/security/smart-contracts).

## Enclave / TEE risk

HyperLink runs all trading and balance logic inside a secure enclave (TEE), and privacy depends on the hardware isolation of that environment. A flaw in the enclave code, the hardware, or the underlying infrastructure could compromise privacy or funds, and an infrastructure outage can interrupt trading.

**Mitigation:** the enclave publishes a measurement of the running code, so it can be compared with the expected deployment measurement.

## Hyperliquid dependency risk

HyperLink routes every order into Hyperliquid and depends on it for execution, liquidity, and market data. HyperLink does not control Hyperliquid. If Hyperliquid suffers downtime or problems, you cannot trade through HyperLink.

**Mitigation:** your funds remain recoverable on-chain even if Hyperliquid is unavailable.

## Market / liquidity risk

You face the same market risks as a direct Hyperliquid trader: slippage on large orders, thin liquidity in some markets, funding-rate exposure, and liquidation when account value falls below maintenance margin. Maximum leverage is per-asset and currently lower than Hyperliquid's max margin tier for the same asset, so a position you could open elsewhere may exceed HyperLink's allowed leverage.

## Privacy limits

HyperLink hides balances, positions, and orders, but deposits and withdrawals are public on HyperCore. Anyone can see deposit and withdrawal amounts, addresses, and timing, and may try to correlate them with market activity. Privacy rests on the enclave's hardware isolation; inside the enclave, your activity is known to the running code.

## HyperEVM network risk

HyperLink's contracts run on HyperEVM (network chainId 999). As a newer network, it can experience downtime, consensus issues, or vulnerabilities affecting withdrawals and verification.

## Key / agent risk

You sign requests with EIP-712 signatures, and API keys are approved agent wallets. Loss or theft of a signing key exposes the account it controls. Agents can trade and query but **cannot** withdraw or approve other agents; withdrawals require your master account's own signature. See [Authentication & Keys](/api/api-keys).

## Related

* [Security](/security/security): the trust model and what you can verify.
* [Audits](/security/audits): independent security reviews.
* [FAQ](/more/faq): common questions.


# Audits

Independent security audits of HyperLink's smart contracts and TEE design by Sherlock, Trail of Bits, Obsidian Security, and Zenith Security firms.

HyperLink works with independent security researchers and audit firms to review its smart contracts, TEE design, and related security-critical code. HyperLink also runs continuous AI-assisted review and red-team testing with leading frontier models.

Audits are time-boxed reviews of a specific code version and scope. They do not guarantee that no vulnerabilities exist. Read [Risks](/security/risks) before depositing, and report security issues through the [Bug Bounty](/security/bug-bounty).

## Reports

| Date         | Report                                                                                                              | Scope                                        |
| ------------ | ------------------------------------------------------------------------------------------------------------------- | -------------------------------------------- |
| October 2025 | [Sherlock Collaborative Audit](https://drive.google.com/file/d/1RIFdU1Tz9HSl80bmbxAyHlrn17_Rh5dk/view)              | Smart contracts                              |
| January 2026 | [Trail of Bits AWS Nitro TEE Review](https://drive.google.com/file/d/1-EQdREvyDdUysd3UeCuibXlnJqPN_ofQ/view)        | TEE application and deployment controls      |
| March 2026   | [Obsidian Security Review](https://drive.google.com/file/d/1y5oe1SMgDllVRXqRFEHYRkDQbGmQTtx-/view)                  | hlHYPE smart contracts                       |
| May 2026     | [Zenith Smart Contract Security Assessment](https://drive.google.com/file/d/1bEuFpR6QwIFtjTvEBC4tGuXPU23mN9lc/view) | Smart contracts and mitigation review        |
| June 2026    | [Zenith Smart Contract Security Assessment](https://drive.google.com/file/d/1UKs6pyVstd9iMJKat-FmpckGMmBQvqTn/view) | Smart contract changes and mitigation review |


# Bug Bounty

HyperLink's bug bounty program: scope, severity-based rewards, and how to responsibly report vulnerabilities affecting funds, privacy, or trading integrity.

Report vulnerabilities that could affect HyperLink user funds, privacy, or trading integrity.

## Scope

In scope:

* Core deployed HyperLink contracts.
* Production API issues that can affect funds, privacy, or trading integrity.

Out of scope:

* Website or UI-only issues with no security impact.
* Documentation issues.
* Spam, denial-of-service testing, and generic rate-limit findings.
* Social engineering, phishing, or physical attacks.
* Third-party outages or vulnerabilities outside HyperLink's control.
* Issues that require stolen keys, leaked credentials, or privileged access.

## Rewards

| Severity | Reward                                               |
| -------- | ---------------------------------------------------- |
| Critical | 10% of funds at risk, up to $50,000, minimum $10,000 |
| High     | $2,500 to $8,000                                     |
| Medium   | $750                                                 |
| Low      | $250                                                 |

Severity and reward are determined by practical impact. Duplicate reports are paid to the first valid reporter.

## Rules

* Include a clear impact statement and reproduction steps.
* Include a runnable proof of concept for Critical and High reports.
* Do not exploit an issue beyond what is needed to prove impact.
* Do not move user funds or access user data.
* Do not publicly disclose the issue before HyperLink has remediated it.

## Submit a Report

Email reports to <bugbounty@hyperlink.xyz>.


# Smart Contracts

HyperLink's on-chain smart contracts on HyperEVM: addresses and purpose for deposits, withdrawals, fees, enclave verification, and hlHYPE staking.

HyperLink's on-chain contracts run on HyperEVM and handle deposits, withdrawals, fees, enclave verification, reserve commitments, and hlHYPE staking. Trading and balances stay private inside the enclave. On Hyperliquid, the relay operates in Standard account abstraction mode.

All contracts sit behind upgradeable proxies. Use the proxy address below; it is the stable, user-facing address.

## Contracts

| Contract                | Purpose                                                                                     |
| ----------------------- | ------------------------------------------------------------------------------------------- |
| **HyperlinkTokenRelay** | Processes on-chain deposits and submitted withdrawals; delegates staked HYPE to validators. |
| **StateManager**        | Stores the on-chain reserve commitments behind proof of reserves.                           |
| **EnclaveKeyRegistry**  | Registers and verifies the enclave's signing key against its published code.                |
| **ProtocolRegistry**    | Manages the user and token allowlists.                                                      |
| **FeeManager**          | Holds deposit and withdrawal fee configuration.                                             |
| **HLHYPE**              | The hlHYPE ERC-20 liquid staking token (18 decimals), rate-appreciating against HYPE.       |
| **StakingVault**        | Custodies HYPE backing hlHYPE and tracks the staking exchange rate.                         |
| **StakingVaultManager** | Entry point for staking: `deposit`, `queueWithdraw`, `claimWithdraw`.                       |

## Contract Addresses (HyperEVM mainnet, chainId 999)

| Contract                | Address                                      |
| ----------------------- | -------------------------------------------- |
| **EnclaveKeyRegistry**  | `0x420a822C59FD8f8da0d4A89F360bcec5B4FfbDC5` |
| **StateManager**        | `0x75b2abbd9C3C19B7Fd39Faa2a3eB5848E0cd594C` |
| **ProtocolRegistry**    | `0x69AA5409b3CfF93436E18e360bD94CB2B1c1C08E` |
| **FeeManager**          | `0x4eA4F24e569855b63a1D7ec9A98617b58952cC4a` |
| **HyperlinkTokenRelay** | `0x47472cD62C99b8b5Ce7e84e733515133e9AEC0bD` |
| **HLHYPE**              | `0xBee62d1b61Af920098873BD0336b46a5EFdC0E83` |
| **StakingVault**        | `0x4325Bb2dDe712Fc1A8cE304dc05DbC932Adb77DE` |
| **StakingVaultManager** | `0xC445ba9b8E27e083889Ee4ac2ed3415E4BC675f6` |

## Native HYPE

The contracts represent native HYPE with this sentinel address:

```
0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE
```

Treat that address as native HYPE wherever a token address is expected (for example, deposit and fee accounting).

## Related pages

* [Staking (hlHYPE)](/more/staking): staking and unstaking through StakingVaultManager.
* [Security](/security/security): what these contracts let you verify.


# Staking (hlHYPE)

Stake HYPE for hlHYPE, a liquid staking token from HyperLink, the prime broker for Hyperliquid, that grows in value as validator staking rewards accrue.

HyperLink lets you stake HYPE and receive hlHYPE, a liquid staking token whose value grows over time as Hyperliquid validator rewards accrue.

![Staking page on app.hyperlink.xyz/stake](https://2207501902-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F0PbqsfI3KNGmWZOY0Ggs%2Fuploads%2Fgit-blob-0df93009dd6eb5f8d6f89926e6b7af7eb0870d21%2Flst.png?alt=media)

{% hint style="info" %}
Stake, unstake, and claim in the web app at [app.hyperlink.xyz/stake](https://app.hyperlink.xyz/stake). It handles hlHYPE approvals and the contract calls for you.
{% endhint %}

## Stake HYPE

1. Go to [app.hyperlink.xyz/stake](https://app.hyperlink.xyz/stake) and connect your wallet.
2. Enter the amount of HYPE to stake.
3. Confirm the transaction.

You receive hlHYPE immediately, at the current exchange rate.

## Unstake HYPE

Unstaking is a three-step process:

1. **Queue your withdrawal** in the app. Your hlHYPE is burned once it's assigned to a batch.
2. **Wait for the unbonding period**: 7 days after your batch finalizes, plus a 12-hour claim buffer.
3. **Claim your HYPE** in the app once the window has passed.

You can cancel a queued withdrawal any time before you claim it, from the withdrawals list in the app.

## What is hlHYPE

hlHYPE is an ERC20 token that represents staked HYPE. Deposit HYPE, receive hlHYPE, and hold it wherever you like: your wallet, a multisig, DeFi.

Your hlHYPE balance stays fixed. What changes is its exchange rate against HYPE.

## Where the yield comes from

HYPE deposited into the vault is delegated to whitelisted Hyperliquid validators. Validators earn [staking rewards](https://hyperliquid.gitbook.io/hyperliquid-docs/hypercore/staking) for securing the network, and those rewards flow back into the vault.

As the vault's HYPE balance grows relative to the fixed supply of hlHYPE, the HYPE-per-hlHYPE exchange rate rises. Each hlHYPE you hold is worth more HYPE over time, with no action required on your part.

One hlHYPE is always redeemable for at least as much HYPE as when you staked it, never less, barring a validator slashing event.

Protocol rewards on top of the native staking yield are planned; details will be announced.

## Validator and metrics

* **Validator**: currently Nansen x HypurrCollective: `0xb8F45222a3246a2B0104696a1Df26842007c5Bc5`.
* **APR**: an estimate based on Hyperliquid validator stats. It changes with validator performance and network conditions.
* **TVL (USD)**: HYPE TVL multiplied by the live HYPE price.

Staking carries validator slashing risk and Hyperliquid unbonding delays. See [Risks](/security/risks) before staking.

## Why stake through HyperLink

* **Cheaper trading for everyone**: pooled stake contributes to HyperLink's own Hyperliquid staking tier, which is part of why HyperLink can offer the low, flat trading fees on the [Fees](/trade/fees) page to all users, whether or not they personally hold hlHYPE.
* **Stays liquid**: unlike staking directly, you can hold, transfer, or use hlHYPE while it's earning.
* **No staking or unstaking fees.**

| Property               | Value                                                            |
| ---------------------- | ---------------------------------------------------------------- |
| Standard               | ERC20                                                            |
| Decimals               | 18                                                               |
| Accrual model          | Rate-appreciating (not rebasing)                                 |
| Minimum stake          | 1 HYPE                                                           |
| Minimum unstake        | 0.5 HYPE                                                         |
| Maximum per withdrawal | 10,000 HYPE (larger amounts are split into chunks automatically) |
| Deposit cap            | None currently                                                   |

hlHYPE's smart contracts have been reviewed by Obsidian Security and Zenith; see [Audits](/security/audits).

## FAQ

### How long does unstaking take?

7 days of unbonding after your withdrawal batch finalizes, plus a 12-hour claim buffer. There's no way to skip this: it's the same delay Hyperliquid validators impose on unstaking.

### Are there any fees?

No. Staking and unstaking are both free.

### What if I change my mind after queuing a withdrawal?

Cancel it from the withdrawals list in the app any time before you claim, and your hlHYPE is restored.

### Will my hlHYPE ever be worth less HYPE than I staked?

No, not under normal operation. The exchange rate only rises. The one exception is a validator slashing event; see [Risks](/security/risks).

### Is staking on-chain?

Yes, entirely. There's no REST/API staking endpoint. All staking, unstaking, and claiming happens through the `StakingVaultManager` contract, which the web app calls on your behalf.

### Is there a minimum or maximum amount?

Minimum stake is 1 HYPE; minimum unstake is 0.5 HYPE. A single withdrawal is capped at 10,000 HYPE; larger amounts are automatically split into multiple withdrawals. There's currently no cap on total deposits.

## For integrators

The web app calls these `StakingVaultManager` methods directly. Use them if you're integrating without the web app; `withdrawId` comes from `queueWithdraw` and is required by the other two.

```solidity
StakingVaultManager.deposit();                                   // payable: msg.value = amount of HYPE to stake

uint256[] memory withdrawIds = StakingVaultManager.queueWithdraw(hlHYPEAmount);  // hlHYPEAmount: uint256, 18 decimals

StakingVaultManager.claimWithdraw(withdrawId, destination);       // reverts before unbonding + claim buffer elapses

StakingVaultManager.cancelWithdraw(withdrawId);                   // only before claim
```

## Next steps

* [Smart Contracts](/security/smart-contracts): full contract reference and addresses.
* [Risks](/security/risks): slashing, unbonding delays, and other staking considerations.
* [Bug Bounty](/security/bug-bounty): found a bug? Report it here.


# Official Links

Official HyperLink links: website, web app, API, documentation, and social channels, to help you avoid impersonation and stale endpoints when trading.

Use these links to avoid impersonation and stale endpoints.

| Resource               | Link                                                         |
| ---------------------- | ------------------------------------------------------------ |
| Website                | [hyperlink.xyz](https://hyperlink.xyz)                       |
| Web app                | [app.hyperlink.xyz](https://app.hyperlink.xyz)               |
| Documentation          | [This GitBook](/)                                            |
| API                    | `https://api.hyperlink.xyz`                                  |
| Discord                | [discord.gg/hyperlink](http://discord.gg/hyperlink)          |
| Telegram announcements | [@hyperlink\_xyz](https://t.me/hyperlink_xyz)                |
| X                      | [@hyperlink\_xyz](https://x.com/hyperlink_xyz)               |
| GitHub                 | [github.com/hyperlink-xyz](https://github.com/hyperlink-xyz) |


# Brand Assets

Official HyperLink logo and logomark assets and the hlHYPE icon, available for press coverage, integrations, and community use cases.

Use the official HyperLink and hlHYPE assets below. Keep the original colors, proportions, and clear space.

{% file src="/files/Or5DuZqRtJBzczk15BwK" %}
Logo, light version
{% endfile %}

{% file src="/files/Zfh0i9cWDybT5WJOWS6a" %}
Logo, dark version
{% endfile %}

{% file src="/files/lvybT8fTS2dMSMHLyss2" %}
Logomark, light version
{% endfile %}

{% file src="/files/2a46jLLhuhLmcozEwGJW" %}
Logomark, dark version
{% endfile %}

{% file src="/files/qFQerpBSS9pP1hnwoBxQ" %}
hlHYPE icon, PNG
{% endfile %}


# FAQ

Common questions about HyperLink: confidentiality, deposits and withdrawals, fees, trading, and API integration.

<details>

<summary>How does HyperLink relate to Hyperliquid?</summary>

HyperLink is a confidential trading layer **built on top of** Hyperliquid. The enclave routes your orders into Hyperliquid's order book, so you get Hyperliquid's liquidity and execution while your balances, positions, and open orders stay confidential. HyperLink mirrors Hyperliquid's API and EIP-712 signing, so existing Hyperliquid tooling works against it.

</details>

<details>

<summary>What stays confidential, and what is public?</summary>

| Confidential (inside the enclave)   | Public (on-chain on HyperCore) |
| ----------------------------------- | ------------------------------ |
| Balances and PnL                    | Deposit amounts                |
| Open positions                      | Withdrawal amounts             |
| Open orders, order and fill history |                                |

Only deposits and withdrawals are visible on-chain. See [Security](/security/security).

</details>

<details>

<summary>Can the HyperLink team see my trades?</summary>

No. The enclave is hardware-isolated; no one outside it can read your balances, positions, or orders, or extract keys. You can read your own state only with your own signature.

</details>

<details>

<summary>How do I know it runs the right code, and that my funds are backed?</summary>

The enclave publishes a measurement of the running code, and HyperLink commits reserve data on-chain. See [Security](/security/security).

</details>

<details>

<summary>Can I withdraw if HyperLink goes offline?</summary>

Yes. You can withdraw on-chain to your wallet if HyperLink goes offline. Funds are never trapped. See [Deposits & Withdrawals](/trade/deposits).

</details>

<details>

<summary>How long does a deposit take?</summary>

A deposit is credited once it is confirmed on HyperCore.

</details>

<details>

<summary>What are the minimums and fees?</summary>

There is no deposit fee. Deposits and withdrawals are gasless. See [Fees](/trade/fees) for current minimums and withdrawal fees.

</details>

<details>

<summary>Can I deposit any token?</summary>

No. Only allowlisted tokens can be deposited. The app shows the current set in the deposit dialog.

</details>

<details>

<summary>What does it cost, and how much leverage can I use?</summary>

HyperLink pools volume and staking benefits so users can access the lowest Hyperliquid trading fee rates available to the protocol. See [Fees](/trade/fees). Maximum leverage is **per-asset** and currently lower than Hyperliquid's [max margin tier](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/margin-tiers) for the same asset. See [Trading](/trade/trading) for how HyperLink differs from Hyperliquid.

</details>

<details>

<summary>What happens to Hyperliquid points or airdrops when I trade through HyperLink?</summary>

Any retroactive points or airdrops received by the protocol will be distributed pro rata based on user trading volume. HyperLink will clearly announce each distribution.

</details>

<details>

<summary>How is auto-deleveraging (ADL) handled?</summary>

ADL follows Hyperliquid's priority: positions are deleveraged by profitability, highest unrealized ROE first. Your exposure matches trading Hyperliquid directly.

</details>

<details>

<summary>Can I trade both spot and perps?</summary>

Yes. Spot and DEX balances are separate; transfer between them using the `sendAsset` action.

</details>

<details>

<summary>Is there a HyperLink SDK?</summary>

Use the HyperLink Python SDK for Python integrations. For other languages, use a Hyperliquid SDK pointed at the HyperLink base URL. See [SDKs](/api/sdks).

</details>

<details>

<summary>How do I create an API key?</summary>

An API key is an approved agent wallet. Create one in the web app (**Settings → API → Generate**) or with the `approveAgent` action. Agents can trade and query but cannot withdraw. See [Authentication & Keys](/api/api-keys).

</details>

***

**Related:** [Getting Started](/start/getting-started) · [Security](/security/security) · [Risks](/security/risks)


# Terms of Use

The Terms of Use governing access to and use of HyperLink's web app, API, and other interfaces, including risk disclosures and dispute resolution.

**Effective Date:** May 26, 2026

These Terms of Use (the **"Terms"**) govern your access to and use of HyperLink interfaces, including the web application at app.hyperlink.xyz, the API at api.hyperlink.xyz, any agent, Telegram, developer, or other interface, our documentation, and related software or services that link to these Terms (collectively, the **"Interface"**).

For purposes of these Terms, **"HyperLink"**, **"we"**, **"us"**, and **"our"** mean HyperLink and the persons or entities that operate, host, develop, maintain, or make the Interface available. **"You"** means the individual or entity accessing or using the Interface.

**Please read these Terms carefully. They include important risk disclosures, disclaimers, limitations of liability, a binding arbitration agreement, and a class action waiver.**

By accessing or using the Interface, connecting a wallet, clicking to accept, or otherwise indicating acceptance, you agree to these Terms and to our Privacy Policy. If you do not agree, do not access or use the Interface.

## 1. Eligibility

You may use the Interface only if you are eligible to do so. By accessing or using the Interface, you represent and warrant that:

* you are at least 18 years old and have legal capacity to agree to these Terms;
* if you use the Interface on behalf of an entity, you are authorized to bind that entity;
* you are not a U.S. person;
* you are not located in, incorporated in, organized under the laws of, ordinarily resident in, or accessing the Interface from any jurisdiction that is subject to comprehensive sanctions or embargoes, or that we designate as restricted from time to time;
* you are not subject to sanctions and are not listed on, owned by, controlled by, or acting on behalf of any person listed on any sanctions or restricted-party list maintained by the United States, United Nations, United Kingdom, European Union, Singapore, or any other applicable authority; and
* your access to and use of the Interface is lawful under all laws that apply to you.

You may not use a VPN, proxy, remote-access tool, false information, or any other method to disguise your location or circumvent any access restriction.

We may restrict, suspend, terminate, block, geofence, screen, or otherwise limit access to the Interface at any time, with or without notice. We may also request identity, eligibility, source-of-funds, or other compliance information at any time. We may deny or terminate access if you do not provide requested information or if we determine, in our sole discretion, that your use creates legal, regulatory, security, reputational, or operational risk.

## 2. The Interface

The Interface is software that enables users to access certain blockchain networks, decentralized protocols, smart contracts, trading venues, wallets, APIs, and other third-party services.

We provide and maintain the Interface only. We do not guarantee the availability, security, performance, accuracy, or continued operation of any blockchain, protocol, smart contract, wallet, venue, API, bridge, oracle, validator, relayer, infrastructure provider, or other third-party service.

You use the Interface and any systems accessed through it at your own risk. Transactions may be processed by blockchain networks, autonomous software, and third-party systems that we do not control. Blockchain transactions are generally irreversible. We cannot guarantee that any transaction can be cancelled, reversed, recovered, modified, or corrected.

The Interface is not the only way to access any underlying protocol or blockchain system.

## 3. Wallets and Credentials

To use the Interface, you may need to connect a self-custodial wallet or use access credentials, agent credentials, API keys, or similar tools.

You are solely responsible for safeguarding your wallet, private keys, seed phrases, devices, passwords, API keys, agent credentials, Telegram account, and other credentials. You are responsible for all activity conducted through them, whether or not authorized by you.

We do not have access to your private keys or seed phrases and cannot recover them. We are not responsible for any loss arising from lost, stolen, compromised, or misused wallets or credentials.

## 4. Fees and Taxes

Use of the Interface may involve fees, including transaction fees, protocol fees, trading fees, withdrawal fees, network fees, gas costs, or third-party fees. Fees may change at any time and may be effective immediately when posted, displayed, charged, or implemented.

Network fees and third-party fees are outside our control. Except as required by law, all fees are non-refundable.

You are solely responsible for determining, reporting, withholding, collecting, and paying any taxes, duties, and related obligations arising from your use of the Interface.

## 5. Prohibited Conduct

You agree not to:

* violate any applicable law, regulation, sanctions requirement, export-control rule, anti-money-laundering rule, counter-terrorism-financing rule, securities law, commodities law, derivatives law, tax law, or market-abuse rule;
* use the Interface if you are ineligible or restricted;
* use the Interface on behalf of, or for the benefit of, any sanctioned person or restricted person;
* evade any eligibility, geographic, compliance, security, or access restriction;
* engage in fraud, market manipulation, wash trading, spoofing, front-running, abusive trading, deceptive conduct, or other unlawful or improper activity;
* use the Interface to launder money, finance terrorism, evade sanctions, conceal proceeds of crime, or facilitate illegal activity;
* exploit bugs, vulnerabilities, errors, pricing issues, or system limitations;
* interfere with, disrupt, attack, overload, scrape, crawl, reverse engineer, or attempt to gain unauthorized access to the Interface or related infrastructure;
* introduce malware, harmful code, spam, or abusive traffic; or
* use the Interface in any manner that we determine, in our sole discretion, may harm HyperLink, users, third parties, or the integrity of the Interface.

We may take any action we deem appropriate in response to prohibited conduct, including restricting access, blocking transactions where technically feasible, reporting activity to authorities, or cooperating with investigations.

## 6. Changes, Availability, and Suspension

We may change, update, suspend, restrict, disable, replace, or discontinue the Interface or any part of it at any time, for any reason or no reason, with or without notice, and without liability to you.

We may also restrict, suspend, or terminate your access at any time, with or without notice, including if we believe you have violated these Terms, are ineligible, may create risk, or for any other reason.

We do not guarantee that the Interface will be available, uninterrupted, secure, accurate, or error-free.

## 7. Assumption of Risk

You acknowledge and accept all risks associated with digital assets, blockchain technology, trading, leverage, smart contracts, third-party systems, and use of the Interface. You may lose some or all of your assets.

Risks include, without limitation:

* **Market risk.** Digital assets are volatile. Trading, including leveraged trading, can result in rapid and total loss.
* **Technology risk.** Software, smart contracts, blockchain networks, wallets, APIs, and infrastructure may contain bugs, errors, vulnerabilities, or design flaws, and may be exploited, attacked, delayed, congested, unavailable, or discontinued.
* **Third-party risk.** The Interface may depend on third-party protocols, venues, wallets, networks, service providers, and infrastructure that we do not control.
* **Liquidity and execution risk.** Orders may fail, be delayed, be executed at unexpected prices, or not be executed. Liquidity may be insufficient or unavailable.
* **Shared infrastructure risk.** Assets, transactions, or activity may be routed, processed, held, or otherwise handled through shared protocol or third-party infrastructure. An issue affecting shared infrastructure may affect multiple users, including you.
* **Regulatory risk.** Laws and regulatory interpretations may change and may adversely affect the Interface, any protocol, your access, or your transactions.
* **Operational and security risk.** Systems may fail, credentials may be compromised, data may be unavailable or inaccurate, and unauthorized parties may access accounts, wallets, or systems.
* **Blockchain finality risk.** Transactions may be irreversible, and public blockchain data may be permanent.

This list is not exhaustive. You are solely responsible for understanding and evaluating all risks before using the Interface.

## 8. No Advice; No Fiduciary Relationship

Nothing provided through the Interface, documentation, community channels, support channels, analytics, or other communications is financial, investment, legal, tax, accounting, trading, or other professional advice.

We do not recommend, endorse, or make any representation about any transaction, trading strategy, asset, venue, protocol, wallet, or third-party service. You are solely responsible for your decisions and should consult your own advisers.

These Terms do not create any fiduciary, advisory, agency, partnership, joint venture, trust, or similar relationship between you and us. Our only duties are those expressly stated in these Terms.

## 9. Third-Party Services

The Interface may integrate with, link to, or depend on third-party websites, applications, protocols, wallets, networks, venues, APIs, infrastructure, and services. We do not control third-party services and are not responsible for them.

Your use of third-party services may be subject to separate terms and policies. We make no representation or warranty regarding any third-party service, and any integration, link, or reference does not imply endorsement.

## 10. Disclaimer of Warranties

THE INTERFACE IS PROVIDED ON AN **"AS IS"** AND **"AS AVAILABLE"** BASIS, WITH ALL FAULTS AND WITHOUT WARRANTY OF ANY KIND.

TO THE FULLEST EXTENT PERMITTED BY LAW, HYPERLINK AND ITS AFFILIATES, DEVELOPERS, OPERATORS, CONTRIBUTORS, SERVICE PROVIDERS, OFFICERS, DIRECTORS, EMPLOYEES, CONTRACTORS, AGENTS, REPRESENTATIVES, AND LICENSORS (COLLECTIVELY, THE **"HYPERLINK PARTIES"**) DISCLAIM ALL WARRANTIES, EXPRESS, IMPLIED, STATUTORY, OR OTHERWISE, INCLUDING WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE, NON-INFRINGEMENT, ACCURACY, AVAILABILITY, SECURITY, AND RELIABILITY.

WE DO NOT WARRANT THAT THE INTERFACE WILL BE UNINTERRUPTED, SECURE, ACCURATE, COMPLETE, ERROR-FREE, FREE OF HARMFUL COMPONENTS, OR THAT DEFECTS WILL BE CORRECTED.

Some jurisdictions do not allow certain disclaimers, so some disclaimers may not apply to you. In those jurisdictions, warranties are disclaimed to the fullest extent permitted by law.

## 11. Limitation of Liability

TO THE FULLEST EXTENT PERMITTED BY LAW, THE HYPERLINK PARTIES WILL NOT BE LIABLE FOR ANY INDIRECT, INCIDENTAL, SPECIAL, CONSEQUENTIAL, EXEMPLARY, PUNITIVE, OR SIMILAR DAMAGES, OR FOR ANY LOSS OF PROFITS, REVENUE, DATA, GOODWILL, OPPORTUNITY, USE, OR DIGITAL ASSETS, ARISING OUT OF OR RELATING TO THESE TERMS, THE INTERFACE, OR ANY THIRD-PARTY SERVICE, WHETHER BASED ON CONTRACT, TORT, NEGLIGENCE, STRICT LIABILITY, STATUTE, OR ANY OTHER THEORY, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.

TO THE FULLEST EXTENT PERMITTED BY LAW, THE HYPERLINK PARTIES' TOTAL CUMULATIVE LIABILITY FOR ALL CLAIMS ARISING OUT OF OR RELATING TO THESE TERMS OR THE INTERFACE WILL NOT EXCEED THE LESSER OF: (A) THE FEES YOU PAID DIRECTLY TO US, EXCLUDING NETWORK, GAS, PROTOCOL, TRADING VENUE, AND THIRD-PARTY FEES, IN THE SIX MONTHS BEFORE THE EVENT GIVING RISE TO THE CLAIM; OR (B) USD 100.

Some jurisdictions do not allow certain limitations of liability. In those jurisdictions, liability is limited to the fullest extent permitted by law.

## 12. Release

To the fullest extent permitted by law, you release the HyperLink Parties from all claims, demands, damages, losses, liabilities, and disputes arising out of or relating to your use of the Interface, any transaction, any protocol, any blockchain network, any third-party service, any other user, or any risk described in these Terms.

## 13. Indemnification

You agree to indemnify, defend, and hold harmless the HyperLink Parties from and against all claims, demands, actions, investigations, liabilities, damages, losses, costs, and expenses, including reasonable legal fees, arising out of or relating to:

* your access to or use of the Interface;
* your transactions, assets, wallet, credentials, or activity;
* your breach of these Terms;
* your violation of law or third-party rights; or
* your fraud, negligence, misconduct, or prohibited conduct.

We may control the defense of any indemnified matter at your expense. You may not settle any matter without our prior written consent.

## 14. Intellectual Property; Feedback

The Interface and related software, content, designs, logos, trademarks, documentation, and materials are owned by us or our licensors and are protected by intellectual-property laws.

Subject to these Terms, we grant you a limited, revocable, non-exclusive, non-transferable, non-sublicensable license to access and use the Interface as permitted by these Terms. We reserve all rights not expressly granted.

If you provide feedback, ideas, or suggestions, you grant us a perpetual, irrevocable, worldwide, royalty-free license to use them for any purpose without restriction or compensation.

## 15. Changes to These Terms

We may modify these Terms at any time. Revised Terms are effective when posted unless we state otherwise. Your continued access to or use of the Interface after revised Terms are posted constitutes your acceptance. If you do not agree, stop using the Interface.

## 16. Governing Law; Arbitration; Class Action Waiver

These Terms and any dispute arising out of or relating to these Terms or the Interface are governed by the laws of Singapore, without regard to conflict-of-laws principles.

The parties will first attempt to resolve any dispute informally. Any dispute, claim, or controversy arising out of or relating to these Terms or the Interface, including any question regarding existence, validity, breach, termination, or enforceability, that is not resolved informally will be finally resolved by binding arbitration administered by the Singapore International Arbitration Centre under the SIAC Rules then in effect.

The seat of arbitration is Singapore. The language of arbitration is English. The tribunal will consist of one arbitrator. The award will be final and binding.

**Any proceeding will be conducted only on an individual basis and not in a class, collective, consolidated, mass, private-attorney-general, or representative proceeding. You waive any right to participate in any class action or class-wide arbitration.**

To the fullest extent permitted by law, you and we waive any right to a jury trial.

Either party may seek injunctive or equitable relief in any court of competent jurisdiction to protect intellectual property, confidential information, security, sanctions compliance, anti-money-laundering compliance, or eligibility restrictions.

## 17. Termination; Survival

You may stop using the Interface at any time. We may suspend or terminate your access as described in these Terms.

Any provision that by its nature should survive termination will survive, including Sections 4 and 7 through 18.

## 18. General

**Entire agreement.** These Terms and the Privacy Policy are the entire agreement between you and us regarding the Interface and supersede all prior agreements.

**Assignment.** We may assign these Terms at any time, with or without notice. You may not assign these Terms without our prior written consent.

**Severability.** If any provision is unenforceable, it will be modified or severed to the minimum extent necessary, and the remaining provisions will remain in effect.

**No waiver.** Our failure to enforce any provision is not a waiver.

**No third-party beneficiaries.** Except for the HyperLink Parties, these Terms do not create rights for any third party.

**Force majeure.** We are not liable for any delay or failure caused by events beyond our reasonable control, including network failures, third-party outages, cyberattacks, market disruptions, natural disasters, war, terrorism, labor disputes, regulatory action, sanctions, or governmental action.

**Electronic communications.** You consent to receive communications and notices electronically, including through the Interface, documentation, or other electronic means.

**Language.** These Terms are drafted in English, and the English version controls.

## 19. Contact

For questions about these Terms, contact <legal@hyperlink.xyz>.


# Privacy Policy

HyperLink's Privacy Policy: what information is collected across the web app, API, and other interfaces, and how that information is used and shared.

**Effective Date:** May 26, 2026

This Privacy Policy explains how HyperLink handles information in connection with HyperLink interfaces, including the web application at app.hyperlink.xyz, the API at api.hyperlink.xyz, any agent, Telegram, developer, or other interface, our documentation, and related software or services that link to this Policy (collectively, the **"Interface"**).

For purposes of this Policy, **"HyperLink"**, **"we"**, **"us"**, and **"our"** mean HyperLink and the persons or entities that operate, host, develop, maintain, or make the Interface available.

By accessing or using the Interface, you acknowledge this Policy.

## 1. Information We Collect

We aim to collect only the information reasonably needed to operate, secure, maintain, and improve the Interface.

### Information you provide or authorize

We may collect:

* **Wallet information**, including public wallet addresses, signatures, authentication events, connected-wallet status, and related public blockchain information;
* **Credential and account metadata**, including agent credentials, API-key metadata, names or labels you assign, permissions, creation dates, and usage events;
* **Telegram-linking information**, if you use Telegram-linked features, including identifiers and authentication metadata needed to provide those features;
* **Communications**, including information you provide when you contact us; and
* **Compliance information**, if requested, including information used to assess eligibility, sanctions risk, fraud risk, misuse, or legal compliance.

### Information collected automatically

When you use the Interface, we and our service providers may collect:

* **Device and connection data**, including IP address, browser type, device type, operating system, referring URL, pages viewed, timestamps, approximate location inferred from IP address, and standard server-log information;
* **Usage and performance data**, including page views, API usage, latency, errors, referrers, session events, and feature usage;
* **Security and compliance data**, including risk signals, rate-limit data, abuse indicators, geofencing signals, sanctions-screening results, and allowlist or blocklist status; and
* **Cookies and similar technologies**, as described below.

### Public blockchain information

Public blockchains are transparent. Wallet addresses, deposits, withdrawals, transaction hashes, token transfers, contract interactions, timestamps, and other on-chain activity may be public, permanent, and outside our control.

### Information we do not intentionally collect

We do not intentionally collect government IDs, legal names, dates of birth, residential addresses, or similar KYC information unless we determine it is necessary for legal, compliance, security, or risk-management reasons.

We do not have access to your self-custodial wallet private keys or seed phrases.

Technical protections may apply to certain transactions or instructions. However, public blockchain data and metadata, including timing, routing, size, IP-derived information, wallet information, and request information, may still be processed by us or our service providers.

## 2. How We Use Information

We may use information to:

* provide, operate, maintain, secure, and improve the Interface;
* authenticate wallets, credentials, API keys, and supported integrations;
* route, process, and display user-authorized instructions and related status information;
* provide support and respond to communications;
* monitor performance, debug errors, and improve reliability;
* detect, prevent, investigate, and respond to fraud, abuse, security incidents, prohibited conduct, and unlawful activity;
* enforce our Terms of Use, including eligibility, geofencing, sanctions, allowlist, and blocklist controls;
* comply with legal obligations, lawful requests, sanctions requirements, anti-money-laundering obligations, and regulatory inquiries;
* protect the rights, property, safety, and security of HyperLink, users, service providers, and others; and
* conduct analytics and measurement.

We do not sell personal information. We do not use personal information for targeted advertising.

## 3. Legal Bases

Where a legal basis is required, we process information as necessary to provide the Interface, perform or enforce our Terms of Use, comply with legal obligations, protect legitimate interests in security and abuse prevention, and, where applicable, based on your consent.

## 4. How We Share Information

We may share information with:

* **service providers**, including hosting, infrastructure, analytics, authentication, key-management, security, compliance, and support providers;
* **affiliates, contributors, and professional advisers**, including lawyers, auditors, insurers, accountants, and consultants;
* **authorities or other parties when legally required**, including to comply with law, legal process, sanctions obligations, regulatory requests, or to protect rights, safety, and security;
* **transaction counterparties**, in connection with a merger, financing, reorganization, transfer, sale, or similar transaction involving all or part of HyperLink; and
* **public blockchains and third-party protocols**, when you submit transactions or otherwise interact with blockchain systems.

Service providers receive information only as reasonably needed to perform their functions and are subject to their own terms and privacy practices.

## 5. Cookies and Similar Technologies

The Interface may use cookies, local storage, and similar technologies to maintain sessions, remember preferences, authenticate wallet connections, secure the Interface, measure performance, and provide basic functionality.

We do not use advertising cookies or third-party tracking cookies for behavioral advertising.

You can adjust your browser settings to block or delete cookies, but some features may not work properly.

## 6. Data Retention

We retain information for as long as reasonably necessary or permitted to provide the Interface, comply with legal obligations, resolve disputes, enforce our Terms of Use, prevent fraud and abuse, maintain security, and support legitimate operational purposes.

Server logs and analytics records are generally retained for limited periods, subject to operational needs and provider practices.

Public blockchain data may be permanent and cannot be deleted, modified, or controlled by us.

## 7. Security

We use commercially reasonable technical and organizational measures designed to protect the information we process. These measures may include encryption, access controls, monitoring, rate limiting, credential-management controls, and other safeguards.

No system is perfectly secure. We cannot guarantee that information will be secure or free from unauthorized access, loss, misuse, or alteration.

## 8. International Transfers

We and our service providers may process information in jurisdictions other than where you are located. Those jurisdictions may have data-protection laws different from those in your jurisdiction. Where required, we use appropriate safeguards for international transfers.

## 9. Your Choices and Rights

You may stop using the Interface at any time. You may disconnect your wallet, delete local browser data, revoke permissions where supported, and stop using credentials or integrations.

Depending on your jurisdiction, you may have rights to request access, correction, deletion, portability, restriction, objection, or withdrawal of consent. These rights may be limited where information is pseudonymous, public on-chain, necessary for security or legal compliance, or not reasonably capable of being linked to you without additional information.

To protect users, we may require you to verify control of a wallet address, including by signing a message, before responding to a request about wallet-linked information.

You may also have the right to lodge a complaint with your local data-protection authority.

To make a privacy request, contact <privacy@hyperlink.xyz>.

## 10. Children

The Interface is not intended for anyone under 18. We do not knowingly collect personal information from children.

## 11. Third-Party Links and Services

The Interface may link to or depend on third-party websites, applications, wallets, protocols, APIs, blockchains, infrastructure providers, or other services. We are not responsible for the privacy practices of third parties. Review their policies before using them.

## 12. Changes to this Policy

We may update this Policy at any time. Updates are effective when posted with a new effective date, unless otherwise stated. Your continued use of the Interface after an update means you acknowledge the updated Policy.

## 13. Contact

For privacy questions or requests, contact <privacy@hyperlink.xyz>.


