Skip to main content

createBot

Creates a new bot linking a strategy, exchange, and runner.

Three of the input's optional-looking properties are required in practice. They cannot be typed non-null — runnerID and config back nullable columns that the runner-delete and secrets-read paths depend on — so the rules are stated here, where they reach every caller that reads the schema:

  • runnerID is ALWAYS required. A bot with no runner has nowhere to execute; the column is nullable only so existing bots survive their runner being deleted.
  • config is ALWAYS required, and must contain stake_currency, stake_amount, entry_pricing and exit_pricing.
  • exchangeID is required when mode is live. A dry-run bot may omit it and carry its exchange inline at config.exchange instead, which must then set config.exchange.name to a supported exchange slug.

A bot's runtime state is not an input: status, lastSeenAt, errorMessage and the metrics link are absent from CreateBotInput on purpose. They are written by startBot/stopBot and the health monitor, so a bot cannot be created claiming to be running.

createBot(
input: CreateBotInput!
): Bot!

Arguments​

createBot.input ● CreateBotInput! non-null input​

Type​

Bot object​