Skip to main content

Record trading bot data in Blockpit manually

This article shows how to import exchange-native trading bot data (from Pionex, BingX and others) into Blockpit: bot products that an exchange offers and runs itself (e.g. grid bots, DCA bots, futures bots). It does not cover external third-party bots that connect to an exchange via API. Their trades are often already included in the regular API or CSV import.

​

At a glance

​

👁️ Bots look similar in the interface but produce different data in the background: normal spot buys and sells, borrowed capital (spot margin) or futures/perpetuals/options with realized profits/losses plus funding and fee entries. First identify the bot type, then choose the import and labels. This also applies if the exchange only shows a final result.

​

Bot type

How to recognize it

Blockpit labels

Spot (grid, DCA, rebalancing)

The export looks like normal buy/sell transactions including fees

Spot margin

Spot trades plus borrow events, repay events and possibly interest

Futures, perpetuals, options

The exchange shows realized PnL, funding fees, position size or liquidation price instead of individual buy/sell transactions

​

​

Step 1: Identify the bot type

Before you import, clarify which type of bot ran:

​

What matters is:

  • What does the bot trade in the background?

  • Which data does the exchange provide (API, CSV/Excel export or only results in the UI)?

  • Is it spot, margin or derivatives?

​

Once you know this structure, the import becomes much easier.

​

Spot trading bots

Spot bots place regular buy and sell orders on the spot market. For tax purposes this creates normal spot transactions: you record them as Trade. If your export contains the full trade history via API or CSV, you import it like any other exchange activity. You do not need a separate PnL calculation because spot taxation is based on individual buy and sell events.

​

💡 Tip: If the export looks like normal buy/sell transactions including fees, it is very likely spot market trading.

​

Spot margin bots

Spot margin bots combine spot trades with borrowed capital (spot buys and sells, borrow events, repay events, possibly interest). In Blockpit you reflect this with Trade, Receive Loan and Repay Loan. You do not need derivative labels for margin trading. Missing loan entries, however, are one of the most common causes of a mismatched balance (asset amount).

​

⚠️ Attention: If negative balances appear after the import, first check whether all borrow and repay transactions are included.

​

Futures, perpetual or options bots

Derivatives bots trade contracts instead of spot assets. Typical elements in the interface are realized PnL, funding fees, position size and liquidation price. Tax valuation is based on the realized profit or loss: Derivative Profit, Derivative Loss and Derivative Fee. Spot trade entries alone are not enough here.

​

💡 Tip: If the exchange shows funding payments or position-based PnL data instead of individual buy/sell transactions, it is derivatives.

​

​

Step 2: Import via API or CSV (recommended)

Whenever possible, use the API or official CSV exports:

  • Spot bots: trade history

  • Margin bots: trade history and margin ledger (borrow/repay)

  • Derivatives bots: realized PnL data plus funding/fee history

​

Some exchanges split the data across several exports or provide it via a sub-account API key, for example trade history, income history, funding history and margin ledger. Consider all relevant files. If the data already contains all underlying transactions, you upload it directly or migrate it into the Blockpit Excel template.

​

​

​

Step 3: Manual import with the Blockpit Excel template

If no suitable export is available, you transfer your data manually into the official Blockpit Excel template. Always take fees into account.

​

Bot type

What you record

Label

Spot bots

each buy and sell order individually

Spot margin bots

borrowed amount

Spot margin bots

repayment

Spot margin bots

trades

Derivatives bots

positive realized result

Derivatives bots

negative realized result

Derivatives bots

funding and trading costs

​

Spot bots (manual)

Record each buy and sell order individually as Trade and take the fees into account.

​

Spot margin bots (manual)

You need the borrowed amount (Receive Loan), the repayment (Repay Loan) and the trades (Trade). Missing loan entries usually lead to a mismatched balance (asset amount).

​

Derivatives bots (manual)

Record the positive realized result as Derivative Profit, the negative one as Derivative Loss, and funding and trading costs as Derivative Fee.

​

⚠️ Attention: Exchanges calculate PnL differently. Realized PnL values can already include partial take profits, position top-ups, multiple partial closes, funding fees and trading fees. Always check whether funding and fees are already included in the PnL value so you do not record them twice.

​

​

Special case: only the final bot result is visible in the interface

Some exchanges provide no detailed transaction history and only show a final strategy result (e.g. Total Profit or Net PnL) in the dashboard. In that case you can record the result in aggregated form in Blockpit:

​

It usually makes sense to assign the result to the tax year in which the bot was closed and the profit or loss was realized.

​

💡 Tip: If detailed transaction data is available, always prefer that option.

​

​

If the asset balance does not match

Mismatched balances (asset amount) often result from incomplete exports:

  • missing Receive Loan and Repay Loan entries

  • missing funding fees

  • limited export periods

  • bot sub-accounts not included

  • missing historical starting balances

​

Blockpit offers Auto-Balancing, which can create balancing transactions if historical data is missing. Review these transactions carefully and adjust them if necessary (e.g. relabel as a non-taxable deposit if a starting balance is missing).

​

In many cases, completing the missing history (loans, funding, transfers) manually gives the most accurate and audit-proof result.

​

​

Checklist before you finish

​

​

Typical mistakes

✗ Not checking the bot type and importing everything as spot → for derivatives bots, spot trades are not enough

✗ Forgetting borrow or repay entries → a common cause of mismatched balances and negative holdings

✗ Recording funding and fees twice → they are often already included in the realized PnL value

Did this answer your question?