Skip to main content

createBotFromBacktest

"Try it as a dry-run bot" (#4785): create a DRY-RUN bot from a finished backtest, with the run's settings.

The bot is ALWAYS dry run. That is set by the server and no input can change it: there is no mode argument, and the copied config's dry_run key is dropped. No exchange is attached, so the bot needs no exchange connection and reaches no keys. Going live stays on the bot, through the existing go-live confirm and step-up.

  • Refused unless the backtest is completed, and when its strategy version was deleted (both INVALID_ARGUMENT).
  • The bot runs the backtest's own strategy version, in that strategy's workspace, on runnerID.
  • Config: the run's effectiveConfig minus what only a backtest reads (timerange, export, fee, backtest_*, the forced backtest pricing). dry_run_wallet is the run's starting balance. The pairs are the ones the run traded.
  • Bot.sourceBacktestID records the run.
  • It goes through createBot itself: the bot-create scope on the strategy's workspace (workspace__bot__write, as createBot checks it), the strategy/runner ownership check and the plan's bot cap, all with their existing refusals. Free has no bots.
createBotFromBacktest(
input: CreateBotFromBacktestInput!
): Bot!

Arguments​

createBotFromBacktest.input ● CreateBotFromBacktestInput! non-null input​

Type​

Bot object​