Act on the paper position
autopilot_actionChange the autopilot's paper position by hand, always at the server's price: open, add, reduce, close, set_levels, place_order, replace_order, cancel_order, set_timeframe. Stocks are long only, and intraday stock entries need the market open.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"autopilot_id": "<autopilot_id>",
"action": "<action>"
},
"name": "autopilot_action"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| side | No | ||
| price | No | place_order / replace_order: resting price | |
| action | Yes | ||
| fraction | No | reduce: share of the position | |
| quantity | No | Coins or shares | |
| stop_loss | No | ||
| timeframe | No | set_timeframe: the new timeframe (closes the position first) | |
| expires_in | No | Order lifetime in seconds | |
| order_type | No | ||
| take_profit | No | ||
| autopilot_id | Yes | Autopilot id | |
| notional_usd | No | Size in USD instead of quantity | |
| idempotency_key | No | Optional: any unique string for this action; send the same one when retrying the same call and the first result comes back instead of the action running twice |