> ## Documentation Index
> Fetch the complete documentation index at: https://docs.b3os.org/llms.txt
> Use this file to discover all available pages before exploring further.

# Hyperliquid Outcome Place Order

Place a limit order on a HIP-4 outcome (prediction) market on Hyperliquid. Supports GTC, IOC, and ALO order types. Prices are probabilities between 0 and 1. Use get-outcome-markets to find available outcomeIndex values. Ideal for: prediction market trading, outcome arbitrage, and automated betting strategies.

![Hyperliquid Outcome Place Order logo](https://cdn.b3.fun/hyperliquid-logo.png)
Catalog action Hyperliquid wallet

Place a limit order on a HIP-4 outcome (prediction) market on Hyperliquid. Supports GTC, IOC, and ALO order types. Prices are probabilities between 0 and 1. Use get-outcome-markets to find available outcomeIndex values. Ideal for: prediction market trading, outcome arbitrage, and automated betting strategies.

**Review wallet and value movement**

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-place-order` |
| Category | Hyperliquid |
| Connector | `wallet` |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `hyperliquid`, `prediction-market`, `order`, `trade`, `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 × price\) must be at least $10. |
| `price` | `string` | Yes | Limit price between 0 and 1 \(probability\). For example, 0.75 means 75% implied probability. |
| `orderType` | `string` | No | Order type: limit \(GTC, default\), ioc \(immediate-or-cancel\), alo \(add-liquidity-only / post-only\). |
| `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: resting \(on book\), filled \(immediately matched\). |
| `oid` | `number` | No | Hyperliquid order ID \(present for resting and filled orders\). |
| `filledSize` | `string` | No | Total filled size \(for filled orders\). |
| `avgPrice` | `string` | No | Average fill price \(for filled orders\). 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. |
| `requestedPrice` | `string` | No | Originally requested price. |
| `cloid` | `string` | No | Client order id attached to this order \(0x + 32 hex\). Use to cancel or reconcile. |

## Examples

**Workflow node**

```json
{
  "type": "hyperliquid-outcome-place-order",
  "payload": {
    "outcomeIndex": 1,
    "outcomeSide": "yes",
    "side": "buy",
    "size": "example-size",
    "price": "example-price"
  },
  "children": [],
  "connector": {
    "type": "wallet",
    "id": "conn_wallet"
  }
}
```
  **Test with API**

```bash
curl -X POST "https://api.b3os.org/v1/actions/hyperliquid-outcome-place-order/test" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "inputs": {
    "outcomeIndex": 1,
    "outcomeSide": "yes",
    "side": "buy",
    "size": "example-size",
    "price": "example-price"
  }
}'
```

**Use expressions for dynamic values**

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.