Trading platform, financial marketsInternal
Market research straight from the raw transaction record
At a trading platform, AI writes the scripts that pull trades and orders from a public ledger, then helps turn the raw records into product and market decisions.
- Industry
- Trading platform, financial markets
- What it shows
- Data extraction, Market analysis, AI-assisted research
- Year
- 2026
- Status
- Internal
What changes
The steps people did by hand, and the route the work takes now.
The team needs to know how a market really behaves
Before
- Wait for a data request
- Export what the dashboard happens to show
- Clean it in a spreadsheet
- Guess at the rest
With AI
- Claude writes and reruns the extraction scripts
- Clean tables are analysed and checked against ledger totals
Product decisions backed by the full trading record
The problem
A trading platform makes product calls every week: which markets to deepen, how to route orders, where new listings need support. The answers were sitting in the raw trading record, but that record is enormous, low level and spread across millions of events, and the usual dashboards only show what someone thought to build in advance.
What we built
A research workflow where AI does the heavy lifting on data that would normally need a data engineering team. Claude writes the scripts that pull trades, orders and balance changes straight from the public ledger, turns them into clean tables and checks them against the ledger’s own totals. The analysis runs on the full record rather than a sample, and every finding ends in a decision for the product team.
Why it matters
Questions that used to wait in a queue for a data request are answered from the source in a day. Because the scripts are kept and rerun, a follow-up question costs minutes, and every figure in a research note traces back to raw records.
Inside the research
Pick a question and run it from script to decision, browse the markets behind it, or see the method that keeps every figure tied to the ledger.
Interactive system map
From a question to the ledger and back as a decision
12 parts and 6 journeys: the reviewed script, the full record, the check against the ledger's totals and the research note. The numbers below are process facts, not platform figures.
Play 6 journeys, or click any of its 12 parts.
- stages, from the public ledger to a decision
- 5
- rules every figure follows
- 4
- example questions, each run from script to decision
- 3
Which markets carry the trading, and how deep are their order books?
- ExtractClaude writes the scriptWaitingReading the ledgerDoneextract_trades.pyv3Written with Claude
# Written with Claude, reviewed, kept under version control from ledger_client import PublicLedger import pandas as pd ledger = PublicLedger() rows = [] for market in ledger.markets(): for t in ledger.trades(market, since="2026-06-01"): rows.append({"time": t.time, "market": market, "side": t.side, "size": t.size, "price": t.price}) trades = pd.DataFrame(rows) trades["value"] = trades["size"] * trades["price"] share = trades.groupby("market")["value"].sum() share = 100 * share / share.sum()Claude drafts the script from the question and a person reviews it before it runs. It reads every record in the period, not a sample. - Clean tableReady for analysisWaitingCleaningDonetrades, first 5 of 1,284,906 rows
Preview of the clean trades table, dummy rows time market size price 00:00:04 A 1,250 4.0821 00:00:04 A 300 4.0819 00:00:11 B 72 0.5530 00:00:19 D 18 12.410 00:00:26 C 5,000 0.0914 Raw records become a tidy table with consistent types, units and market labels, so the analysis starts from the same ground every time. - Check against the ledgerBefore any analysisWaitingComparing totalsDone
- TradesExtracted 1,284,906Ledger 1,284,906Match
- VolumeExtracted 9,402,118,330Ledger 9,402,118,330Match
Analysis only starts once every line matches the ledger’s own totals.Row counts and totals are compared with the ledger’s own figures. A mismatch stops the work until it is explained. - Analyse and decideFinding and decisionWaitingAnalysingDoneShare of volume by marketLast 90 days, all trades
- Market A31%, deep order book
- Market B19%, deep order book
- Market C12%, deep order book
- Market D9%, thin order book
- Market E7%, thin order book
- Market F5%, thin order book
- Market G4%, thin order book
- Other markets13%
FindingThree markets carry 62% of the volume. The thin markets below them trade often, but in small amounts and at wide spreads.Decision for the product teamPut depth and routing work into Markets A to C first.Every figure here traces back to raw ledger records through extract_trades.py, v3.
Do small orders fill on thin markets as often as on deep ones?
- ExtractClaude writes the scriptWaitingReading the ledgerDoneextract_orders.pyv2Written with Claude
# Written with Claude, reviewed, kept under version control from ledger_client import PublicLedger import pandas as pd ledger = PublicLedger() rows = [] for market in ledger.markets(): for o in ledger.orders(market, since="2026-06-01"): rows.append({"order": o.id, "market": market, "size": o.size, "filled": o.filled_size, "hours_open": o.hours_open}) orders = pd.DataFrame(rows) orders["full"] = (orders["filled"] == orders["size"]) \ & (orders["hours_open"] <= 1) bands = pd.cut(orders["size"], [0, 100, 1_000, 10_000, None])Claude drafts the script from the question and a person reviews it before it runs. It reads every record in the period, not a sample. - Clean tableReady for analysisWaitingCleaningDoneorders, first 5 of 3,906,442 rows
Preview of the clean orders table, dummy rows market size filled full A 40 40 yes F 25 0 no B 2,400 2,400 yes G 60 35 no D 15,000 15,000 yes Raw records become a tidy table with consistent types, units and market labels, so the analysis starts from the same ground every time. - Check against the ledgerBefore any analysisWaitingComparing totalsDone
- OrdersExtracted 3,906,442Ledger 3,906,442Match
- Filled sizeExtracted 61,207,559Ledger 61,207,559Match
Analysis only starts once every line matches the ledger’s own totals.Row counts and totals are compared with the ledger’s own figures. A mismatch stops the work until it is explained. - Analyse and decideFinding and decisionWaitingAnalysingDoneOrders filled in full within an hourBy order size, in units
- Under 100 units: deep 97%, thin 64%
- 100 to 1k units: deep 98%, thin 79%
- 1k to 10k units: deep 99%, thin 90%
- Over 10k units: deep 99%, thin 95%
FindingOn thin markets, orders under 100 units fill in full only 64% of the time, against 97% on deep markets. The gap closes as orders grow, because larger orders mostly cross the spread.Decision for the product teamRoute small orders on thin markets through the deeper pool by default.Every figure here traces back to raw ledger records through extract_orders.py, v2.
How long do new markets keep the activity they have at launch?
- ExtractClaude writes the scriptWaitingReading the ledgerDoneextract_listings.pyv4Written with Claude
# Written with Claude, reviewed, kept under version control from ledger_client import PublicLedger import pandas as pd ledger = PublicLedger() rows = [] for market in ledger.markets(listed_since="2026-01-01"): for t in ledger.trades(market, since=market.listed): rows.append({"market": market, "account": t.account, "week": t.weeks_since_listing + 1}) df = pd.DataFrame(rows) weekly = df.groupby(["market", "week"]).agg( trades=("account", "size"), accounts=("account", "nunique"))Claude drafts the script from the question and a person reviews it before it runs. It reads every record in the period, not a sample. - Clean tableReady for analysisWaitingCleaningDonelisting_weeks, first 5 of 72 rows
Preview of the clean listing_weeks table, dummy rows market week trades accounts K 1 9,412 1,206 K 2 4,630 702 K 3 4,071 611 L 1 7,958 1,044 L 2 4,188 598 Raw records become a tidy table with consistent types, units and market labels, so the analysis starts from the same ground every time. - Check against the ledgerBefore any analysisWaitingComparing totalsDone
- TradesExtracted 418,230Ledger 418,230Match
- AccountsExtracted 26,915Ledger 26,915Match
Analysis only starts once every line matches the ledger’s own totals.Row counts and totals are compared with the ledger’s own figures. A mismatch stops the work until it is explained. - Analyse and decideFinding and decisionWaitingAnalysingDoneActivity after listingNine new markets, week one = 100Trades by week since listing: 100, 52, 44, 41, 39, 38, 38, 37. Active accounts: 100, 61, 54, 50, 48, 47, 46, 46.FindingActivity in a new market roughly halves in week two, then settles near 40% of launch week. Active accounts fall less steeply than trades.Decision for the product teamExtend launch support through the second week, and review each new market at week four.Every figure here traces back to raw ledger records through extract_listings.py, v4.
| Depth | |||||
|---|---|---|---|---|---|
| Market Adeep | deep | 31% | 3 bps | 98% | +6% |
| Market Bdeep | deep | 19% | 4 bps | 97% | +2% |
| Market Cdeep | deep | 12% | 6 bps | 97% | −3% |
| Market Dthin | thin | 9% | 24 bps | 71% | +9% |
| Market Ethin | thin | 7% | 31 bps | 66% | −4% |
| Market Fthin | thin | 5% | 38 bps | 63% | 0% |
| Market Gthin | thin | 4% | 45 bps | 60% | −8% |
| Market Hdeep | deep | 4% | 9 bps | 96% | +1% |
| Market Ithin | thin | 3% | 42 bps | 64% | −2% |
| Market Jdeep | deep | 3% | 11 bps | 97% | +4% |
| Market KNewthin | thin | 2% | 61 bps | 58% | −38% |
| Market LNewthin | thin | 1% | 55 bps | 66% | −46% |
- 01SourceEvery trade, order and balance change in the public ledger. The full record, not a sample.Out: Raw ledger records
- 02ExtractClaude writes the extraction scripts against the ledger’s public interfaces.Out: Versioned scripts
- 03Clean and checkOne row per event, tied to the ledger’s own totals before anyone looks for a pattern.Out: Clean tables
- 04AnalyseLiquidity, trading activity and how participants behave, market by market.Out: Charts and figures
- 05DecideEach note ends in a recommendation the product team can act on.Out: A decision
What the method guarantees
- Full record, not a sampleScripts read every event in the period, so small markets and rare cases are counted too.
- Scripts versioned and rerunWhen a question changes, the script changes and runs again from the first record.
- Tied to ledger totalsRow counts and totals must match the ledger before any analysis starts.
- Traceable figuresEvery figure in a research note points back to the raw records it came from.
One script, four versions
- v4Count active accounts per week, not only trades2026-08-31Rerun, totals match
- v3Start each market from its own listing date2026-08-12Rerun, totals match
- v2Add the markets listed in July2026-07-28Rerun, totals match
- v1First version: trades per new market per week2026-07-09Rerun, totals match
What it shows
Most companies sit on a raw record they never fully use: transaction logs, event streams, ledgers, order histories. AI is now good enough to write and maintain the extraction code as well as read the results, which puts that record within reach of a small team.
Under the hood
- Claude
- Python
- SQL
01Source
Every trade, order and balance change sits in a public transaction ledger. Nothing is sampled; the full record is the starting point.
02Extract
Claude writes the extraction scripts against the ledger's public interfaces. They are versioned and rerun from the start when a question changes.
03Clean and check
Raw records become one-row-per-event tables, checked against the ledger's own totals before anyone draws a conclusion.
04Analyse
Liquidity, trading activity and how participants behave, market by market, with AI helping to explore and to explain what the numbers show.
05Decide
Each piece of research ends in a recommendation the product team can act on, with the figures traceable back to raw records.