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
| Way | What it exports |
|---|---|
| 💼 Trades → History → 📥 Export CSV | All the closed trades |
The command /export_history | The same |
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_history | The 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. Exporting the signal history of a channel is a separate button in the channel admin cabinet, see Exporting the signal history.
How it works
- Press 📥 Export CSV or send the command.
- The bot sends a file with a caption, for example: “📊 Closed trades history: 37 records. CSV file (UTF-8).” and confirms: “✅ Trade history file has been sent.”
- 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).”
- A large export with
/export_all_historyis split into parts automatically: “📊 DCA + Grid history — part 2”.
The button in the history exports all the closed trades in full — the filters by period and pair selected on the screen do not affect the file. It is easier to filter the data in the spreadsheet.
What is inside the files
| File | Columns |
|---|---|
| The trade history | trade_id, bot_id, pair, direction, creation_date, position_qty, state |
| The Grid history | level_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 history | trade_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 |
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 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
| Data | Term |
|---|---|
| The trades themselves (the trade history, the DCA export) | Never deleted |
| The levels of closed Grid bots | 90 days, after that they go to the archive |
| The cycles of DCA bots | 30 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
| Parameter | Value |
|---|---|
| Format | CSV, UTF-8 |
| Who can export | The owner of the bot only |
| Large files | Split into parts automatically |
| The Grid levels | Available 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_historyhas 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.
