HyperVaults Docs
Gate API

Actions reference

All nine gate actions with fields and examples

Each action maps to a Hyperliquid exchange action of the same shape — the Hyperliquid exchange endpoint is the canonical reference for order types, TIF, and trigger/TWAP semantics.

All requests: POST /vaults/{vault}/{action} with the bearer header. Prices and sizes are strings (see formatting). dex is the numeric dex index the asset routes to (0 for native and spot).

orders — place

FieldTypeNotes
assetintasset id
dexintrouting dex
isBuybool
limitPxstringfor "market", send an aggressive crossing price (e.g. ±8%) with tif: "Ioc"
szstringbase-asset size
reduceOnlyboolperps only
tif"Gtc" | "Ioc" | "Alo"Alo = post-only
curl -X POST "$GATE/vaults/$VAULT/orders" \
  -H "Authorization: Bearer $KEY" -H "Content-Type: application/json" \
  -d '{"asset":3,"dex":0,"isBuy":true,"limitPx":"55000","sz":"0.0002","reduceOnly":false,"tif":"Gtc"}'

Success: statuses[0].resting.oid (or .filled with avgPx/totalSz).

trigger-orders — stops and takes

All orders fields plus:

FieldTypeNotes
triggerPxstringprice that arms the order
isMarketboolexecute as market when hit; limitPx bounds slippage
tpsl"tp" | "sl"take-profit vs stop-loss trigger direction

reduceOnly: true makes it a protected exit; false a stop-entry. Perps only — the exchange rejects spot triggers.

cancel

{"asset": 3, "dex": 0, "oid": 56278254301}

modify

{"asset":3,"dex":0,"oid":56278254301,
 "order":{"isBuy":true,"limitPx":"56000","sz":"0.0002","reduceOnly":false,"tif":"Gtc"}}

The exchange replaces the order: on success it rests under a new oid — refresh your order state rather than reusing the old id. The nested order must not contain an asset field. Trigger orders can't be modified; cancel and re-place.

twap-orders / twap-cancel

Start: {"asset":3,"dex":0,"isBuy":true,"sz":"0.0008","reduceOnly":false,"minutes":5,"randomize":false} — success returns status.running.twapId. One slice executes roughly every 30 seconds. Minimum $50 notional.

Terminate: {"asset":3,"dex":0,"twapId":16307}.

leverage

{"asset":3,"dex":0,"isCross":true,"leverage":5}

Sets margin mode and leverage together, bounded by the market max. Two exchange rules: the mode can't change while a position is open on that market, and builder dexes are isolated-only (send isCross: false).

isolated-margin

{"asset":3,"dex":0,"isBuy":true,"ntli":1000000}

Adds (positive) or removes (negative) isolated margin on an open isolated position. ntli is USD × 1e6; isBuy matches the position side.

schedule-cancel — dead-man switch

{"time": 1783690917933} arms cancellation of all resting orders at a UTC-ms deadline; {} disarms. The exchange gates this behind $1M cumulative traded volume per account.

On this page