Skip to content

feat: add trading history CSV export (Bounty #14)#200

Open
XuanYuandp wants to merge 1 commit into
capofficial:mainfrom
XuanYuandp:feat/export-trading-history
Open

feat: add trading history CSV export (Bounty #14)#200
XuanYuandp wants to merge 1 commit into
capofficial:mainfrom
XuanYuandp:feat/export-trading-history

Conversation

@XuanYuandp
Copy link
Copy Markdown

Closes #14

Adds a CSV export button to the History panel toolbar.

Changes

src/lib/export.js (new):

  • exportHistoryToCSV() utility function
  • Converts sorted history items to CSV with all columns
  • Auto-downloads as cap-trading-history-YYYY-MM-DD.csv
  • Uses Blob API for client-side generation

src/components/trade/account/Account.svelte:

  • Import exportHistoryToCSV
  • Add CSV export button next to the filter icon in history panel

Notes

Wallet: XuanYuandp

- Add CSV export button to History panel toolbar
- Create export.js utility that converts sorted history to CSV
- Export includes all columns: Order ID, Date, Side, Market, Price,
  Size, Asset, Margin, Leverage, Type, Status, Reason, P/L, Fee, Expiry
- Auto-named file with current date (cap-trading-history-YYYY-MM-DD.csv)
- Uses Blob API for client-side generation (no server roundtrip)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Export trading history

1 participant