# Market making HXMR on Hyperliquid

> How to make a market in HXMR/USDC on Hyperliquid (spot @1193): what earns and what costs money, how to move inventory between XMR and HXMR with the Wagyu bridge, the fee waiver for market makers, the order rules and a starter bot.

**HXMR/USDC** on Hyperliquid (spot market `@1193`) is the order book for wrapped Monero. HXMR is redeemable 1:1 for XMR through the Wagyu [native bridge](https://docs.wagyu.xyz/native-bridge.md), so a market maker can quote both sides of the book and settle the inventory it builds up in real Monero. This page is for traders who want to do that: what you need, how the money flows, what you can earn and what can go wrong.

In the Wagyu app this market is shown as [XMR/USDC](https://app.wagyu.xyz/trade?market=XMR/USDC). On Hyperliquid it is HXMR/USDC, spot market `@1193`. They are the same order book; these pages call it HXMR/USDC.

You do not need Wagyu's permission to quote: the book is public and open to every Hyperliquid account. You only talk to Wagyu to move inventory across the bridge and, if you want it, to have the withdrawal fee waived for your address.

> **Want a bot built for you?:** [Build a hedged market-making bot](https://docs.wagyu.xyz/market-making-bot.md) is a complete spec, with a prompt to paste into Claude Code: quoting, a hedge on the XMR perp and automatic USDC moves between spot and perps.

> **Check the token before you trade:** HXMR is token index `1339`, token ID `0x700beac50c950503f401d218e52014e7`, spot market `@1193`. A token with the same ticker but another token ID is not Wagyu's and cannot be redeemed for XMR. The full [token identity](https://docs.wagyu.xyz/native-bridge.md#hxmr-token-identity) is on the bridge page.

## What you need

| What | Why |
| --- | --- |
| A Hyperliquid account with USDC | Your quotes on the bid side are paid in USDC. |
| The account's private key in a `.env` file | Signs your bot's orders. Use a fresh account that holds only the bot's funds, and never paste the key into a chat or commit it. |
| XMR, HXMR or both | Inventory for the ask side. Bridge XMR in to get HXMR (below). The bridge minimum is 0.005 XMR per order. |
| A Monero wallet you control | Receives XMR when you redeem HXMR. |
| An XMR price | Your fair value: the Hyperliquid XMR perp, or an exchange you trust. HXMR tracks XMR, so quote around the XMR price, not around the HXMR book. |
| A bot | The [starter code](#a-minimal-quoting-loop) below, or the [full bot spec](https://docs.wagyu.xyz/market-making-bot.md). |

## How the money flows

How inventory moves: USDC and HXMR trade on Hyperliquid; HXMR and XMR move through the Wagyu bridge.

- **USDC**: Hyperliquid spot
- **HXMR**: Hyperliquid spot @1193
- **XMR**: Your Monero wallet

- USDC → HXMR: Buy HXMR (your bids fill).
- HXMR → USDC: Sell HXMR (your asks fill).
- HXMR → XMR: Bridge withdrawal.
- XMR → HXMR: Bridge deposit.

- When your **bids** fill you accumulate HXMR. Redeem the surplus to XMR with a bridge **withdrawal**.
- When your **asks** fill you run out of HXMR. Refill it from XMR with a bridge **deposit**.
- The bridge is your exit. Each HXMR is backed 1:1 by XMR in Wagyu's reserve, so you can turn a one-sided book back into Monero.

## How fills arrive

- **In bursts.** One large order can take several levels of your ladder in a second.
- **Often one-sided for a while.** On a day when XMR is falling, most fills can be sales to you: your USDC shrinks and your HXMR grows until buyers return or you redeem through the bridge.

Bring enough USDC for that, and decide in advance what the bot does when it runs out (the [bot spec](https://docs.wagyu.xyz/market-making-bot.md#when-the-usdc-runs-out) covers it).

**Ask for the fee waiver before you bid in size.** Every HXMR you buy leaves through your asks or through the bridge, and redeeming without a waiver costs 2%, more than a normal spread.

## The economics (what drives your PnL)

Nobody can tell you your PnL in advance: it depends on your spread, your volume, the XMR price and how often you rebalance. These are the pieces that make it up.

| | Effect | How to manage it |
| --- | --- | --- |
| **Spread captured** | Income: the difference between where you buy and sell HXMR. | Quote inside the current spread to get fills, wide enough to cover the costs below. |
| **Hyperliquid fees** | Cost (or rebate) per fill, from Hyperliquid's own [fee schedule](https://hyperliquid.gitbook.io/hyperliquid-docs/trading/fees). Maker fees are lower than taker fees and fall with your 14-day volume. | Post only (`Alo`), so every fill pays the maker rate. |
| **Bridge deposit (XMR → HXMR)** | 0% right now, plus the Monero network fee you pay to send it. | Free to refill the ask side. |
| **Bridge withdrawal (HXMR → XMR)** | 2% right now, unless you have a [market-maker waiver](#fee-waiver-for-market-makers). | Ask for the waiver before you redeem in size. |
| **Inventory risk** | Gain or loss on the XMR you hold while the price moves. | [Hedge it on the XMR perp](https://docs.wagyu.xyz/market-making-bot.md#hedging-with-the-xmr-perp), or keep inventory small. |
| **Bridge latency** | A deposit is credited after 2–10 Monero confirmations (about 2 minutes each; more for large deposits). Redeemed XMR is spendable 10 blocks after it lands. | Keep a buffer of both assets so a fill never waits for the bridge. |

The bridge fees also set the **arbitrage band** around the XMR price:

- If HXMR trades **above** XMR, buy XMR, deposit it (0% fee) and sell the HXMR.
- If HXMR trades **below** XMR, buy HXMR, withdraw it and sell the XMR. Without a waiver this pays only once the discount exceeds the 2% withdrawal fee. With a waiver the band on that side closes to your trading costs and the bridge latency.

The live fees and minimums are always in `GET /v2/bridges/terms` and on the [bridge page](https://docs.wagyu.xyz/native-bridge.md#availability-fees-and-minimums). Read them from the API in your bot; do not hard-code them.

## Fee waiver for market makers

Wagyu can waive or reduce the withdrawal fee for the Hyperliquid addresses a market maker sends HXMR from. Message [Wagyu support](https://t.me/wagyu_support) with:

- the Hyperliquid address (or addresses) your HXMR withdrawals will be **sent from**;
- roughly how much you expect to quote and redeem.

A waiver belongs to one sending address. Once it is set up:

- Send all the HXMR for a withdrawal order **from that one address**. If two addresses fund the same order, no address's waiver applies and the order pays the standard fee.
- Check that the waiver applies before you send: pass your address as `senderAddress` on the quote, `GET /v2/bridges/quote?asset=xmr&direction=withdraw&amount=…&senderAddress=0x…`, and read the fee it returns. The fee actually charged is computed from the address the HXMR really came from, not from the hint.

## Hyperliquid order rules for HXMR

| Field | Value |
| --- | --- |
| Coin name in the info and WebSocket APIs | `@1193` |
| Asset ID for orders | `11193` (spot orders use `10000` + the spot market index) |
| Size decimals (`szDecimals`) | `5`: the smallest size is 0.00001 HXMR |
| Price | At most 5 significant figures and at most 3 decimals (`8 − szDecimals` for spot). Integer prices are always valid. |
| Minimum order value | 10 USDC (Hyperliquid's minimum for every order) |
| Post-only | Time in force `Alo`: the order is cancelled instead of taking liquidity |

Hyperliquid's own rules are in its docs: [asset IDs](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/asset-ids), [tick and lot size](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/tick-and-lot-size) and [rate limits](https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/rate-limits-and-user-limits). Read the token's identity from `spotMeta` at start-up rather than trusting a copied constant.

## Moving inventory across the bridge

The bridge API is public; no key is needed. Create one order per transfer, then send the funds to the address the order gives you. The full reference is on the [bridge page](https://docs.wagyu.xyz/native-bridge.md).

### XMR → HXMR (refill the ask side)

<!-- Creates a real order -->
```bash
curl -X POST 'https://api.wagyu.xyz/v2/bridges' \
  -H 'content-type: application/json' \
  -d '{ "asset": "xmr", "direction": "deposit", "toAddress": "<your Hyperliquid address>" }'
```

Send XMR to the order's `depositAddress`. HXMR is credited to `toAddress` for what actually arrives, once it has its confirmations. Send to the address your bot trades from.

### HXMR → XMR (redeem bought inventory)

<!-- Creates a real order -->
```bash
curl -X POST 'https://api.wagyu.xyz/v2/bridges' \
  -H 'content-type: application/json' \
  -d '{ "asset": "xmr", "direction": "withdraw", "toAddress": "<your Monero address>", "senderAddress": "<Hyperliquid address sending the HXMR>" }'
```

The order waits in `awaiting_hxmr`. Send HXMR on Hyperliquid (a spot transfer from the bot's account) to the address in the order's `xmr1DepositAddress` field (the field keeps its older name; it is the HXMR deposit address). It can be `null` for a moment after creation; read the order again until it is set. The XMR payout is computed from the HXMR that arrives, minus the fee for the address it came from.

Save each order's `orderId` and `sessionId` and track it with `GET /v2/bridges/{id}` until it is `completed`. The [order lifecycle](https://docs.wagyu.xyz/order-lifecycle.md) explains every status.

## A minimal quoting loop

A starting point in Python with Hyperliquid's official [Python SDK](https://github.com/hyperliquid-dex/hyperliquid-python-sdk) (`pip install hyperliquid-python-sdk python-dotenv`). It quotes one post-only bid and ask around the XMR perp price, and requotes only when that price moves. It runs as pasted once `HL_PRIVATE_KEY` is in a `.env` file next to it. It is a sketch, not a strategy: add inventory limits, risk checks and error handling before you put real money behind it.

<!-- Python -->
```python
import os, time
import eth_account
from dotenv import load_dotenv
from hyperliquid.exchange import Exchange
from hyperliquid.info import Info
from hyperliquid.utils import constants

load_dotenv()                                                        # reads HL_PRIVATE_KEY from .env
COIN = "@1193"                                                       # HXMR/USDC
wallet = eth_account.Account.from_key(os.environ["HL_PRIVATE_KEY"])  # the bot's own account

info = Info(constants.MAINNET_API_URL, skip_ws=True)
exchange = Exchange(wallet, constants.MAINNET_API_URL)

HALF_SPREAD = 0.006   # 0.6% each side of fair value: tune it to cover fees and risk
SIZE = 0.1            # HXMR per side (at least 10 USDC of value)
REQUOTE = 0.001       # requote only when fair value moves 0.1%: every action counts against the rate limit

def price(x: float) -> float:
    """At most 5 significant figures and 3 decimals."""
    return round(float(f"{x:.5g}"), 3)

def fair_value() -> float:
    """The XMR perp mid on Hyperliquid. Swap in your own XMR/USD price if you prefer. Never the HXMR book."""
    return float(info.all_mids()["XMR"])

quoted = None
while True:
    fair = fair_value()
    if quoted and abs(fair / quoted - 1) < REQUOTE:
        time.sleep(1)
        continue
    quoted = fair
    for o in info.open_orders(wallet.address):
        if o["coin"] == COIN:
            exchange.cancel(COIN, o["oid"])
    post_only = {"limit": {"tif": "Alo"}}
    exchange.order(COIN, True, SIZE, price(fair * (1 - HALF_SPREAD)), post_only)   # bid
    exchange.order(COIN, False, SIZE, price(fair * (1 + HALF_SPREAD)), post_only)  # ask
```

This loop does not hedge and does not look at your balances: once one side has filled a few times, its orders are rejected for lack of funds.

Before real money, a bot also needs inventory limits, a kill switch, WebSockets instead of polling, and care with Hyperliquid's rate limit (1 action per 1 USDC traded, plus 10,000 to start: cancelling and replacing every few seconds uses it up in hours). [Build a hedged market-making bot](https://docs.wagyu.xyz/market-making-bot.md) specifies all of it, plus the perp hedge.

## Words used on these pages

| Word | Meaning |
| --- | --- |
| bps | Basis points. 100 bps = 1%. |
| Fair value | Your best estimate of what 1 HXMR is worth now: the XMR price. |
| Spread, half-spread | The gap between your bid and your ask. The half-spread is the distance from fair value to either one. |
| Alo | "Add liquidity only", Hyperliquid's post-only order. It is cancelled if it would trade at once. |
| Ioc | "Immediate or cancel". It trades what it can at once and cancels the rest. |
| Basis | How far HXMR trades from XMR, as a fraction of the price. |
| Skew | Moving both quotes up or down to steer your inventory back to its target. |
| Reservation price | Fair value after the skew; quotes are placed around it. |
| Hedge | An opposite position on the XMR perp, so a price move does not change your total value. |
| Net delta | Your total XMR exposure: HXMR and XMR held, plus the perp position (a short counts as negative). |
| Kill switch | One command that cancels every open order and stops the bot. See the [bot spec](https://docs.wagyu.xyz/market-making-bot.md#risk-limits-and-kill-switch). |

## Good practice

- **Read the bridge terms before each order.** `GET /v2/bridges/terms` says which directions are on. An order for a direction that is off answers `409` with `code: "paused"` (see [error codes](https://docs.wagyu.xyz/actions-and-retries.md#error-codes)): skip it rather than retry. Announcements are in [`GET /v2/notice`](https://docs.wagyu.xyz/public-data.md#site-notice).
- **Every order is screened.** Bridge orders go through the same [compliance and screening](https://docs.wagyu.xyz/compliance-and-screening.md) as swaps.
- **Quote from a live fair value**, with sizes and a kill switch you are comfortable with.
- **Not financial advice.** This page explains how the pieces work; it does not promise any PnL.

Questions, a fee waiver or a larger setup: [t.me/wagyu_support](https://t.me/wagyu_support).

---
Source: https://docs.wagyu.xyz/market-making · Built from the live Wagyu API on 2026-11-27.
