Export account history as CSV (Beta)

Exports the trading history and account events for a specified smart account address as a CSV file, using the same filters as GET /v2/account_history.

This endpoint is currently in Beta and has not been fully validated in production yet.

The response is a downloadable CSV (Content-Type: text/csv; charset=utf-8) with a leading UTF-8 byte-order mark (BOM) for spreadsheet compatibility, and a Content-Disposition: attachment header. Each event is rendered as one wide row across all event types (trade, transfer, settlement, funding).

Pagination is not supported. Unlike GET /v2/account_history, the export streams the full matching result set in a single response. Supplying any of cursor, offset, or limit (even with an empty value) returns HTTP 400.

Row cap: the export returns up to a server-configured maximum number of rows (see the X-Export-Max-Rows response header). When the result set exceeds the cap, the response is truncated and X-Export-Truncated is set to true.

Response headers:

  • Content-Disposition: attachment with a generated filename, e.g. account-history-0x24a90351-20240101-all.csv (address is truncated to a short lowercased prefix; an omitted start/end bound renders as all).
  • X-Export-Row-Count: number of data rows written.
  • X-Export-Truncated: true when the result set was clipped to the row cap, otherwise false.
  • X-Export-Max-Rows: the maximum number of rows the export will return.
Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…
Query Params
string
required
^0x[a-fA-F0-9]{40}$

The smart account address to export history for

string
enum
Defaults to timestamp

Field to sort results by. Defaults to timestamp.
Use realized_pnl to sort by P&L (only applies to trade and settlement events).

Allowed:
string
enum
Defaults to desc

Sort direction. Defaults to desc (newest/highest first).

Allowed:
integer
1704067200000 to 2019686400000

Start timestamp (Unix milliseconds) for the history query.
Must be between 2024-01-01 and 2034-01-01.
Defaults to 30 days ago if not specified.

integer
1704067200000 to 2019686400000

End timestamp (Unix milliseconds) for the history query.
Must be between 2024-01-01 and 2034-01-01.
Defaults to current time if not specified.

string

Comma-separated list of event types to filter by.
Available types: trade, transfer, settlement, funding

string

Comma-separated list of actions to filter by.
Examples: buy, sell, deposit, withdrawal, settlement

string
enum

Filter transfer events by type:

  • internal: Transfers between margin accounts (same smart account)
  • external: Transfers to/from external wallets
Allowed:
string

Comma-separated list of markets to filter by.
Filters events by instrument name prefix (e.g., BTC matches BTC_USDC-PERPETUAL).
Available markets: BTC, ETH, ARB

Headers
string
enum
Defaults to application/json

Generated from available response content types

Allowed:
Responses

Language
Credentials
Header
URL
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
text/csv
application/json