Hyperliquid Take Profit
Place a take-profit trigger order on Hyperliquid perpetual DEX. Automatically detects position direction and places a reduce-only market trigger order at the specified price. When the mark price reaches the trigger price, a market order executes to close the position. Ideal for: automated profit-taking, risk management, and bracket order strategies.
Catalog action Hyperliquid wallet
Place a take-profit trigger order on Hyperliquid perpetual DEX. Automatically detects position direction and places a reduce-only market trigger order at the specified price. When the mark price reaches the trigger price, a market order executes to close the position. Ideal for: automated profit-taking, risk management, and bracket order strategies.
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-take-profit |
| Category | Hyperliquid |
| Connector | wallet |
| Requires gas | No |
| Funds movement | None declared |
| Tags | hyperliquid, perps, order, trade, trading |
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) |
triggerPrice | string | Yes | Price at which to trigger the take-profit order. For long positions this should be above the entry price; for short positions below. |
size | string | No | Position size to close in asset units (e.g., '0.1' for 0.1 BTC). Defaults to full position size if omitted. |
reduceOnly | boolean | No | If true, order can only reduce an existing position (default: true) |
Result Schema
| Field | Type | Required | Description |
|---|---|---|---|
status | string | Yes | Order outcome: resting (trigger order placed on book, waiting for trigger price) |
oid | number | No | Hyperliquid order ID |
coin | string | No | Asset symbol |
side | string | No | Order side (buy to close short, sell to close long) |
triggerPrice | string | No | Trigger price set for the order |
requestedSize | string | No | Size of the take-profit order |
positionSide | string | No | Detected position side (long or short) |
Examples
json{ "type": "hyperliquid-take-profit", "payload": { "coin": "example-coin", "triggerPrice": "example-triggerPrice" }, "children": [], "connector": { "type": "wallet", "id": "conn_wallet" }}
bashcurl -X POST "https://api.b3os.org/v1/actions/hyperliquid-take-profit/test" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "inputs": { "coin": "example-coin", "triggerPrice": "example-triggerPrice" }}'
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.
