Order types
Three desks share one Hyperliquid venue. This page is the wire map — what BattleGrid actually submits — not a click tour of the ticket.
Distinguish three layers that share vocabulary but are not the same object:
| Layer | Owns | Does not own |
|---|---|---|
| Venue order | Hyperliquid t shape + reduce-only + grouping | Candidate geometry, approval UX |
| Strategy construction | Entry policy trigger → resting shape; Trade levels stop/target band | Which surface approved the fire |
| Terminal / approval | What you may place or accept on the desk | Rewriting Radar’s authored trigger |
← Trade terminal · Entry policy · Trade levels
Venue shapes BattleGrid submits
Hyperliquid’s execution primitive (as BattleGrid persists and wires it) is two discriminators — not the legacy MARKET/STOP/STOP_LIMIT labels some APIs still name:
BattleGrid TradingOrderType | Hyperliquid t | What it means |
|---|---|---|
| LIMIT | { limit: { tif } } | Resting or immediate limit; TIF is part of the order |
| TRIGGER | { trigger: { isMarket, triggerPx, tpsl } } | Arms at triggerPx; then market- or limit-executes |
“Market” on the ticket is not a third venue type. The adapter submits an aggressive LIMIT with IOC (tif: Ioc) and a chokepoint-computed aggressive price. Same path for reduce-only closes.
| App label | Wire | Typical TIF / flag | Reduce-only |
|---|---|---|---|
| Market (entry) | LIMIT + aggressive price | IOC (fixed) | Rejected on the market-entry use case — close is a dedicated command |
| Limit | LIMIT + authored price | GTC (default) · IOC · ALO | Optional |
| Stop Market / Take Market | TRIGGER · isMarket: true | Post-activation behaves like market (stored TIF IOC) | Optional |
| Stop Limit / Take Limit | TRIGGER · isMarket: false + limit price | Post-activation behaves like limit (stored TIF GTC) | Optional |
| Protection TP / SL | TRIGGER · isMarket: true (default) · tpsl: tp|sl | Bracket grouping normalTpsl or positionTpsl | Always (r: true) |
| Close position | LIMIT + aggressive price | IOC | Always |
Sources: types/src/trading.ts (TradingOrderType, TimeInForce), types/src/trading-orders.ts (OrderTpsl, OrderPurpose), server/.../hyperliquid-trading.repository.ts (submitMarketOrder, submitLimitOrder, submitTriggerOrder, protection batches).
Time-in-force
| TIF | Wire spelling | Where it appears |
|---|---|---|
| GTC | Gtc | Default for plain LIMIT; agent at-market / pullback entries; trigger-LIMIT post-activation stamp |
| IOC | Ioc | Market entries and closes; agent breakout TRIGGER post-activation stamp |
| ALO | Alo | Plain LIMIT only (post-only). Enum + adapter map exist; terminal exposes the selector on LIMIT |
Trigger families do not offer a TIF picker — execution type selects market vs limit after the trigger fires. Plain MARKET hides TIF (always IOC under the hood).
Reduce-only
Venue accepts r on every shape. BattleGrid’s ticket policy:
- MARKET entry — reduce-only off the form; an immediate reduce-only market is the close command
- LIMIT + Stop/Take variants — reduce-only toggle allowed
- Protection legs and closes — reduce-only is mandatory on the wire
MCP close_agent_position and the terminal close path both submit that reduce-only market close.
Strategy → resting entry (agent / Radar / accept)
Authoring lives on the strategy (Entry policy). Execution stamps { orderType, tif } once per trigger (RESTING_ORDER_SHAPE_BY_TRIGGER / AT_MARKET_ORDER_SHAPE in types/src/entry-discipline.ts):
| Entry trigger | Resting kind | Order shape | Price the entry rests at |
|---|---|---|---|
On bar close (ON_CANDLE_CLOSE) | AT_MARKET | LIMIT / GTC | Signal entry price (not an IOC sweep) |
On the pullback (ON_RETEST) | AT_LEVEL | LIMIT / GTC | Derived Donchian retest level ± offset |
On the break (STOP_THROUGH_LEVEL) | AT_LEVEL | TRIGGER / IOC (executionType: MARKET) | Derived Donchian break level ± offset |
| No authored trigger (conversational / Arena provenance-free) | AT_MARKET | LIMIT / GTC | Same at-market shape — not a retired AT_SIGNAL stand-in |
At signal (AT_SIGNAL) | — | LIMIT / GTC on legacy rows only | Retired for authoring; readable history, not a live fire path |
Important: “At market” in entry policy means prompt fill intent via resting LIMIT GTC at the signal price, not the terminal’s IOC market ticket. That choice exists so the exchange cannot fill past the TP bracket by construction (LimitGtcEntryStrategy).
Radar auto-fires and terminal accept of a PENDING decision share this same execute path (ExecuteTradingEntryUseCase → entry strategy registry). Approval changes whether the path runs, not which venue shape the trigger already stamped.
Candidate levels vs the order that lands
Trade construction (Trade levels) filters stop/target candidates (ATR band, Min R:R). The decision that survives carries entryPrice, soft stopLoss, takeProfit, and a stamped hard stop.
At submit:
- Entry rests at the decision’s entry (level or signal price) under the trigger’s shape above
- TP protection leg (when
takeProfit > 0) — TRIGGER market, reduce-only,tpsl: tp - SL protection leg — TRIGGER market, reduce-only,
tpsl: sl, priced from the risk line = stamped hard stop (or chosen stop on pre-hard-stop-era rows) — not the soft stop
Soft stop remains strategy-bar close judgment (Exit policy); it is not the resting exchange SL.
Protection legs and overrides
| Leg | Source | Venue fact |
|---|---|---|
| Initial SL / TP | Strategy construction + entry submit (submit*WithProtection, grouping normalTpsl) | TRIGGER · reduce-only · tpsl |
| Break-even / trailing / time-decay | Exit policy automation | Replaces the SL protection row (PROTECTION_LEG, reprice source stamped) |
| Manual SL override | Terminal / MCP override_agent_protection | SL-only amendment (MANUAL_OVERRIDE); TP uses cancel/replace, not this tool |
| Position TP/SL ticket | Terminal position-tpsl | New / replacement trigger legs; optional per-leg limit price → isMarket: false when supplied |
Purpose enum on the order row: ENTRY · PROTECTION_LEG · REDUCE_CLOSE — orthogonal to LIMIT vs TRIGGER.
What the trade terminal can place vs automation
| Capability | Trade terminal (manual ticket) | Agent accept / Radar fire | Exit automation |
|---|---|---|---|
| Market entry (IOC aggressive limit) | Yes | No — agent at-market is LIMIT GTC | — |
| Limit entry + TIF (GTC/IOC/ALO) | Yes | Agent pullback / bar-close: GTC only | — |
| Stop / Take (market or limit trigger) | Yes (standalone; no attached bracket) | Breakout entry is STOP TRIGGER market + bracket | — |
Attach TP/SL on entry (normalTpsl) | Market & Limit tickets only | Always on agent entry strategies (SL required) | — |
| Reduce-only resting / conditional | Limit + trigger families | Closes & protection only | Condition / system exits as REDUCE_CLOSE |
| Immediate reduce-only close | Close command (not market-entry toggle) | MCP / terminal close on agent positions | Same close service |
| Override resting SL | Yes (wager-scoped) | Same override path | BE / trail / decay also reprice SL |
| Level entry (break / pullback) | No — authored on strategy; fires via Radar or after you accept a proposal that carries that trigger | Yes | — |
Terminal order-entry variants (eligibility + ticket): MARKET · LIMIT · STOP_MARKET · STOP_LIMIT · TAKE_MARKET · TAKE_LIMIT (ORDER_ENTRY_VARIANTS).
Field card (quick reference)
| Name | Layer | One-line fact |
|---|---|---|
| Market | Venue (via LIMIT IOC) | Aggressive IOC limit; terminal entry only among discretionary tickets |
| Limit | Venue | Resting price + TIF; agent “at market” entries are this with GTC |
| Stop / Take | Venue TRIGGER | Arms at triggerPx; market or limit execution |
| Reduce-only | Flag | Ticket-gated on MARKET; mandatory on protection and close |
| GTC / IOC / Alo | TIF | Enum complete; Alo only on plain LIMIT UI |
| Hard-stop SL | Protection | Exchange TRIGGER at risk line |
| Soft stop | Strategy exit | Bar-close; not the resting SL order |
| TP | Protection | From constructed take-profit when positive |
Gaps (do not invent)
| Topic | Status |
|---|---|
| Live open-order sample via MCP | Empty book at research time — shapes above are from code + adapter, not a live row dump |
| Fee rates per order type | Out of scope here — venue maker/taker + builder are a separate fee schedule when documented under Trade |
| Whether every Alo submission path is used in production flows beyond the LIMIT selector | Adapter maps Alo; broader product usage not asserted |
Legacy OrderType MARKET/STOP/STOP_LIMIT enum | Superseded for new orders by TradingOrderType LIMIT|TRIGGER; do not treat legacy labels as wire truth |