Edit DCA Bot (MCP Tool)
Description
Based on: /docs/rest-api/patch-dca-bot-edit
Edit a DCA Bot by code. Send the complete settings payload required by the cabinet form. Check the REST API reference for conditional settings and field rules. This tool runs on WunderTrading.
Include exactly one takeProfits target with a positive priceDeviation and portfolio: 1.
Required permission: dca_bot:write.
Prompt example
Edit my DCA Bot with code bot-code. Ask me to confirm the full settings.
Input Schema
{
"type": "object",
"description": "Complete DCA Bot settings, as required by the REST API. On edit, provide the full settings payload, not only changed fields. Match cabinet labels to the API fields described below; do not send UI-only names. ",
"properties": {
"code": {
"type": "string",
"minLength": 1,
"description": "Code that identifies the bot, available in bot list results."
},
"name": {
"type": "string",
"example": "My DCA Bot",
"description": "Bot name in the UI."
},
"exchangeCode": {
"type": "string",
"description": "Exchange selected in the UI.",
"example": "BINANCE"
},
"pairsCodes": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"description": "One trading pair code."
},
"example": [
"BTCUSDT"
],
"description": "Trading pairs selected in the UI."
},
"profilesCodes": {
"type": "array",
"minItems": 1,
"uniqueItems": true,
"items": {
"type": "string",
"description": "One API profile code."
},
"example": [
"my-profile-code"
],
"description": "Exchange accounts selected in the UI."
},
"dcaTradingType": {
"type": "string",
"enum": [
"long",
"short",
"both"
],
"description": "Direction in the UI: Long, Short or Both."
},
"amountPerTrade": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Amount per trade. If amountPerTradeType = percents, send a fraction (10% = 0.1)."
},
"amountPerTradeType": {
"type": "string",
"enum": [
"base",
"quote",
"$",
"contracts",
"percents"
],
"description": "API amount unit: base is BTC and quote is USDT in BTC/USDT. The cabinet UI uses different internal values."
},
"amountPerTradeMultiplier": {
"type": [
"number",
"null"
],
"minimum": 1,
"maximum": 125,
"description": "Order amount multiplier on derivative exchanges."
},
"orderType": {
"type": "string",
"enum": [
"market",
"best_bid_ask_limit"
],
"description": "Entry order type. UI Conditional limit = best_bid_ask_limit; Market = market."
},
"orderTypeSettings": {
"type": [
"object",
"null"
],
"description": "Conditional limit settings. UI max chase distance is a percent; send a fraction (5% = 0.05).",
"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 a conditional limit order."
},
"afterMaxAttemptsReached": {
"type": "string",
"enum": [
"cancel",
"market"
],
"description": "Cancel or use a market order after the last attempt."
},
"maxChaseDistance": {
"type": [
"number",
"null"
],
"minimum": 0.0001,
"maximum": 0.05,
"description": "Maximum price drift to chase for a limit order, as a fraction (5% = 0.05)."
}
}
},
"entrySignalCondition": {
"type": "string",
"enum": [
"immediate",
"indicator"
],
"description": "Bot start condition: indicator requires one to five distinct indicators; immediate cannot be combined with Both directions."
},
"indicators": {
"type": [
"array",
"null"
],
"minItems": 1,
"maxItems": 5,
"description": "One to five distinct entry indicators. In advanced mode: RSI needs period/rsiValue, MACD fastPeriod/slowPeriod/signalPeriod, BB period/stdDev. price_change always needs priceDeviation. Long/Short need type-specific condition and trigger after defaults; Both requires them null. timeframe defaults to 15 minutes; default supported values are 1, 15, 60, with deployments able to override TIMEFRAMES.",
"items": {
"type": "object",
"required": [
"type"
],
"properties": {
"type": {
"type": "string",
"enum": [
"rsi",
"macd",
"bb",
"price_change"
],
"description": "rsi, macd, bb, or price_change. Choose the matching settings below; price_change requires priceDeviation even with advancedIndicators false."
},
"timeframe": {
"type": "integer",
"description": "Candle timeframe in minutes; defaults to 15. The default server supports 1, 15 and 60. Deployments may override TIMEFRAMES; use the cabinet selector to see the current supported list."
},
"condition": {
"type": [
"string",
"null"
],
"enum": [
"less_than",
"greater_than",
"crossing_down",
"crossing_up",
null
],
"description": "For Long or Short, RSI and BB use less_than, greater_than, crossing_down, or crossing_up; MACD uses crossing_down or crossing_up. For both directions, leave null. price_change does not use this field."
},
"trigger": {
"type": [
"string",
"null"
],
"enum": [
"upper",
"lower",
"greater_0",
"less_0",
null
],
"description": "For Long or Short, MACD uses greater_0 or less_0 and BB uses upper or lower. For both directions, leave null. RSI and price_change do not use this field."
},
"period": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "RSI or Bollinger Bands period."
},
"rsiValue": {
"type": "number",
"minimum": 0.01,
"maximum": 100,
"description": "RSI threshold for the entry signal."
},
"rsiOppositeValue": {
"type": [
"number",
"null"
],
"minimum": 0.01,
"maximum": 100,
"description": "RSI threshold for the opposite trading direction."
},
"fastPeriod": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Fast moving-average period for MACD."
},
"slowPeriod": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Slow moving-average period for MACD."
},
"signalPeriod": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Signal-line period for MACD."
},
"stdDev": {
"type": "number",
"minimum": 1,
"maximum": 100,
"description": "Standard-deviation multiplier for Bollinger Bands."
},
"priceDeviation": {
"type": "number",
"minimum": 0.005,
"maximum": 0.1,
"description": "Price-change fraction."
}
},
"description": "One distinct entry indicator. In advanced mode, RSI needs period and rsiValue; MACD needs fastPeriod, slowPeriod, signalPeriod; BB needs period and stdDev. price_change always needs priceDeviation. Without advanced mode, the server supplies RSI/MACD/BB defaults."
}
},
"advancedIndicators": {
"type": "boolean",
"default": false,
"description": "Advanced indicator settings: true uses custom RSI/MACD/BB values and conditions; false supplies their server defaults. price_change.priceDeviation is always required."
},
"extraOrderCount": {
"type": "integer",
"minimum": 1,
"maximum": 30,
"description": "Max DCA orders: includes the initial entry; 5 permits the entry and four extra orders."
},
"extraOrderDeviation": {
"type": "number",
"minimum": 0.001,
"maximum": 0.2,
"description": "Price deviation before each extra order, as a fraction: UI 0.8% = 0.008. Long orders follow falling prices; Short orders follow rising prices."
},
"extraOrderVolumeMultiplier": {
"type": "number",
"minimum": 0.1,
"maximum": 10,
"description": "Order size multiplier; Order Averaging applies it to the first extra order, Position Averaging starts with the initial size."
},
"extraOrderDeviationMultiplier": {
"type": "number",
"minimum": 0.1,
"maximum": 10,
"description": "Price deviation multiplier; Order Averaging applies it to the first extra order, Position Averaging starts with unmultiplied spacing."
},
"extraOrderCostAveraging": {
"type": [
"string",
"null"
],
"enum": [
"base",
"quote",
null
],
"description": "Cost averaging by: By base = base, holding the conventional base-asset quantity (BTC in BTC/USDT); By quote = quote, holding its quote-asset cost (USDT). Final orders are rounded to exchange rules."
},
"extraOrderType": {
"type": [
"string",
"null"
],
"enum": [
"market",
"limit",
null
],
"description": "market waits until price crosses the calculated level, then submits at the current price; limit places a resting order at that level, including the first extra order immediately after entry."
},
"applyDcaForFirstSafetyOrder": {
"type": "boolean",
"default": false,
"description": "UI DCA mode: Order Averaging = true, applying size and spacing multipliers to the first extra order; Position Averaging = false, starting with the initial size and unmultiplied spacing. Do not send a separate UI mode field."
},
"takeProfits": {
"type": "array",
"minItems": 1,
"maxItems": 1,
"description": "Exactly one take-profit target is required: positive priceDeviation as a fraction and portfolio: 1.",
"items": {
"type": "object",
"required": [
"priceDeviation",
"portfolio"
],
"properties": {
"priceDeviation": {
"type": "number",
"minimum": 0.0001,
"description": "Target price change from the reference price, as a fraction. Minimum 0.01% (send 0.0001)."
},
"portfolio": {
"type": "number",
"enum": [
1
],
"description": "Share of the position to close at this target, as a fraction."
}
},
"description": "One take-profit target."
}
},
"takeProfitBaseOn": {
"type": "string",
"enum": [
"entry_order",
"average_price"
],
"default": "average_price",
"description": "Take profit type: Based on entry order = entry_order; Based on average price = average_price."
},
"takeProfitOrderType": {
"type": "string",
"enum": [
"market",
"best_bid_ask_limit"
],
"description": "Order type used to take profit."
},
"takeProfitOrderTypeSettings": {
"type": [
"object",
"null"
],
"description": "Settings for best_bid_ask_limit take-profit orders.",
"properties": {
"postOnly": {
"type": "boolean",
"description": "Place the take-profit limit order without taking existing liquidity."
}
}
},
"stopLoss": {
"type": [
"number",
"null"
],
"minimum": 0.0001,
"description": "Stop loss target. For Signal and DCA Bots, UI percent is sent as a fraction (2% = 0.02); minimum is 0.01% (0.0001)."
},
"stopLossBaseOn": {
"type": "string",
"enum": [
"entry_order",
"average_price"
],
"default": "entry_order",
"description": "Stop loss type: Based on entry order = entry_order; Based on average price = average_price."
},
"stopLossOrderType": {
"type": "string",
"enum": [
"market",
"best_bid_ask_limit"
],
"description": "Order type used to execute stop loss."
},
"stopLossOrderTypeSettings": {
"type": [
"object",
"null"
],
"description": "Settings for best_bid_ask_limit stop-loss orders.",
"properties": {
"postOnly": {
"type": "boolean",
"description": "Place the stop-loss limit order without taking existing liquidity."
}
}
},
"stopLossMove": {
"type": [
"number",
"null"
],
"exclusiveMinimum": 0,
"description": "Favorable move from entry that triggers a one-time stop-loss update when monitored: Long rises, Short falls. Send a fraction (2% = 0.02)."
},
"stopLossMoveExecute": {
"type": [
"number",
"null"
],
"description": "New stop-loss level relative to entry: Long adds this fraction, Short subtracts it. If omitted, move to current average entry price; if set, it must be below stopLossMove."
},
"trailingStopActivation": {
"type": [
"number",
"null"
],
"exclusiveMinimum": 0,
"description": "Trailing stop activation, as a fraction of the UI percentage."
},
"trailingStopExecute": {
"type": [
"number",
"null"
],
"exclusiveMinimum": 0,
"description": "Trailing-stop distance after activation, as a fraction of the UI percentage."
},
"priceDeviation": {
"type": [
"number",
"null"
],
"exclusiveMinimum": 0,
"description": "Limit-entry price distance from the last price, as a fraction."
},
"maxOpenPositions": {
"type": [
"integer",
"null"
],
"minimum": 1,
"description": "Maximum positions this bot may keep open at once."
},
"leverage": {
"type": [
"number",
"null"
],
"minimum": 1,
"maximum": 125,
"description": "Leverage configured for the bot."
},
"exchangeLeverage": {
"type": [
"number",
"null"
],
"minimum": 1,
"maximum": 125,
"description": "Leverage setting applied on the exchange."
},
"maxRequiredAmount": {
"type": [
"string",
"null"
],
"description": "Client-side required-amount estimate stored with the bot."
}
},
"required": [
"code",
"name",
"exchangeCode",
"pairsCodes",
"profilesCodes",
"dcaTradingType",
"amountPerTrade",
"extraOrderCount",
"extraOrderDeviation",
"extraOrderVolumeMultiplier",
"extraOrderDeviationMultiplier",
"takeProfits"
],
"additionalProperties": true
}