Skip to content

GuidesBuild schemas by venue

Step zero — from nothing to your first trade

Section titled “Step zero — from nothing to your first trade”
  1. Create the account. Go to hyperliquid.xyz and connect a Hyperliquid EVM master wallet. The wallet is the account identity; Predictefy has no verified information on a separate KYC step.
  2. Set up signing. If this is your first on-chain venue, create an EVM wallet first and secure its seed phrase offline. Use the master key directly or approve an agent key. Predictefy never sees either private key; signing stays in your process.
  3. Fund it. Deposit USDC into Hypercore spot, Hyperliquid’s own L1 clearinghouse. Fund at least the price × size of your first order; the historical Bridge2 fallback rejects deposits below 5 USDC. Use GET /v1/bridge/quote to price cross-chain funding, then create a bridge session for the assisted deposit. HIP-4 orders spend spot USDC directly.
  4. Allow time. Budget about 1–2 hours for a first wallet and bridge; an already-funded wallet can be ready much sooner. Confirm venue eligibility for your location before depositing.
  • Production status: Enabled for build, submit, cancel, single-order modify, and approveAgent. Scale orders are not yet enabled on the hosted API; requests that carry orders are refused until they are.
  • Wallet and chain: A Hyperliquid EVM master wallet, or an EVM agent approved by that master, signs the Hyperliquid L1 action in the caller’s process.
  • Venue account: The master wallet is the account identity. Approve an agent first when a browser or mobile wallet will not sign each order directly.
  • Credentials: No venue API credential. The master or agent private key remains client-side and never transits Predictefy.
  • Funding: Spendable Hypercore spot USDC (total - hold). POST /v1/bridge/session can deliver USDC to that spot balance; first-party HIP-4 orders need no internal transfer.
  • Getting funds out: Only through Hyperliquid’s own withdraw3 action, which reaches Arbitrum and nowhere else — that action is the venue’s Arbitrum bridge, so the destination chain is not a caller choice. client.funding.buildWithdrawRequest builds the EIP-712 data against the Arbitrum domain and stops there; you sign and POST it to Hyperliquid yourself. Any other chain is a second leg: withdraw to Arbitrum, then bridge onward with GET /v1/bridge/quote.
FieldTypeRequiredRejection
assetnon-negative integerthis or outcome + outcomeSideasset must be a non-negative integer
outcomenon-negative integerwith outcomeSideprovide asset, or outcome + outcomeSide (YES|NO)
outcomeSide"YES" or "NO"with outcomesame message
isBuybooleanyesisBuy (boolean) is required
pricenumber in (0, 1] dollarsyesprice must be a number in (0, 1] dollars
sizenumber > 0yessize must be a number > 0
owner0x… EVM addressyesowner (the wallet that will sign this action) is required
tifAlo | Ioc | Gtc (default Gtc)notif must be Alo, Ioc, or Gtc
triggerobject, mutually exclusive with tifnoprovide either tif (limit) or trigger (tp/sl), not both
trigger.triggerPxnumber in (0, 1] dollarswith triggertrigger.triggerPx must be a number in (0, 1] dollars
trigger.tpsl"tp" or "sl"with triggertrigger.tpsl must be "tp" or "sl"
trigger.isMarketboolean (default true)notrigger.isMarket must be a boolean when provided
noncesafe positive integer (default: ms clock)nononce must be a safe positive integer
expiresAftersafe positive integernoexpiresAfter must be a safe positive integer
cloid0x + 32 hex chars (128-bit)noHyperliquid cloid must be a 128-bit hex string (0x followed by 32 hex characters). — auto-derived when omitted, so every order carries one
reduceOnlyboolean (default false)no—

A HIP-4 outcome resolves to asset = 100000000 + 10 × outcome + (YES → 0, NO → 1). These are spot-class assets with no perp-DEX component. On a unified account, their collateral is spendable spot USDC: total - hold from spotClearinghouseState. The spend-cap and funding target are price × size; current Hyperliquid documentation says outcome fees are zero.

Hyperliquid has no separate scale-order action. A ladder is N limit orders inside ONE order action (orders: [...], grouping na). Source: https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/exchange-endpoint

Scale orders are not yet enabled on the hosted API. Until they are, a body that carries orders is refused, and single-order requests and responses are unchanged.

Send 2 to 20 orders for ONE asset in the ordinary build route, with orders instead of a single price/size/tif/cloid:

{
"asset": "100000070",
"isBuy": true,
"owner": "0x1111111111111111111111111111111111111111",
"orders": [
{ "price": 0.4, "size": 25, "tif": "Gtc" },
{ "price": 0.42, "size": 25, "tif": "Alo" },
{ "price": 0.44, "size": 25, "tif": "Ioc", "cloid": "0x22222222222222222222222222222222" }
]
}

The shared body carries asset (or outcome + outcomeSide), isBuy, owner, and optionally nonce, expiresAfter, and reduceOnly. Each leg owns price, size, tif or trigger, and cloid. A missing cloid is derived from the Idempotency-Key plus the leg index, so a build replay reproduces every handle.

The response is the leader execution at the top level plus every member in executions, sharing one groupId and numbered by groupIndex. Each member has its own execution id, notional, fee estimate and cloid, and every member carries the SAME action and typed data.

  • Caps: the per-order cap applies to EACH order’s price × size. The rolling daily caps apply to the SUMMED notional, so a ladder can fail the daily cap even when every leg fits the per-order cap. A group counts as risk-reducing only when every leg is venue reduce-only and the summed size is covered by recorded fills.
  • Submit: sign the ONE action once and POST /v1/exec/hyperliquid/orders/submit with the LEADER execution id. One relay places every order. Each member gets its own status, venueRef and fills from the venue’s positionally aligned statuses[]. A follower execution id is refused with the leader’s id.
  • Reserve and ack: client-direct reserve and acknowledgment are refused for a group. One reservation is bound to one execution, while a group is one action over several orders. Submit the group through /orders/submit instead.
  • Status, cancel and modify: each member is an ordinary execution. Cancel one order by its own venueRef, or by its own cloid when the venue ack returned no order id.

The 20-order bound is Predictefy’s choice. The venue publishes no maximum batch size. Its exchange rate-limit weight is 1 + floor(batch_length / 40), so 20 orders stay at the minimum weight of 1 (https://hyperliquid.gitbook.io/hyperliquid-docs/for-developers/api/rate-limits-and-user-limits). A deeper ladder is better sent as two actions.

To tell YES from NO on a catalog outcome, read outcomes[].side: it is yes or no, set from the venue’s machine-readable side token, and it agrees with the last digit of the asset id (0 for YES, 1 for NO). The venue falls back to side position (first yes, second no) only when that token is missing or unusable. Do not infer the side from the label, because HIP-4 side labels can be candidate or team names.

On the catalog record, marketId and sourceMetadata.nativeMarketId are hl-outcome-N, where N is the outcome index, and each outcome’s metadata.nativeOutcomeId is the full HIP-4 asset id as a decimal string. For hl-outcome-N the two outcomes are 100000000 + 10 × N for YES and 100000001 + 10 × N for NO. Pass the decimal asset id as asset, or pass N as outcome with outcomeSide and let the build encode it.

Every HIP-4 order build makes the collateral location explicit:

{ "collateral": { "ledger": "spot", "destinationDex": null } }

The SDK convenience path validates that descriptor before signing. Default-on autoFund is a typed no-op because the source and destination ledgers already match:

const signer = makeHyperliquidSigner({
privateKey: process.env.HL_AGENT_PRIVATE_KEY!,
agentFor: process.env.HL_MASTER_ADDRESS!,
});
const result = await client.exec.createOrder(
{
venue: 'hyperliquid',
outcome: 1081,
outcomeSide: 'YES',
isBuy: true,
price: 0.5,
size: 25,
owner: signer.owner,
},
signer,
);
result.funding;
// {
// status: 'not_required',
// reason: 'collateral_destination_matches_source',
// collateral: { ledger: 'spot', destinationDex: null }
// }

It does not call the funding route, read a default-perp balance, sign sendAsset, or move funds. Pass { autoFund: false } as argument three only if you also want to omit the SDK-only funding result. autoFundMax is reserved for a future named builder DEX whose destination genuinely differs from spot; it has no effect on first-party HIP-4 orders.

REST callers can inspect readiness with POST /v1/funding/hyperliquid/steps. The route reads only spot state and always returns zero steps for first-party HIP-4. For example, an order that needs 11.2 USDC with an 11 USDC spot balance returns:

{
"readiness": {
"spotUsdcBalance": "11",
"targetAmount": "11.2",
"shortfall": "0.2"
},
"reason": "insufficient_spot_usdc",
"steps": []
}

Without a target, reason is readiness_only; with a sufficient target it is collateral_already_in_place. Funding signing and submission refuse every sendAsset today. A future named destinationDex requires an explicit venue-verified destination, collateral token, and mainnet deployer allowlist entry. Predictefy exposes no hosted send-asset endpoint and never changes account abstraction automatically.