> ## 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 Market Order

Place a market order on Hyperliquid perpetual DEX. Executes immediately at current market price with configurable slippage protection (default 1%). Ideal for: instant trade execution, momentum entries, and time-sensitive strategies.

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

Place a market order on Hyperliquid perpetual DEX. Executes immediately at current market price with configurable slippage protection (default 1%). Ideal for: instant trade execution, momentum entries, and time-sensitive 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-market-order` |
| Category | Hyperliquid |
| Connector | `wallet` |
| Requires gas | No |
| Funds movement | None declared |
| Tags | `hyperliquid`, `perps`, `order`, `trade`, `market`, `defi` |

## Payload Schema

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `dex` | `string` | No | HIP-3 DEX name for TradFi markets. Omit for standard crypto perps. xyz = trade.xyz \(stocks, indices, commodities\), flx = flx.finance, vntl = vntl.exchange |
| `coin` | `string` | Yes | Asset symbol \(e.g., BTC, ETH for crypto; TSLA, SP500 for HIP-3 DEX markets\) |
| `side` | `string` | Yes | Order direction |
| `size` | `string \| number` | Yes | Order size in asset units \(e.g., '0.1' for 0.1 BTC\) or USD amount when sizeUnit is 'usd'. Total order value must be at least $10. |
| `sizeUnit` | `string` | No | How to interpret the size field. 'asset' \(default\): size is in asset units \(e.g., 0.1 BTC\). 'usd': size is a USD amount converted to asset units at execution time using ceil rounding. |
| `slippageBps` | `number` | No | Maximum acceptable slippage in basis points \(default: 100 = 1%\). For buys, the limit price is set above mid; for sells, below mid. |
| `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 — remainder cancelled, filledSize &lt; requestedSize\), cancelled \(nothing matched\) |
| `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. |
| `coin` | `string` | No | Asset symbol |
| `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. |
| `requestedSizeUsd` | `string` | No | Original USD amount requested \(only present when sizeUnit was 'usd'\) |
| `convertedSize` | `string` | No | Asset size after USD conversion \(only present when sizeUnit was 'usd'\) |

## Examples

**Workflow node**

```json
{
  "type": "hyperliquid-market-order",
  "payload": {
    "coin": "example-coin",
    "side": "buy",
    "size": "example-size"
  },
  "children": [],
  "connector": {
    "type": "wallet",
    "id": "conn_wallet"
  }
}
```
  **Test with API**

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

**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.