Understanding the two import options and their expected formats.
| Import CSV Trades | Import Trade Cache File | |
|---|---|---|
| Source | CSV exported from your broker | JSON file exported from this app |
| Format | Broker-specific CSV or XLSX | App's internal JSON format |
| Use case | First-time import of historical trades | Restoring a backup / syncing between devices |
| Deduplication | By trade_id (merges with existing) | Replaces entire cache for the account |
Use this to import your trade history from a broker's CSV export. The app auto-detects the broker format.
The app accepts .csv, .xlsx, and .xls files. Format is auto-detected based on file content.
Export from: mStock app or website → Trade History report. The file is in .xlsx (Excel) format.
Expected columns:
Trade Date | Exchange | Buy / Sell | Scrip / Contract | Qty | Price | Trade Id
Example rows:
02-04-2026 NSEEQ Buy NATCOPHARM-EQ 77 1016.05 405081515 19-03-2026 NSEEQ Buy HDFCBANK-EQ 9 801.00 204639352
.xlsx format.xlsx file directly — the app handles Excel format natively. No need to convert to CSV first.
Export from: Fyers Web → Order Book report. The orderbook CSV can be generated for a maximum of 1 year at a time.
Expected columns:
Name,Date & Time,Side,Product type,Status,Order type,Qty,Traded price,Limit price,Source,Exchange order ID,OMS order ID
Example row:
NSE:HDFCBANK-EQ,23-01-2024 12:41:51,BUY,CNC,Executed,LIMIT,10,"1,432.00","1,432.00",WEB,="1100000040500546",="250123000100001"
2023: Jan 1, 2023 → Dec 31, 20232024: Jan 1, 2024 → Dec 31, 20242025: Jan 1, 2025 → Dec 31, 20252026: Jan 1, 2026 → TodayFor brokers without a specific parser, the app tries to match columns by name. Your CSV should have headers containing these keywords:
| Required Column | Accepted Header Names |
|---|---|
| Symbol | symbol, tradingsymbol, scrip, stock |
| Side (Buy/Sell) | side, buy_sell, transaction_type, type |
| Quantity | qty, quantity, traded_qty |
| Price | price, average_price, trade_price, rate |
| Date/Time | date, trade_time, order_time, timestamp |
Example:
symbol,side,quantity,price,date HDFCBANK-EQ,BUY,10,1650.50,2026-01-23 09:45:06 RELIANCE-EQ,SELL,5,2450.00,2026-01-24 10:30:00
Only executed trades are imported. The app skips:
After import, a summary dialog shows:
Use this to restore a backup previously exported from this app. The file is a JSON document with a specific structure.
{
"lastFetchedDate": "2026-05-25",
"trades": [
{
"trade_id": "T123456_O789012",
"order_id": "O789012",
"exchange": "NSE",
"tradingsymbol": "HDFCBANK-EQ",
"product": "CNC",
"average_price": 1650.50,
"quantity": 10,
"transaction_type": "BUY",
"order_timestamp": "2026-01-23 09:45:06",
"broker": "fyers"
},
{
"trade_id": "T234567_O890123",
"order_id": "O890123",
"exchange": "NSE",
"tradingsymbol": "RELIANCE-EQ",
"product": "CNC",
"average_price": 2450.00,
"quantity": 5,
"transaction_type": "SELL",
"order_timestamp": "2026-01-24 10:30:00",
"broker": "mstock"
}
]
}
| Field | Type | Description |
|---|---|---|
trade_id | String | Unique identifier for the trade |
tradingsymbol | String | Stock symbol (e.g., "HDFCBANK-EQ") |
quantity | Number | Number of shares |
average_price | Number | Price per share |
transaction_type | String | "BUY" or "SELL" |
order_timestamp | String | Date/time of trade |
| Field | Type | Description |
|---|---|---|
order_id | String | Broker's order ID |
exchange | String | NSE, BSE, etc. |
product | String | CNC, MIS, NRML, etc. |
broker | String | Source broker name |
lastFetchedDate | String | YYYY-MM-DD of last API fetch |
| Scenario | Use |
|---|---|
| First time setting up — want historical trades from broker | Import CSV Trades |
| Moving to a new phone — want all data from old phone | Export Trade Cache → Import Trade Cache |
| Adding trades from a broker that doesn't have API access | Import CSV Trades |
| Restoring from cloud backup | Restore Trades (in Cloud Backup section) |
| Merging trades from multiple CSV exports | Import CSV Trades (multiple times — deduplicates) |