Bot Orchestration

Start Bot

Start a bot with the specified configuration.

Sends a start command to an existing bot instance via MQTT. The bot must have already been deployed (using deploy-v2-script or deploy-v2-controllers) and be in a stopped state. This endpoint initiates the trading script execution within the bot container.

Use this endpoint to:

  • Resume a stopped bot with the same or different configuration
  • Start a deployed bot for the first time after deployment
  • Change the running script or configuration of a stopped bot

The start command is sent asynchronously via MQTT. The response indicates whether the command was successfully sent, not whether the bot has fully started.

post/bot-orchestration/start-bot

Request body

bot_namestring required

Name of the bot instance to act upon. This should match the instance_name used when the bot was deployed (e.g., 'my-trading-bot-20240115-143022').

log_levelstring nullable

Logging verbosity level for the bot. Higher levels show more detail. Valid values: DEBUG (most verbose), INFO (standard), WARNING, ERROR (least verbose).

scriptstring nullable

Name of the Python script to execute (without .py extension). The script must exist in the bot's scripts directory. Common scripts include 'v2_with_controllers' for controller-based strategies.

confstring nullable

Name of the script configuration file (without .yml extension). The configuration must exist in conf/scripts/ directory. Contains strategy parameters like trading pairs, order amounts, and spreads.

async_backendboolean

When True, the start command is sent asynchronously and returns immediately. When False (default), waits for confirmation that the bot has started.

Example request

{
  "bot_name": "my-trading-bot-20240115-143022",
  "log_level": "DEBUG",
  "script": "v2_with_controllers",
  "conf": "dman_maker_config"
}

Response

Successful Response

{"stackTrail":"paths:/bot-orchestration/start-bot:post:responses:200:content:application/json:schema","oasType":"schema","type":"unknown"}

Changes