Как автоматизировать маркет-мейкинг на парах HIP-3 с помощью Origami Tech

How to Automate Market Making on HIP-3 Pairs with Origami Tech

Introduction

This guide explains what HIP-3 markets on HyperLiquid are and how to build a basic futures market making algorithm for them using Origami Tech. You will see how to structure a top-of-book quoting grid, manage inventory risk, and adapt quotes dynamically to order book conditions.

What Are HIP-3 Markets on HyperLiquid

HIP-3 markets are permissionless perpetual futures deployed by external developers on HyperLiquid. Instead of relying only on centrally curated listings, HyperLiquid allows third parties to launch their own perpetual pairs, creating a constantly expanding ecosystem of experimental assets, niche narratives, and alternative volatility profiles.

For traders, this means earlier access to emerging markets, faster price discovery, and more diverse trading conditions. HIP-3 pairs often exhibit higher volatility, sharper liquidity shifts, and frequent micro swings, making them particularly suitable for automated strategies such as grid trading, market making, scalping, and structured execution.

Origami Tech integrates directly with HyperLiquid and treats HIP-3 markets as first-class instruments. You can deploy bots, grids, and formula-based strategies on HIP-3 pairs using the same workflow and infrastructure as standard perpetual markets.

How to Build a Basic Futures Market Making Algo for HIP-3 Pairs

This setup demonstrates how to create a simple top-of-book futures market maker using a single grid in Origami Tech. The goal is to continuously quote one bid and one ask near the best prices in the order book while actively managing inventory risk.

The configuration refreshes frequently, reacts to order book pressure, enforces hard position limits, and avoids quoting when the spread is too tight.

Below is the full grid configuration.

{
  "execute_price": "bid_px if side=='buy' else ask_px",
  "execute_volume": "order_notional_counter / execute_price",
  "buy_orders_count": "1 if edge_ok==1 and allow_buy==1 else 0",
  "sell_orders_count": "1 if edge_ok==1 and allow_sell==1 else 0",
  "r": "micro - k_inv * pos_norm * spr",
  "mm": "grid().margin_mode",
  "ps": "grid().position_side",
  "imb": "(bidAmt0 - askAmt0) / max((bidAmt0 + askAmt0), 0.00000001)",
  "mid": "(bid0 + ask0) / 2",
  "spr": "ask0 - bid0",
  "ask0": "orderbook_futures().ask[0].price",
  "bid0": "orderbook_futures().bid[0].price",
  "half": "max(min_half, 0.25 * spr)",
  "tick": "symbol().price_precision",
  "k_inv": "1.5",
  "micro": "mid + 0.5 * imb * spr",
  "ask_px": "max(ask0 - tick, raw_ask, bid0 + tick)",
  "bid_px": "min(bid0 + tick, raw_bid, ask0 - tick)",
  "askAmt0": "orderbook_futures().ask[0].amount",
  "bidAmt0": "orderbook_futures().bid[0].amount",
  "edge_ok": "1 if spr > 2*tick else 0",
  "max_pos": "0.05",
  "pos_raw": "position(ps, mm).quantity",
  "raw_ask": "r + half",
  "raw_bid": "r - half",
  "min_half": "max(2 * tick, 0.0002 * mid)",
  "pos_norm": "pos_signed / max(max_pos, 0.00000001)",
  "allow_buy": "1 if pos_signed <  max_pos else 0",
  "allow_sell": "1 if pos_signed > -max_pos else 0",
  "pos_signed": "pos_raw if ps=='one_way' else ((-pos_raw) if ps=='short' else pos_raw)",
  "is_buy_first": "1",
  "sleep_after_seconds": "1.0",
  "time_between_orders": "0.2",
  "order_notional_counter": "25"
}

What This Grid Does

This grid is a fast top-of-book futures market maker. It continuously places one limit bid and one limit ask near the top of the order book, updates them frequently (≈ once per second), and actively manages risk using your current futures position. Specifically, it:

• quotes 1 bid + 1 ask at all times;
• uses L1 imbalance to tilt its reference price (microprice);

• uses your signed futures position to skew quotes and reduce inventory, and to enforce hard max position limits;

• refuses to quote when the spread is too tight.

Logic > Reading the Futures Order Book (Top of Book)

Each cycle, the bot pulls the best prices from the futures order book:

• bid0 = best bid price

• ask0 = best ask price

From that, it computes:

• spr = ask0 - bid0 (the spread)

• mid = (bid0 + ask0) / 2 (the midpoint)

These values anchor where the bot quotes.

Logic > Measuring L1 Pressure with an Imbalance Signal

The bot looks at the amount available at the best bid and best ask:

• bidAmt0 = size at best bid

• askAmt0 = size at best ask

Then it computes a normalized imbalance:

imb = (bidAmt0 - askAmt0) / (bidAmt0 + askAmt0)

Interpretation:

• If imb > 0, bids are “heavier” → buy pressure is stronger

• If imb < 0, asks are “heavier” → sell pressure is stronger

Logic > Building a “Microprice” (a Smarter Fair Value than Midpoint)

Instead of quoting around the midpoint, it uses a microprice:

micro = mid + 0.5 imb spr

So:

• strong bid-side imbalance nudges the reference price up

• strong ask-side imbalance nudges it down

This helps the bot lean slightly into short-term pressure without fully becoming directional.

Logic > Correctly Reading Your Futures Position (and Why one_way Matters)

For futures, inventory is your position, not a base-asset wallet balance.

The grid uses:

• ps = grid().position_side (e.g., one_way, or long/short in hedge mode)

• mm = grid().margin_mode (cross/isolated)

Then it reads:

• pos_raw = position(ps, mm).quantity

Important nuance to point out:

In one_way mode, quantity is already signed: long = positive, short = negative.

So the grid defines:

• pos_signed = pos_raw when ps == 'one_way' - this works for most of the DEXes and a default position mode for centralized venues

• otherwise, it forces the hedge “short” leg to be negative

The result is a consistent internal variable:

• pos_signed > 0 means net long exposure

• pos_signed < 0 means net short exposure

Logic > Enforcing a Max Position (Hard Risk Cap)

The grid defines a maximum allowed inventory:

• max_pos (example: 0.05)

Then normalizes your position:

• pos_norm = pos_signed / max_pos

This gives the bot a scaled view of exposure (roughly -1 to +1 inside limits).

Logic > Choosing How Wide to Quote (Half-Spread Logic)

To avoid quoting too tightly (and getting picked off or fee-bled), it computes a quoting distance:

• tick = symbol().price_precision

• min_half = max(2*tick, 0.0002*mid)

• half = max(min_half, 0.25*spr)

What this means in practice:

• it will never quote closer than ~2 ticks (or ~0.02% of price)

• it also widens when the market spread widens

Logic > Inventory-Aware Skew: Shifting the “Center” of Quotes

This is the core market-making risk control.

It sets a reservation (center) price:

r = micro - k_inv pos_norm spr

Intuition:

• If you’re too long, pos_norm > 0 → r shifts down

•→ bids get less aggressive, asks get more aggressive (you sell more)

• If you’re too short, pos_norm < 0 → r shifts up

•→ bids get more aggressive (you buy more to reduce short)

Logic > Building One Bid and One Ask, then Clamping to Avoid Crossing

It proposes raw quote levels:

•raw_bid = r - half

•raw_ask = r + half

Then it clamps prices so they remain passive:

• bid must be ≤ ask0 - tick

• ask must be ≥ bid0 + tick

So the bot avoids becoming a taker by accidentally crossing the spread.

Logic > Only Quoting When Spread is Wide Enough

It applies a simple “edge” filter:

edge_ok = 1 if spr > 2*tick else 0

If the spread is too tight, it posts no orders. That reduces low-edge churn where fees and adverse selection dominate.

Logic > Position Gating: Stops Adding to an Already-Too-Big Position

It prevents the position from growing beyond ±max_pos:

• if pos_signed >= max_pos → stop placing buys

• если pos_signed <= -max_pos → прекратить размещение ордеров на продажу

Таким образом, в предельных условиях он может временно стать односторонним для снижения риска, а затем вернуться к двустороннему котированию, как только снова окажется в пределах лимитов.

Логика > Определение размера ордеров по фиксированному номиналу

Вместо фиксированного размера контракта он ориентируется на постоянную стоимость в валюте котирования:

• order_notional_counter = 25

• execute_volume = notional / execute_price

Это позволяет сохранять размер сделки относительно стабильным при изменении цены.

Логика > Быстрое обновление + Размещение ордеров в шахматном порядке

Два параметра контроля времени придают ему ощущение высокочастотной торговли:

• sleep_after_seconds = 1.0 → пересчет/перекотирование примерно каждую секунду

• time_between_orders = 0.2 → небольшая задержка между размещением ордеров на покупку и продажу в одном цикле

Обе эти переменные могут быть полностью удалены из сетки, тогда бот начнет заменять ордера после каждой рыночной сделки. Однако такой подход может слишком быстро исчерпать квоту на количество запросов.

Origami Tech и HyperLiquid: Автоматизация торговли на рынках HIP-3

Интеграция между платформой автоматизации торговли Origami Tech и биржей HyperLiquid теперь позволяет пользователям торговать на экспериментальных бессрочных рынках, известных как HIP-3. Это сотрудничество дает трейдерам возможность применять автоматизированные стратегии к новому классу активов, созданных сторонними разработчиками, при этом используя привычный набор инструментов Origami Tech.

Ключевые аспекты интеграции

Единый доступ: Трейдеры могут автоматизировать стратегии на стандартных бессрочных, спотовых рынках и рынках HIP-3 через единый унифицированный интерфейс, не изменяя свою существующую инфраструктуру или стратегическую логику.

Поддержка рынков HIP-3: Рынки HIP-3 — это бессрочные фьючерсы без разрешений, созданные внешними разработчиками на платформе HyperLiquid. Эта структура предоставляет трейдерам ранний доступ к новым, потенциально высоковолатильным активам до их листинга на крупных централизованных биржах. Проекты, развертывающие такие рынки, включают Trade.xyz, Ventuals и Felix Protocol.

Подключение к Web3 API: Интеграция осуществляется с помощью нового потока API на основе Web3, что облегчает прямое взаимодействие с экосистемой HyperLiquid.

Возможности для трейдеров

Рыночная среда HIP-3 характеризуется повышенной волатильностью, частыми направленными движениями и разнообразными торговыми условиями. Origami Tech предлагает несколько типов автоматизированных стратегий, которые особенно хорошо подходят для этих рынков:

strategy type and it's application in hip-3 markets

Взгляд в будущее: Поддержка HIP-4 (рынки исходов и опционы)

Недавнее предложение HIP-4 вводит на платформу торговлю «исходами» — полностью обеспеченные контракты с фиксированным ценовым диапазоном и нелинейными выплатами, которые по сути являются рынками прогнозов и опционами. Выплата по базовому опциону Call в момент его истечения T может быть выражена как:

Выплата = max(S_T - K, 0)

В отличие от бессрочных фьючерсов, контракты HIP-4 не несут рисков ликвидации или маржинального плеча.

Date
February 10, 2026
Умная торговля, максимальная прибыль

Автоматизируйте трейдинг с Origami Tech

Выведите трейдинг криптовалютой на новый уровень с помощью ботов Origami Tech. Увеличьте прибыль, минимизируйте риски и будьте впереди рынка в режиме 24/7.

Начать трейдить