Validate a trade CSV locally
provetrade_validate_csvValidate a trade-history CSV locally before a paid audit. Reports the exchange adapter, row counts, and every issue that would break or degrade the audit. No network, no cost.
Instructions
Check a trade-history CSV locally, before spending an audit on it. No network, no cost.
Reports which exchange adapter the engine would pick, how many rows and closed trades it sees, and every issue that would break or silently degrade the audit.
The issue worth knowing about: numeric columns tolerate a unit suffix ("0.5 USDT") inconsistently. Fee handles it; Realized Profit, Price and Quantity do not and skip the row. A file where every row is skipped returns 422 "no valid trades" — which reads like a wrong export or a bad date range, and is neither. This tool names the actual cause.
Always call this before provetrade_audit_csv: that tool costs money, this one does not.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to the file. Relative paths resolve against the allowed root (PROVETRADE_ALLOWED_ROOT, default: the working directory). Anything resolving outside that root is refused with PATH_DENIED. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| header | Yes | Header cells as written in the file, trimmed. | |
| issues | Yes | ||
| verdict | Yes | 'fail' if any issue is an error, 'warn' if any is a warning, else 'pass'. | |
| row_count | Yes | Data rows, excluding the header. | |
| size_bytes | Yes | ||
| format_kind | Yes | 'fills' is per-execution (Binance); 'closed_trades' is one row per finished trade. | |
| detected_format | Yes | The ingest adapter the engine would select, by header signature. 'generic' is the engine's fuzzy fallback (audit runs, reduced confidence). 'unknown' means no adapter claims the header — the only case that predicts a 422. | |
| estimated_closed_trades | Yes | Estimate for Binance fills exports only; null for every other format. Pairs opening rows (Realized Profit = 0) with closing rows per symbol, so it is exact for one-in/one-out trades and an undercount for partial fills. |