Scale Strategy Position (MCP Tool)
Based on: /docs/rest-api/post-strategies-id-scale
Scale an existing strategy position in or out on WunderTrading. Call get_strategy and get_strategy_scale_data first to verify the strategy and available amount. For amountPerTradeType: "percents", send a fraction such as 0.1 for 10%. orderTypeSettings applies to best_bid_ask_limit orders; scale out uses only postOnly.
The cabinet's Increase action sends action: "scale_in"; Decrease sends action: "scale_out". The cabinet's Conditional limit order type sends best_bid_ask_limit.
This action can place real exchange orders. Confirm the direction and amount with the user before calling.
Required permission: strategy:write.
Input Schema
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"description": "Strategy ID or clientId."
},
"amountPerTrade": {
"type": "number",
"minimum": 0,
"description": "Amount shown in the Scale Position dialog, in the selected unit. For percents, use a fraction."
},
"amountPerTradeType": {
"type": "string",
"description": "API amount unit: $ = USD, contracts = contracts, quote = USDT, base = BTC in BTC/USDT. Open API converts base and quote to cabinet units. Use only units available for this position."
},
"orderType": {
"type": "string",
"enum": [
"market",
"best_bid_ask_limit"
],
"description": "Order type in the UI: Market = market; Conditional limit = best_bid_ask_limit."
},
"action": {
"type": "string",
"enum": [
"scale_in",
"scale_out"
],
"description": "UI Increase = scale_in: after a fill, average-price-based TP/SL and related thresholds recalculate; DCA settings remain. Decrease = scale_out: a partial exit keeps TP/SL/DCA settings; a full exit cancels remaining entry, DCA and conditional orders. Existing exchange-side conditional orders are not explicitly rebuilt after an increase or partial decrease, so verify their prices and quantities. Acceptance queues the action; it does not mean an order filled."
},
"orderTypeSettings": {
"type": "object",
"description": "Settings for best_bid_ask_limit orders. Scale out uses postOnly; scale in also supports maxAttempts, afterMaxAttemptsReached and maxChaseDistance.",
"properties": {
"postOnly": {
"type": "boolean",
"description": "Place the limit order without taking existing liquidity."
},
"maxAttempts": {
"type": "integer",
"minimum": 1,
"maximum": 5,
"description": "Maximum attempts to place the limit order."
},
"afterMaxAttemptsReached": {
"type": "string",
"enum": [
"cancel",
"market"
],
"description": "Cancel or use a market order after the last attempt."
},
"maxChaseDistance": {
"type": "number",
"minimum": 0.0001,
"maximum": 0.05,
"description": "Max chase distance: UI percent is sent as a fraction (5% = 0.05)."
}
}
}
},
"required": [
"id",
"amountPerTrade",
"amountPerTradeType",
"orderType",
"action"
],
"additionalProperties": false
}