Hyperliquid Outcome Market Order
Place a market order on a HIP-4 outcome (prediction) market on Hyperliquid. Executes immediately at the best available price with configurable slippage protection (default 1%). Uses the best ask (for buys) or best bid (for sells) as the slippage reference to ensure fills on wide spreads. Ideal for: instant outcome trades, time-sensitive prediction bets, and quick position exits.
Catalog action Hyperliquid wallet
Place a market order on a HIP-4 outcome (prediction) market on Hyperliquid. Executes immediately at the best available price with configurable slippage protection (default 1%). Uses the best ask (for buys) or best bid (for sells) as the slippage reference to ensure fills on wide spreads. Ideal for: instant outcome trades, time-sensitive prediction bets, and quick position exits.
This action can require a wallet connector, gas, token movement, or an external side effect. Test with simulation or a controlled amount before using it in a live workflow.
At a Glance
| Field | Value |
|---|---|
| Action ID | hyperliquid-outcome-market-order |
| Category | Hyperliquid |
| Connector | wallet |
| Requires gas | No |
| Funds movement | None declared |
| Tags | hyperliquid, prediction-market, order, trade, market, defi |
Payload Schema
| Field | Type | Required | Description |
|---|---|---|---|
outcomeIndex | integer | Yes | Outcome index from get-outcome-markets (e.g., 40 for BTC binary). |
outcomeSide | string | Yes | Which side of the outcome to trade: 'yes' (side 0) or 'no' (side 1). |
side | string | Yes | Order direction: buy to go long on the outcome, sell to go short or close. |
size | string | Yes | Order size in outcome tokens (whole numbers only). Total order value (size × mid price) must be at least $10. |
slippageBps | number | No | Maximum acceptable slippage in basis points (default: 100 = 1%). For buys, applied above best ask; for sells, below best bid. |
reduceOnly | boolean | No | If true, order can only reduce an existing position. |
cloid | string | No | Optional client order ID (0x-prefixed hex, up to 16 bytes). Auto-generated if omitted. |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Order outcome: filled (fully matched), partially_filled (partial IOC match), cancelled (no match). |
oid | number | No | Hyperliquid order ID. |
filledSize | string | No | Total filled size. |
avgPrice | string | No | Average fill price. On rare reconciliation paths (response lost in transit) this reflects the order's limit price, not the actual execution price. |
outcomeIndex | number | No | Outcome index that was traded. |
outcomeSide | string | No | Outcome side that was traded (yes/no). |
coin | string | No | Outcome coin notation (e.g., #400). |
side | string | No | Order side (buy/sell). |
requestedSize | string | No | Originally requested size. |
midPrice | string | No | Mid price at time of order. |
limitPrice | string | No | Effective limit price after slippage. |
cloid | string | No | Client order id attached to this order (0x + 32 hex). Use to cancel or reconcile. |
Examples
json{ "type": "hyperliquid-outcome-market-order", "payload": { "outcomeIndex": 1, "outcomeSide": "yes", "side": "buy", "size": "example-size" }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}
bashcurl -X POST "https://api.b3os.org/v1/actions/hyperliquid-outcome-market-order/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "outcomeIndex": 1, "outcomeSide": "yes", "side": "buy", "size": "example-size" }}'
Payload fields can use workflow expressions such as {{$trigger.body.amount}}, {{$nodes.fetch.result.price}}, and {{$props.asset}} when the value should come from a trigger, prior node, or reusable workflow prop.
