> ## Documentation Index
> Fetch the complete documentation index at: https://platform.monoli.xyz/llms.txt
> Use this file to discover all available pages before exploring further.

# DCA Bot Overview

DCA Bots provide programmable, parameterized automation APIs for creating, configuring, and executing dollar-cost-averaging trading strategies across supported connectors and markets.

To help you apply it in your own Bots module design, here is a clean conceptual breakdown of the structure:

# Entity Purpose

The DCA Bot entity schema, representing a stateful configuration + runtime status object for a single DCA bot instance.
This object defines:

* Bot configuration (strategy, volumes, limits, parameters)
* Execution state (active deals, counters, timestamps)
* Risk profile & automation settings (martingale, stop-loss, cooldown)
* Metadata (name, account, creation info)

# Logical Grouping

1. Identity & Ownership

* `id`, `account_id`, `name`, `url_secret`, `account_name`, `type`, `pairs`

2. Status & Lifecycle

* `is_enabled`, `deletable?`, `created_at`, `updated_at`
* `active_deals_count`, `active_safety_orders_count`
  -`finished_deals_count`, `finished_deals_profit_usd`

3. Strategy Definition

* `strategy` ("long" / "short")
* `strategy_list`, `close_strategy_list`, `safety_strategy_list`
* `max_active_deals`, `max_safety_orders`

4. Order Sizding & Scaling

* `base_order_volume`, `safety_order_volume`
* `martingale_volume_coefficient`
* `martingale_step_coefficient`

5. Price & Risk Controls

* `stop_loss_percentage`, `stop_loss_type`
* `take_profit`, `take_profit_type`, `take_profit_steps`
* `trailing_enabled`, `trailing_deviation`
* `min_price`, `max_price`, and percentage variants

6. Execution parameters

* `start_order_type` (market/limit)
* `deal_start_delay_seconds`
* `cooldown`
* `allowed_deals_on_same_pair`

7. Performance & Optimization

* `profit_currency`
* `reinvesting_percentage`, `risk_reduction_percentage`
* `finished_deals_profit_usd`, `reinvested_volume_usd`

# Entity Model

```JSON theme={null}
{
  "id": 1,
  "account_id": 1,
  "is_enabled": false,
  "max_safety_orders": 4,
  "active_safety_orders_count": 1,
  "pairs": [
    "XXX_YYY"
  ],
  "strategy_list": [
    {
        "strategy": "nonstop",
        "options": {}
    }
  ],
  "close_strategy_list": [],
  "safety_strategy_list": [],
  "max_active_deals": 1,
  "active_deals_count": 0,
  "deletable?": true,
  "created_at": "2025-10-24T19:57:43.635Z",
  "updated_at": "2025-10-24T19:57:43.635Z",
  "trailing_enabled": null,
  "tsl_enabled": false,
  "deal_start_delay_seconds": null,
  "stop_loss_timeout_enabled": false,
  "stop_loss_timeout_in_seconds": 0,
  "disable_after_deals_count": null,
  "deals_counter": null,
  "allowed_deals_on_same_pair": null,
  "easy_form_supported": false,
  "close_deals_timeout": null,
  "url_secret": "...",
  "take_profit_steps": [],
  "name": "test 24 oct",
  "take_profit": "2.0",
  "min_profit_percentage": null,
  "base_order_volume": "15.0",
  "safety_order_volume": "30.0",
  "safety_order_step_percentage": "1.0",
  "take_profit_type": "total",
  "min_profit_type": null,
  "type": "Bot::SingleBot",
  "martingale_volume_coefficient": "2.0",
  "martingale_step_coefficient": "4.0",
  "stop_loss_percentage": "0.0",
  "cooldown": "0",
  "btc_price_limit": "0.0",
  "strategy": "long",
  "min_volume_btc_24h": "0.0",
  "profit_currency": "quote_currency",
  "min_price": null,
  "max_price": null,
  "stop_loss_type": "stop_loss",
  "safety_order_volume_type": "quote_currency",
  "base_order_volume_type": "quote_currency",
  "account_name": "My Binance",
  "trailing_deviation": "0.2",
  "finished_deals_profit_usd": "0.0",
  "finished_deals_count": "0",
  "leverage_type": "not_specified",
  "leverage_custom_value": null,
  "start_order_type": "limit",
  "active_deals_usd_profit": "0.0",
  "reinvesting_percentage": null,
  "risk_reduction_percentage": null,
  "reinvested_volume_usd": null,
  "min_price_percentage": null,
  "max_price_percentage": null
}
```
