Leave a plan on a position
set_position_plan_close_or_notify_laterHave TradeHub act on a held position later, with no agent connected: "close it if still open in 3 days", "tell me if its funding passes 50% a year", "close half below 94000". Up to 5 rules, each fired once: when price_above / price_below (mark), held_hours (since set) or funding_above (yearly rate it pays, 0.5 = 50%), then notify the person or close close_pct reduce-only. thesis: why it is open, what proves it wrong, for later sessions. Use right after entry, not your own timers. Not a stop-loss. A new plan replaces the old; rules=[] removes it. Next: get_my_open_positions.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| rules | Yes | Up to 5 rules, each fires once; [] removes the plan | |
| venue | No | Venue: sandbox, hyperliquid, okx, bybit or binance. Omitted: the agent's only venue, else hyperliquid, else your only connected venue, else sandbox | hyperliquid |
| symbol | Yes | Base coin, e.g. BTC | |
| thesis | No | Why the position is open and what would prove it wrong, for the next session to read back; seen only by you and the person |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | True when the plan is stored | |
| plan | Yes | The plan now on the position; null after rules=[] | |
| venue | Yes | Venue name | |
| symbol | Yes | Base coin | |
| mark_price | Yes | Mark when the plan was set, USD per coin | |
| deprecation | No | Present only while this tool is deprecated: replacement, removal_date, changelog |