set_risk_parameters
Set or update stop-loss and take-profit thresholds on an existing position. Supports price or percentage values with optional trailing settings.
Instructions
Set or update stop-loss / take-profit on an existing Pear Protocol position. Each threshold has type ('PRICE' or 'PERCENTAGE'), value, and optional trailing fields. Pass null to clear a field; omit it to leave unchanged. WRITE: changes risk parameters on a live position. Requires PEAR_TRADE_ENABLED=true.
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": {
"positionId": "<positionId>"
},
"name": "set_risk_parameters"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| positionId | Yes | ||
| stopLoss | No | ||
| takeProfit | No |