Home Trading Exporting your trade history to CSV

Exporting your trade history to CSV

Last updated on Oct 09, 2026

You can export the full history of a perps account to a CSV file — every fill, the realized PnL on those fills, and every funding payment — useful for tax records, accounting, or your own performance analysis.

Exporting

  1. Open Portfolio and select the Trade History table.
  2. Select Export. (The same control is available in Settings → Perps accounts.)
  3. In Export Trade History, choose the account under Select perps account.
  4. Select Export to CSV.

While it runs, the button reads Exporting... and the modal shows Export in progress — "Fetching fills, PnL and funding history." It finishes with Export complete and "Downloaded {n} trades and {n} funding payments as CSV," and the file downloads through your browser.

If you close the modal before the export finishes, the export is cancelled and nothing is downloaded.

You need to be signed in with an initialized perps account. If you have none you will see "No perps accounts available" with "Create or fund a perps account, then export your trade history as CSV."

What the file contains

The export covers the entire history of the selected account up to the moment you start it — there is no date range to set and no dependence on whatever period or filters your Portfolio charts are showing. Large histories therefore take longer.

Each row has a recordType:

recordType What the row is
trade One fill on your account, with its fee and the realized PnL it contributed
pnl Realized PnL that has no fill of yours attached, such as a liquidation
funding One funding payment on one market

Columns, in order:

Column Meaning
recordType trade, pnl or funding (see above)
time When the event occurred
actionId Sequential engine event identifier
tradeId Unique identifier for the fill (trade rows only)
orderId The order the fill belongs to (trade rows only)
marketId / marketSymbol Market the row belongs to
marketMode How the market fills orders: clob (order book) or rfq
side buy or sell, from your account's point of view
role maker or taker, from your account's point of view
price Fill price
baseSize Size filled, in the base asset (always positive — side gives the direction)
positionSize Your position size during that funding period (funding rows only; negative means short)
fee The fee your account paid on that fill, shown as a negative number
tradingPnl Realized PnL from price movement, before fees
closePnl tradingPnl plus fee — your net realized result on the fill
fundingPnl The funding payment for that period (funding rows only)
takerId / makerId Account identifiers for the two sides

Amounts are in USD. Rows are sorted oldest to newest. A blank cell means the value is unknown or does not apply to that row — it never means zero.

A few things worth knowing before you reconcile numbers:

  • Each trade row is a fill, not an order. One order that filled in five parts is five rows.
  • PnL is realized per order, not per fill. When an order fills in several parts, its realized PnL is split across those fills in proportion to their size, so the fills add up exactly to the order's total.
  • Funding is never included in closePnl. It appears only in its own funding rows, so add the fundingPnl column separately to get your full result.
  • For fees and fee tiers, see Trading fees, fee tiers and fee credits. For how funding works, see Funding payments explained.

One account at a time

The export covers the account you select. If you use sub-accounts, export each one separately and combine them yourself — see Perps sub-accounts.

If the export fails

You will see "Failed to export trade history. Please try again." If any part of your history cannot be loaded, the whole export fails and no file is downloaded, so you never get a partial file. Retry, and if it keeps failing on a large history, retry from a stable connection — the export pages through your entire history and needs to finish that walk. Also check that your browser did not silently block the download.

Deposits, withdrawals and transfers are not in this file; view them in their own Portfolio tabs.