PATCH

/api/v1/bots/grid/:id/manual

Permission: BOTS_WRITESecurity: SIGNED

Updates configuration settings, price boundaries, grid density, order volumes, risk controls, and trailing settings for an existing Grid Bot entity using its ID.

If successful, the response returns the updated Grid Bot entity.
Grid Bot Entity

Path Parameters

idinteger required

Unique Quentrade ID for this Grid Bot entity. Example: 2291725

Body Parameters

24
namestring required

Grid Bot name specified by the user (1 to 40 characters).

upper_pricenumber required

The maximum price of the trading range, above which the bot will not place sell orders.

lower_pricenumber required

The minimum price of the trading range, below which the bot will not place buy orders.

grids_quantitynumber required

The number of grid levels between the upper and lower price boundaries. Limited by exchange rate and leverage rules.

quantity_per_gridnumber required

Quantity of the asset allocated per Grid Bot level order.

grid_typestring
default: arithmetic

Type of Grid Bot configuration: geometric (percentage step) or arithmetic (fixed dollar step).

upper_stop_loss_enabledboolean
default: false

Indicates if upper stop-loss settings are enabled (true) or not (false).

upper_stop_loss_actionstring
default: stop_bot

Action to perform if asset price reaches or exceeds upper stop-loss: stop_bot, stop_bot_and_buy, or stop_bot_and_close_position.

upper_stop_loss_pricenumber

The price level that triggers the upper stop-loss action.

lower_stop_loss_enabledboolean
default: false

Indicates if lower stop-loss settings are enabled (true) or not (false).

lower_stop_loss_actionstring
default: stop_bot

Action to perform if asset price reaches or falls below lower stop-loss: stop_bot, stop_bot_and_sell, or stop_bot_and_close_position.

lower_stop_loss_pricenumber

The price level that triggers the lower stop-loss action.

leverage_typestring

Type of leverage applied: cross (uses account collateral) or isolated (limits margin to position).

leverage_custom_valuenumber

Custom leverage multiplier value set for the Grid Bot.

modestring

Grid strategy mode: long (price increase), short (price decrease), or reversal (trend reversal trading).

max_active_sell_linesinteger

Maximum number of active sell orders that can be placed simultaneously.

trailing_up_enabledboolean
default: false

Indicates if the trailing-up feature is enabled (true) or not (false).

trailing_down_enabledboolean
default: false

Indicates if the trailing-down feature is enabled (true) or not (false).

expansion_down_enabledboolean
default: false

Indicates if grid expansion downwards is enabled (true) or not (false).

expansion_down_stop_pricenumber

The price at which downward grid expansion stops. Required when expansion_down_enabled is true.

expansion_up_enabledboolean
default: false

Indicates if grid expansion upwards is enabled (true) or not (false).

expansion_up_stop_pricenumber

The price at which upward grid expansion stops. Required when expansion_up_enabled is true.

ignore_warningsboolean
default: false

Ignores configuration warnings and forces the update of the Grid Bot (true / false).

notestring

Optional user-defined note for the Grid Bot (1 to 300 characters).

Example Request

edit_grid_bot_manual_request.json
PATCH /api/v1/bots/grid/:id/manual
{
  "name": "CHANGED USDT_BTCUSDT EXAMPLE",
  "upper_price": 70000,
  "lower_price": 56000,
  "quantity_per_grid": 150,
  "grids_quantity": 40,
  "order_currency_type": "quote",
  "profit_currency_type": "quote",
  "trailing_up_enabled": true,
  "trailing_down_enabled": false,
  "grid_type": "arithmetic",
  "expansion_down_enabled": true,
  "expansion_down_stop_price": 54000,
  "expansion_up_enabled": false,
  "lower_stop_loss_enabled": true,
  "lower_stop_loss_price": 50000,
  "lower_stop_loss_action": "stop_bot_and_close_position",
  "upper_stop_loss_enabled": true,
  "upper_stop_loss_price": 75000,
  "upper_stop_loss_action": "stop_bot",
  "note": "Example bot",
  "leverage_type": "cross",
  "leverage_custom_value": 10,
  "mode": "long"
}

Example Responses

If successful, returns HTTP 200 with the updated Grid Bot entity representation.

edit_grid_bot_manual_200.json
200 OK
{
  "id": 2291725,
  "account_id": 12555712,
  "account_name": "Binance Futures",
  "is_enabled": false,
  "grids_quantity": "40",
  "created_at": "2024-07-17T15:03:24.406Z",
  "updated_at": "2024-07-17T15:14:16.852Z",
  "strategy_type": "manual",
  "upper_stop_loss_enabled": true,
  "lower_stop_loss_enabled": true,
  "note": "Example bot",
  "editable": false,
  "lower_price": "56000.0",
  "lower_stop_loss_price": "50000.0",
  "lower_stop_loss_action": "stop_bot_and_close_position",
  "upper_price": "70000.0",
  "upper_stop_loss_price": "75000.0",
  "upper_stop_loss_action": "stop_bot",
  "quantity_per_grid": "150.0",
  "leverage_type": "cross",
  "leverage_custom_value": "10.0",
  "name": "CHANGED USDT_BTCUSDT EXAMPLE",
  "pair": "USDT_BTCUSDT",
  "start_price": "65030.3",
  "grid_price_step": "358.974358974358974358974358974358974359",
  "current_profit": "0.0",
  "current_profit_usd": "0.0",
  "total_profits_count": "0",
  "bought_volume": "0.0",
  "sold_volume": "0.0",
  "profit_percentage": "0.0",
  "current_price": "65030.3",
  "max_active_buy_lines": "50",
  "max_active_sell_lines": "50",
  "order_currency_type": "quote",
  "profit_currency_type": "quote",
  "trailing_up_enabled": "true",
  "grid_type": "arithmetic",
  "investment_base_currency": "0.0",
  "investment_quote_currency": "0.0",
  "unrealized_profit_loss": "0.0",
  "current_profit_loss": null,
  "current_profit_loss_percent": null,
  "orderbook_price_currency": "USDT",
  "expansion_down_enabled": "true",
  "expansion_down_stop_price": "54000.0",
  "grid_lines": [
    {
      "id": 253750913,
      "price": "64974.4",
      "side": null,
      "order_placed": false
    },
    {
      "id": 253750927,
      "price": "70000.0",
      "side": "sell",
      "order_placed": false
    },
    {
      "id": 253750926,
      "price": "69641.0",
      "side": "sell",
      "order_placed": false
    },
    {
      "id": 253750888,
      "price": "56000.0",
      "side": "buy",
      "order_placed": false
    }
  ],
  "mode": "long"
}