place_trigger_order
Execute stop-loss or take-profit orders on Hyperliquid DEX by setting trigger prices for automated position management and risk control.
Instructions
Place a trigger order (stop-loss or take-profit) on Hyperliquid
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| assetIndex | Yes | Asset index for the coin (0 for BTC, 1 for ETH, etc.) | |
| clientOrderId | No | Client order ID (optional) | |
| isBuy | Yes | True for buy order, false for sell order | |
| isMarket | Yes | Whether to execute as market order when triggered | |
| reduceOnly | No | Whether this is a reduce-only order (optional, default false) | |
| size | Yes | Order size as string | |
| triggerPrice | Yes | Trigger price as string | |
| triggerType | Yes | Trigger type |
Input Schema (JSON Schema)
{
"properties": {
"assetIndex": {
"description": "Asset index for the coin (0 for BTC, 1 for ETH, etc.)",
"type": "number"
},
"clientOrderId": {
"description": "Client order ID (optional)",
"type": "string"
},
"isBuy": {
"description": "True for buy order, false for sell order",
"type": "boolean"
},
"isMarket": {
"description": "Whether to execute as market order when triggered",
"type": "boolean"
},
"reduceOnly": {
"description": "Whether this is a reduce-only order (optional, default false)",
"type": "boolean"
},
"size": {
"description": "Order size as string",
"type": "string"
},
"triggerPrice": {
"description": "Trigger price as string",
"type": "string"
},
"triggerType": {
"description": "Trigger type",
"enum": [
"tp",
"sl"
],
"type": "string"
}
},
"required": [
"assetIndex",
"isBuy",
"size",
"triggerPrice",
"isMarket",
"triggerType"
],
"type": "object"
}