Memo № 08

Engineering · 2026.08.14 · 4 min read

Your Bank’s CSV Is a Mess. Here Is How We Parse 55 of Them.

Field notes from building a parser corpus: thousands separators that look like decimals, dates with no year, BOMs and Windows line endings, and the tests that keep 55 bank and 31 exchange formats working.

Hands filling in a paper form with a pen
Every bank invents its own export. The parser reads all of them. · Photo: Unsplash

Open Banking covers the connected banks. Everything else arrives as a CSV export, and every bank invents its own. This is what we learned building a parser that recognises 40+ bank formats and 30+ exchange and broker exports, and the tests that stop them from breaking.

The number is the hard part

"1.234,56" is one thousand two hundred thirty-four and fifty-six cents in Spain. "1,234.56" is the same amount in the UK. "1.234" is a thousand in Madrid and one point two three four in London. A parser that guesses per cell will get some of them wrong; a parser that decides per file, from the majority pattern of that file, gets them right. Ours reads the whole column before it reads a single value.

Scientific notation is the other trap: a crypto exchange will export "3.6e-5 USDT", and a naive strip of the letters turns the exponent into "3.6-5", which parses as 3.6. That is a hundred-thousand-fold error on a dust amount, and it happened to us in a fixture before it happened to a user.

Dates

Day-month-year in most of Europe, month-day-year in US exports, year-month-day in the sane ones, and "5/1/2025" in a Hyperliquid export that means the fifth of January. A two-digit year, a date column with no time and a separate time column (Bitvavo), a header that says "Time(UTC+8)" and expects you to shift by eight hours. Our rule: the header's declared timezone wins, an undeclared one is UTC, and a fixture proves each format lands on the right day.

The invisible characters

A byte-order mark at the start of the file, put there by Excel, breaks the first column name. Windows line endings add a carriage return to the last cell of every row. A trailing blank line looks like an empty transaction. Every fixture in our corpus is tested plain, with a BOM, with CRLF, and with a trailing line, and each must be claimed by exactly one detector in all four variants.

Detection before parsing

The dangerous failure is not "this file cannot be parsed". It is "this file was parsed by the wrong parser": a Blofin export that trips the OKX detector because Blofin is a fork of it, a MEXC file whose "Executed Amount" column contains the word Binance's detector looks for. Detectors match exact header cells, not substrings, and the corpus test proves that every fixture is claimed by one detector and rejected by all others.

What "verified" means

A fixture is verified when its header and conventions were copied from a real export; modelled when it was built from the venue's documented columns because nobody has shared a real file yet. The README says which is which. When a real one turns up, it replaces the model, keeps the file name, and the expected outcome in the test is updated. Three venues (Backpack, Lighter, Aster) are modelled today; the other thirty-odd are verified.

When rules fail

A format nobody has seen goes to a model with the header and a few rows, with account numbers and names stripped first, and the model proposes a column mapping. The proposal is validated the same way a rule-based one is: numbers must parse, dates must land in the past, amounts must not all be zero. The rule-based path handles well over ninety percent of uploads; the model is the last resort, not the first.

The ask

If your bank or broker is not recognised, the fastest fix is your anonymised export. Lait offers to share it after a successful import, and every shared sample becomes a fixture that protects the next person with the same bank.

Try it

Lait puts your crypto, stocks, banks, property and debt on one screen, in EUR or USD. Request an invitation.

No card needed. Basic access is free. Built in Barcelona.

← All memosLait / Barcelona
LaitLive Asset Intelligence
Barcelona