Parse Transactions
parse_transactionsNormalise an exchange CSV export into the canonical ledger rows. FREE.
Supports the Coinbase transaction-history export (Transaction Type / Asset / Quantity Transacted columns), the Kraken ledgers export (txid / refid / type / asset / amount / fee) and a generic CSV with the canonical columns ts, type, asset, qty, fiat_value, fee_qty, fee_asset, fee_fiat, counter_asset, counter_qty, account, id. Typical input {"csv_text": "...", "source_hint": "coinbase"} returns {"rows": [...], "detected": "coinbase", "unrecognised": [...], "warnings": [...]}. Rows it cannot read are returned under unrecognised with the reason, never dropped silently. In every row qty is the whole amount that entered or left the account; when a fee was paid in the same asset, fee_qty is the part of qty that was the fee. Use before ledger_lint and build_lots. Not for other exchanges: convert those to the generic columns first. Errors: on invalid, missing, or malformed input this tool never raises a protocol error — it returns {"error": ""} (for example {"error": "csv_text must be the CSV file contents"}). Every call is read-only and idempotent, so after correcting the input it is always safe to retry.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | account label to stamp on every row (defaults to the source name). | |
| csv_text | Yes | the CSV file contents (up to 2 MB). | |
| source_hint | No | coinbase, kraken or generic; empty to detect from the header. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||