Skip to main content

Bot

No description

type Bot implements Node {
strategy: Strategy
pnl7d: BotPnl7d!
webhookUrl: String
encryptionStatus: EncryptionStatus!
id: ID!
public: Boolean!
featured: Boolean!
deletedAt: Time
encryptionMode: BotEncryptionMode!
keyCustodyBackend: BotKeyCustodyBackend!
keyID: String
keyVersion: Int
algorithm: BotEncryptionAlgorithm!
encryptedAt: Time
name: String!
status: BotBotStatus!
mode: BotBotMode!
config: Map
freqtradeVersion: String!
lastSeenAt: Time
errorMessage: String
exchangeID: ID
strategyID: ID!
runnerID: ID
ownerID: String!
createdAt: Time!
updatedAt: Time!
exchange: Exchange
runner: BotRunner
trades(
after: Cursor
first: Int
before: Cursor
last: Int
orderBy: TradeOrder
where: TradeWhereInput
): TradeConnection!
metrics: BotMetrics
legibleStatus: EntityStatus!
encryptionLocked: Boolean!
recentUsage: ResourceUsageAggregation
}

Fields

Bot.strategy ● Strategy object

The strategy this bot runs.

NULLABLE by design: strategies are soft-deleted (ADR-0037), so a bot can outlive its strategy. The ENT-generated non-null strategy: Strategy! edge is skipped (see internal/ent/schema/bot.go) precisely so a deleted strategy does NOT trigger GraphQL non-null propagation that would NULL the entire Bot node (which made getBots / getDashboardBots error "ent: strategy not found" and the bot vanish from lists). When the strategy has been deleted this resolves to null, and the bot (with its id, status, and config) stays addressable so the user can still open, stop, or delete it.

Bot.pnl7d ● BotPnl7d! non-null object

Trailing 7-day PnL window (percent, abs, daily-cumulative series) for cards.

Bot.webhookUrl ● String scalar

The full TradingView webhook URL for this bot — the credential a trader pastes into a TradingView alert so the alert can force-enter/exit a pair.

SECURITY: the URL embeds the bot's high-entropy webhook token, so it is a SECRET. This field is gated by the view-secrets scope exactly like Bot.config: it resolves to the URL only for callers who hold view-secrets on the bot, and to null for everyone else (and null until a token has been generated via regenerateBotWebhook). The FE lazy-fetches it like other secrets. The raw token itself is NEVER exposed.

Bot.encryptionStatus ● EncryptionStatus! non-null object

Bot.id ● ID! non-null scalar

Bot.public ● Boolean! non-null scalar

Whether this resource is publicly visible to all authenticated users

Whether this resource is featured (appears at top of lists)

Bot.deletedAt ● Time scalar

Soft-delete timestamp. If set, record is considered deleted.

Bot.encryptionMode ● BotEncryptionMode! non-null enum

Trust-ladder encryption mode for this row's sensitive fields. Set at create time; immutable after. Defaults to 'legacy_server' for all rows created before the trust ladder shipped.

Bot.keyCustodyBackend ● BotKeyCustodyBackend! non-null enum

KeyCustodyBackend implementation that produced the wrapping key. Pinned at write time alongside encryption_mode.

Bot.keyID ● String scalar

Opaque identifier of the wrapping key, backend-specific. Null for legacy_server rows that use the global process key.

Bot.keyVersion ● Int scalar

Rotation counter for the wrapping key. Null for legacy_server rows; populated when the row is rewrapped under a versioned key.

Bot.algorithm ● BotEncryptionAlgorithm! non-null enum

Symmetric algorithm protecting the row's sensitive fields. Stored alongside the ciphertext so future migrations can retire algorithms without re-encrypting existing rows.

Bot.encryptedAt ● Time scalar

Timestamp the row's sensitive fields were last encrypted with the current key_id/key_version. Null for legacy_server rows.

Bot.name ● String! non-null scalar

Bot display name

Bot.status ● BotBotStatus! non-null enum

Bot lifecycle status

Bot.mode ● BotBotMode! non-null enum

Trading mode (dry-run or live)

Bot.config ● Map scalar

Complete freqtrade bot configuration (stake, pairlists, pricing, api_server, etc.)

Bot.freqtradeVersion ● String! non-null scalar

Freqtrade Docker image version tag

Bot.lastSeenAt ● Time scalar

Last successful health check

Bot.errorMessage ● String scalar

Last error message if status is error

Bot.exchangeID ● ID scalar

Foreign key to exchange (provides credentials). Nullable for dry-run bots that carry their exchange config inline in config.exchange — paper-trading doesn't need a connected Exchange entity.

Bot.strategyID ● ID! non-null scalar

Foreign key to strategy (provides code)

Bot.runnerID ● ID scalar

Foreign key to runner (provides execution environment). Nullable so bots survive runner deletion as orphans — the runner.Delete hook clears runner_id on all bots referencing the runner before the runner is soft-deleted. Orphan bots cannot start until assigned a new runner.

Bot.ownerID ● String! non-null scalar

Group ID (organization) that owns this bot

Bot.createdAt ● Time! non-null scalar

Bot.updatedAt ● Time! non-null scalar

Bot.exchange ● Exchange object

Bot.runner ● BotRunner object

Bot.trades ● TradeConnection! non-null object

Bot.trades.after ● Cursor scalar

Returns the elements in the list that come after the specified cursor.

Bot.trades.first ● Int scalar

Returns the first _n_ elements from the list.

Bot.trades.before ● Cursor scalar

Returns the elements in the list that come before the specified cursor.

Bot.trades.last ● Int scalar

Returns the last _n_ elements from the list.

Bot.trades.orderBy ● TradeOrder input

Ordering options for Trades returned from the connection.

Bot.trades.where ● TradeWhereInput input

Filtering options for Trades returned from the connection.

Bot.metrics ● BotMetrics object

Bot.legibleStatus ● EntityStatus! non-null object

Bot.encryptionLocked ● Boolean! non-null scalar

True when the bot's secure_config has at least one passphrase-encrypted leaf (api_server.username / password / jwt_secret_key) that the current session could not decrypt. UI consumers must show an unlock overlay before rendering the credentials form.

Bot.recentUsage ● ResourceUsageAggregation object

Usage summary for the last 24 hours Aggregated from ResourceUsageAggregation if available, or calculated from samples Only populated if the bot runs on a runner with billing enabled

Interfaces

Node interface

An object with an ID. Follows the Relay Global Object Identification Specification

Returned By

botChanged subscription ● botStatusChanged subscription ● createBot mutation ● createBotWithPassphrase mutation ● forceExitAll mutation ● pauseBotEntry mutation ● regenerateBotWebhook mutation ● restartBot mutation ● setBotFeatured mutation ● setBotVisibility mutation ● startBot mutation ● stopBot mutation ● updateBot mutation ● updateBotConfigWithPassphrase mutation

Member Of

BotEdge object ● BotMetrics object ● Trade object