Skip to content

Exporting the history to CSV ​

The bot can give you the history as a CSV file — you can open it in Excel or Google Sheets and calculate anything you like: the result by pair, by bot, by month. The file arrives right in the chat with the main bot.

Where it is in the bot ​

WayWhat it exports
The app: 💼 Trades → 📜 History → 📤 Send CSV to TelegramThe closed trades for the period selected on the tab
The command /export_historyAll the closed trades
The command /export_grid_history <gridBotId>The level history of one Grid bot
The command /export_dca_history <dcaBotId>The cycle history of one DCA bot
The command /export_all_historyThe whole history of all your DCA and Grid bots in one file

The commands are sent as text in the chat with the main bot @sync_trading_bot. The ID of a Grid or a DCA bot is the number after the “#” that the bot shows in the notifications about that bot. The owner of a channel exports its signal history in the Sync app — on the channel management page, see Exporting the signal history.

On the website: the closed trades — the Trades page → Export CSV; everything at once — Settings → Export everything: the buttons Trades (CSV) and DCA and Grid (CSV) (the same as the /export_all_history command). See Trades on the website and Website settings.

In the app inside Telegram a file cannot be downloaded — there the button is 📤 Send CSV to Telegram instead: the bot sends the same file to your chat with it (“The file was sent to your chat with the Sync bot.”). All exports of the app work this way: trades, Grid and DCA bots, “Export everything”, the signal history of a channel, partner payments and statistics.

How it works ​

  1. Send the command or press the export button in the app.
  2. The bot sends a file with a caption, for example: “📊 Closed trades history: 37 records. CSV file (UTF-8).” There is no separate confirmation — the message with the file is the answer.
  3. For Grid and DCA the caption is “📊 Grid bot #12 levels history. CSV file (Excel-compatible).” and “📊 DCA bot #7 cycle history. CSV file (Excel-compatible).”
  4. A large export with /export_all_history is split into parts automatically: “📊 DCA + Grid history — part 2”.

The /export_history command exports all the closed trades in full. The button on the Closed tab of the app exports the closed trades for the selected period or close dates; the other filters of the list do not affect the file. It is easier to filter the data in the spreadsheet.

What is inside the files ​

FileColumns
The trade historytrade_id, bot_id, pair, direction, creation_date, position_qty, state
The Grid historylevel_index; price; state; buy_filled_qty; sell_filled_qty; level_pnl and the summary block: the bot ID, the symbol, the state, Realized PnL, Funding, Unrealized PnL
The DCA historytrade_id; creation_date; direction; leverage; position_qty; state; cycle_archived; tp_strategy; tp_levels_count; tp_geometric_ratio; sl_timeout_seconds; accumulated_funding; net_pnl and the totals: the bot ID, the symbol, the state, Total PnL, Funding, Net PnL, completed cycles
All DCA and Grid (/export_all_history)shared columns type; bot_id; bot_name; symbol; creation_date; state; …; pnl_or_levelpnl; …; net_pnl: in a Grid level row pnl_or_levelpnl is the level profit, in a DCA cycle row — the profit of that cycle (not of the whole bot)

The state column of the Grid file marks each level as empty, buy pending, buy placed, bought, sell pending, sell placed, sold, partially filled, a placement error or cancelled. In the file itself these labels are written in Russian — the English names above only explain what they mean. The levels in the file go by price from the bottom up, and the cancelled levels are at the end of the list.

The encoding is UTF-8. If Excel showed garbled characters, import the file through “Data → From Text” with the UTF-8 encoding, or open it in Google Sheets.

How long the data is kept ​

DataTerm
The trades themselves (the trade history, the DCA export)Never deleted
The levels of closed Grid bots90 days, after that they go to the archive
The cycles of DCA bots30 days; the trades stay

The practical consequence: /export_grid_history for a Grid bot closed more than 90 days ago returns an empty list of levels. If the history of a particular grid matters to you, download the file while the bot is fresh. The trade history and the DCA export are not affected by this.

Limits and allowed values ​

ParameterValue
FormatCSV, UTF-8
Who can exportThe owner of the bot only
Large filesSplit into parts automatically
The Grid levelsAvailable for 90 days after the bot is closed

Common errors and what the bot says ​

  • “ℹ️ You have no closed trades to export yet.” — not a single trade has finished yet.
  • “ℹ️ Usage: /export_grid_history <gridBotId>” / “ℹ️ Usage: /export_dca_history <dcaBotId>” — the command was sent without an ID.
  • “❌ ID must be a number.” — put only the number after the command, without the “#”.
  • “❌ Grid bot with this ID was not found or belongs to another user.” / “❌ DCA bot with this ID was not found or belongs to another user.” — check the ID.
  • “ℹ️ You don't have any DCA or Grid bots yet for export.” — /export_all_history has nothing to export.
  • “❌ Could not send the file. Please try later or contact support.” / “❌ Failed to send combined export. Please try later.” — a temporary sending failure; try again in a minute, and if it repeats write to support.