Skip to content
Logo

Trading tools

Five tools prepare a trade and three resolve it. Read Placing trades first for the flow, sizing and symbols.

Every prepare_* tool returns the same card:

Output
preparedActionIdPass it to the tool that executes or declines
actionTypeWhat was prepared
expiresAtOne hour after it was prepared
executionModeconfirm-every-trade or pre-authorized
nextStepWhat the agent should do next, in words
summarycoin, side, size, orderType, estimatedPrice, notionalUsd, marginUsd, leverage, liquidationPrice, reduceOnly, and take profit and stop loss as prices and as percents

Every prepare_* tool also accepts an optional idempotencyKey (string, up to 128 characters). Reusing a key returns the same prepared trade.

prepare_open_order

Validates a new order and stores it. Nothing is sent to Hyperliquid.

Scope: orders:create

InputType
coinstringRequired. Exact symbol: BTC, xyz:GOLD
sidebuy or sellRequired. buy is long, sell is short
sizestringRequired. Units of the asset as a plain decimal, such as "0.29". Not dollars
orderTypemarket, limit, stop_market, stop_limit or take_profitRequired
leverageinteger, 1 to 50Required. Isolated margin, no default
pricestringRequired for limit and stop_limit
triggerPricestringRequired for stop_market, stop_limit and take_profit
slippagenumber, 0 to 0.1Default 0.03, which is 3%
reduceOnlybooleanOptional
takeProfitPrice / stopLossPricestringOptional trigger prices
takeProfitPct / stopLossPctnumberOptional, as a percent of margin. stopLossPct: 35 closes at −35%

prepare_close_position

Validates a close against the live position.

Scope: positions:close

InputType
coinstringRequired
sizestringOptional. Omit to close the whole position
slippagenumber, 0 to 0.1Optional

Returns no_position when there is nothing open in that market.

prepare_cancel_order

Validates cancelling one resting order.

Scope: orders:cancel

InputType
coinstringRequired
orderIdintegerRequired. From get_open_orders

prepare_tpsl_update

Sets or replaces take profit and stop loss on an open position. Validated against the live liquidation price.

Scope: tpsl:write

InputType
coinstringRequired
takeProfitPrice / stopLossPricestringOptional trigger prices
takeProfitPct / stopLossPctnumberOptional, as a percent of margin

prepare_remove_tpsl

Removes one trigger from an open position.

Scope: tpsl:write

InputType
coinstringRequired
typetake_profit or stop_lossRequired

confirm_prepared_action

Executes a prepared trade. Autonomous connections only. Orus checks your signed limits and today's cap, then places the order. On a manual connection it returns approval_required.

Scope: orders:create, whatever the action type

InputType
preparedActionIdstringRequired
Output
statusexecuted or failed
orderRefReference of the placed order
errorWhy it failed, when it did
warningSet when the order executed with a problem, for example a take profit leg that failed. The agent must pass it on

Calling it again for the same trade returns the first result.

approve_prepared_action

The human path for manual connections. It runs when you select Approve on a trade card. Orus lists this tool only to clients that show its cards and keep the tool away from the model, so an agent cannot call it.

Scope: orders:create · Input and output: same as confirm_prepared_action

decline_prepared_action

Cancels a prepared trade so it can no longer be executed.

Scope: orders:create

InputType
preparedActionIdstringRequired