--- title: 'CSV Upload' description: 'Import trading data via CSV files with drag-and-drop support' --- ## Overview The CSV Upload feature allows you to import trading transaction data through an intuitive web interface with drag-and-drop support and real-time processing feedback. ## Features Drag CSV files directly onto the upload area Real-time progress bar during processing View recent uploads and statistics Automatic CSV format and size validation ## CSV Format Requirements Your CSV file must include these columns: | Column | Format | Description | |--------|--------|-------------| | **Date** | MM/DD/YYYY | Transaction date | | **Action** | Text | Buy, Sell, Cash Dividend, etc. | | **Symbol** | Text | Stock ticker | | **Description** | Text | Transaction description | | **Quantity** | Number | Number of shares (can be empty for dividends) | | **Price** | Number | Price per share (can be empty for dividends) | | **Fees & Comm** | Number | Trading fees | | **Amount** | Number | Total transaction amount | ## Example CSV ```csv Date,Action,Symbol,Description,Quantity,Price,Fees & Comm,Amount 01/15/2024,Buy,AAPL,Apple Inc,100,150.50,6.95,-15056.95 01/30/2024,Sell,AAPL,Apple Inc,100,155.75,6.95,15568.05 02/15/2024,Cash Dividend,MSFT,Microsoft Corp,,,0.00,75.50 ``` ## Upload Process Go to `/upload` in your application Either drag and drop your CSV file or click to browse The system validates file type (CSV only) and size (50MB max) Watch real-time progress updates as the file is processed View the upload in your history and navigate to the dashboard ## Processing Flow 1. File uploaded to Flask backend 2. Server validation (file type, size) 3. Trading analysis script processes CSV 4. Database synchronization 5. History updated and temp files cleaned up ## Security Login required for all uploads File type and size validation Secure filename handling Automatic temp file removal ## Next Steps Analyze your uploaded data Track your current holdings