close_all_positions
Close all open positions on Pear Protocol with a single execution type—MARKET or TWAP. Get per-position success or error results.
Instructions
Close every open Pear Protocol position with a single executionType (MARKET or TWAP). Returns a per-position result array with success/error. WRITE: executes real trades. 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": {
"executionType": "<executionType>"
},
"name": "close_all_positions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| executionType | Yes | ||
| twapDuration | No | ||
| twapIntervalSeconds | No | ||
| randomizeExecution | No | ||
| referralCode | No |