> ## Documentation Index
> Fetch the complete documentation index at: https://docs.phoenix.trade/llms.txt
> Use this file to discover all available pages before exploring further.

# History Export

> Download your trade, funding and collateral history as CSV

From Activity you can export your trades, funding payments and collateral history as CSV files.

## How to export

**1. Open the export dialog**

In Activity, open the **Trade History**, **Funding History** or **Deposits & Withdrawals** tab and select the **Export** (download) icon. **Deposits & Withdrawals** is only on the Portfolio page.

**2. Choose the data**

Under **Data**, pick one or more of **Trades**, **Funding** and **Collateral**.

**3. Choose the date range**

Under **Date range**, pick **30D**, **1Y** or **Custom**. For **Custom**, set a **Start date** and an **End date**.

**4. Start the export**

Select **Export**. The dialog closes and a notification shows that the export is being prepared. Each data type becomes its own export.

**5. Download**

Each file downloads automatically when its export finishes. Your browser may ask once for permission to download multiple files.

## Date ranges and limits

* Dates are UTC calendar days. Both the start date and the end date are included.
* A single export can cover up to 1 year.
* An end date in the future is treated as today.
* If the range includes today, the export stops about 5 minutes before it started running. The file name shows the actual cutoff.
* There is a limit on how many exports you can start in 24 hours, and a limit on how many can be in progress at once. The app shows an error when you hit either limit.
* Repeating the same request while an earlier export of it is still available returns that export instead of starting a new one. This does not apply to an earlier export whose range was cut off at the current time; repeating that request starts a new export.

## Download and retention

* The file is a CSV named `phoenix-{type}_{from}_{to}.csv`, where `{type}` is `trades`, `funding` or `collateral` and the bounds are UTC timestamps such as `20260101T000000Z`. `{to}` is exclusive.
* A finished export is kept for 7 days. Repeating the same request during that time downloads it again without starting a new export.
* Keep the tab open until the download starts. If you close it, repeat the request to get the file.

## Common format

* Comma-separated, with a header row.
* Strings are quoted.
* Numbers are plain decimals in human units (not lots), without trailing zeros.
* Timestamps are ISO 8601 UTC with microseconds, for example `2026-01-10T00:00:00.000000Z`.
* Rows are sorted oldest first.
* USDC amounts have at most 6 decimal places.

## Trades

```csv theme={null}
"timestamp","market","type","action","size","price","fee_usdc","realized_pnl_usdc"
"2026-01-22T00:00:00.000000Z","BTC","market","close_short",0.2,95000,1.14,5
```

| Column | Description |
| - | - |
| `timestamp` | Time of the fill. |
| `market` | Market symbol. |
| `type` | One of `limit`, `market`, `liquidation`, `adl`, `take_profit_stop_loss`. |
| `action` | One of `open_long`, `close_long`, `open_short`, `close_short`. A position flip in a single event appears as one close row covering the full size. |
| `size` | Absolute size in base units. |
| `price` | USDC per base unit. For liquidation and ADL rows it is the transfer price. |
| `fee_usdc` | Fees you paid for this fill: the maker or taker fee, plus the liquidation fee for liquidations. |
| `realized_pnl_usdc` | Realized PnL for this fill. Positive is profit. Fees are not included; they are in `fee_usdc`. |

* Rows where your position size didn't change are left out.
* Trades from all your subaccounts are included. There is no subaccount column.

## Funding

```csv theme={null}
"timestamp","market","position_size","mark_price","funding_payment_usdc"
"2026-01-12T00:00:00.000000Z","BTC",0.3,95000,-1.25
```

| Column | Description |
| - | - |
| `timestamp` | Time of the funding payment. |
| `market` | Market symbol. |
| `position_size` | Signed position size in base units. Positive is long, negative is short. |
| `mark_price` | USDC per base unit. |
| `funding_payment_usdc` | Negative means you paid, positive means you received. |

* Zero payments are left out.
* Funding from all your subaccounts is included. There is no subaccount column.

> Funding history can be corrected after the fact, so a later export of the same range may differ slightly.

## Collateral

```csv theme={null}
"timestamp","asset","event","amount","fee","balance_after","excess","subaccount"
"2026-01-05T00:00:00.000000Z","USDC","withdrawal",-5,0.1,95,0,0
```

| Column | Description |
| - | - |
| `timestamp` | Time of the event. |
| `asset` | `USDC` or a spot asset such as `SOL`. |
| `event` | One of `deposit`, `withdrawal`, `transfer`, `swap`, `liquidation`. |
| `amount` | Signed. Inflows are positive, outflows are negative. A USDC withdrawal's amount includes the fee, so you receive the absolute amount minus `fee`. A transfer appears as two rows: negative on the source subaccount and positive on the destination. |
| `fee` | The withdrawal fee. USDC only. |
| `balance_after` | The balance of this asset in this subaccount after the event. |
| `excess` | Spot assets only. The amount cut off by a deposit cap, or the extra amount swept out by an excess withdrawal. |
| `subaccount` | `0` is the cross-margin subaccount, `>0` is an isolated subaccount. See [Accounts](https://docs.phoenix.trade/phoenix/collateral-and-accounts/accounts.md). |

## See also

* [SDK collateral](https://docs.phoenix.trade/sdk/collateral.md)
* [Accounts](https://docs.phoenix.trade/phoenix/collateral-and-accounts/accounts.md)
* [FAQ](https://docs.phoenix.trade/phoenix/faq/faq.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.