Skip to main content

BotTradeCounts

How many trades a bot has. Every console surface that states a trade count (bot card, bot detail header, Trades tab) reads this.

Source: the bot's trade rows in the database, the rows the Trades tab lists, synced from the bot's Freqtrade. Not Freqtrade's /profit report (BotMetrics.tradeCount), which forgets trades from an earlier container. Live open positions (getBotOpenPositions) are a separate real-time source and can differ from open until the next sync.

type BotTradeCounts {
total: Int!
closed: Int!
open: Int!
orphaned: Int!
syncedAt: Time
}

Fields​

BotTradeCounts.total ● Int! non-null scalar​

closed + open + orphaned: every row the Trades tab lists.

BotTradeCounts.closed ● Int! non-null scalar​

Trade rows that are closed.

BotTradeCounts.open ● Int! non-null scalar​

Trade rows that are still open, as of syncedAt. Orphaned rows are not counted.

BotTradeCounts.orphaned ● Int! non-null scalar​

Trade rows left open by a bot container reset that the bot's Freqtrade no longer reports (Trade.orphanedAt set, T-M4-16). Not open, not closed; kept as history with nothing invented for them.

BotTradeCounts.syncedAt ● Time scalar​

When the trade rows were last synced from the bot. Null when never synced.

Member Of​

Bot object