Skip to content
Menu
All work

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
Market researchFrom raw ledger records to a decisionIllustration01Public ledgerEvery trade and order02Extraction scriptsWritten with Claude03Clean tablesTied to ledger totals04AnalysisLiquidity and activityScripts are versioned and rerun from the start, so every figure in a note can be traced back to raw ledger records.Where trading volume sitsShare of volume by market, last 90 daysThin order bookDeep order bookMarket A31%Market B19%Market C12%Market D9%Market E7%Market F5%Market G4%Other markets13%Research notesEach finding ends in a decision for the product teamVolume sits in a few marketsThree markets carry most of the trading.DECISIONPut depth and routing work there first.Small orders struggle on thin marketsWider spreads and more failed fills below a size.DECISIONRoute them through the deeper pool by default.New markets fade in week twoActivity drops once launch interest passes.DECISIONExtend support through the second week.
Illustration. Markets, figures and findings are invented; the platform stays unnamed.

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

  1. Wait for a data request
  2. Export what the dashboard happens to show
  3. Clean it in a spreadsheet
  4. Guess at the rest

With AI

  1. Claude writes and reruns the extraction scripts
  2. 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 · 6 journeys

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

Explore the map

InteractivePick a question and run the research, or sort and filter the markets.
View
Pick a research question.
The question

Which markets carry the trading, and how deep are their order books?

  1. ExtractClaude writes the scriptWaitingReading the ledgerDone
    extract_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.
  2. Clean tableReady for analysisWaitingCleaningDone
    trades, first 5 of 1,284,906 rows
    Preview of the clean trades table, dummy rows
    timemarketsizeprice
    00:00:04A1,2504.0821
    00:00:04A3004.0819
    00:00:11B720.5530
    00:00:19D1812.410
    00:00:26C5,0000.0914
    Raw records become a tidy table with consistent types, units and market labels, so the analysis starts from the same ground every time.
  3. Check against the ledgerBefore any analysisWaitingComparing totalsDone
    1. TradesExtracted 1,284,906Ledger 1,284,906Match
    2. 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.
  4. Analyse and decideFinding and decisionWaitingAnalysingDone
    Share of volume by market
    Last 90 days, all trades
    1. Market A31%, deep order book
    2. Market B19%, deep order book
    3. Market C12%, deep order book
    4. Market D9%, thin order book
    5. Market E7%, thin order book
    6. Market F5%, thin order book
    7. Market G4%, thin order book
    8. Other markets13%
    Finding
    Three 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 team
    Put depth and routing work into Markets A to C first.
    Every figure here traces back to raw ledger records through extract_trades.py, v3.
The question

Do small orders fill on thin markets as often as on deep ones?

  1. ExtractClaude writes the scriptWaitingReading the ledgerDone
    extract_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.
  2. Clean tableReady for analysisWaitingCleaningDone
    orders, first 5 of 3,906,442 rows
    Preview of the clean orders table, dummy rows
    marketsizefilledfull
    A4040yes
    F250no
    B2,4002,400yes
    G6035no
    D15,00015,000yes
    Raw records become a tidy table with consistent types, units and market labels, so the analysis starts from the same ground every time.
  3. Check against the ledgerBefore any analysisWaitingComparing totalsDone
    1. OrdersExtracted 3,906,442Ledger 3,906,442Match
    2. 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.
  4. Analyse and decideFinding and decisionWaitingAnalysingDone
    Orders filled in full within an hour
    By order size, in units
    1. Under 100 units: deep 97%, thin 64%
    2. 100 to 1k units: deep 98%, thin 79%
    3. 1k to 10k units: deep 99%, thin 90%
    4. Over 10k units: deep 99%, thin 95%
    Finding
    On 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 team
    Route 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.
The question

How long do new markets keep the activity they have at launch?

  1. ExtractClaude writes the scriptWaitingReading the ledgerDone
    extract_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.
  2. Clean tableReady for analysisWaitingCleaningDone
    listing_weeks, first 5 of 72 rows
    Preview of the clean listing_weeks table, dummy rows
    marketweektradesaccounts
    K19,4121,206
    K24,630702
    K34,071611
    L17,9581,044
    L24,188598
    Raw records become a tidy table with consistent types, units and market labels, so the analysis starts from the same ground every time.
  3. Check against the ledgerBefore any analysisWaitingComparing totalsDone
    1. TradesExtracted 418,230Ledger 418,230Match
    2. 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.
  4. Analyse and decideFinding and decisionWaitingAnalysingDone
    Activity after listing
    Nine new markets, week one = 100
    Trades by week since listing: 100, 52, 44, 41, 39, 38, 38, 37. Active accounts: 100, 61, 54, 50, 48, 47, 46, 46.
    Finding
    Activity 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 team
    Extend 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.
Order book depth
12 markets, 100% of volume. Deep markets have a median spread of 6 bps, thin ones 42 bps.
5 deep markets carry 69% of volume, at a median spread of 6 bps.
7 thin markets carry 31% of volume, at a median spread of 42 bps.
Twelve dummy markets with volume share, order book depth, median spread, small-order fill rate and 30-day trend. Sortable.
Market Adeep31%98%+6%
Market Bdeep19%97%+2%
Market Cdeep12%97%−3%
Market Dthin9%71%+9%
Market Ethin7%66%−4%
Market Fthin5%63%0%
Market Gthin4%60%−8%
Market Hdeep4%96%+1%
Market Ithin3%64%−2%
Market Jdeep3%97%+4%
Market KNewthin2%58%−38%
Market LNewthin1%66%−46%
Volume share over the last 90 days. Spread is the median, in basis points. Small-order fill is the share of orders under 100 units filled in full within an hour. The trend is the change in daily trades over 30 days, on one scale for every market.
  1. 01SourceEvery trade, order and balance change in the public ledger. The full record, not a sample.Out: Raw ledger records
  2. 02ExtractClaude writes the extraction scripts against the ledger’s public interfaces.Out: Versioned scripts
  3. 03Clean and checkOne row per event, tied to the ledger’s own totals before anyone looks for a pattern.Out: Clean tables
  4. 04AnalyseLiquidity, trading activity and how participants behave, market by market.Out: Charts and figures
  5. 05DecideEach note ends in a recommendation the product team can act on.Out: A decision

What the method guarantees

  1. Full record, not a sampleScripts read every event in the period, so small markets and rare cases are counted too.
  2. Scripts versioned and rerunWhen a question changes, the script changes and runs again from the first record.
  3. Tied to ledger totalsRow counts and totals must match the ledger before any analysis starts.
  4. Traceable figuresEvery figure in a research note points back to the raw records it came from.

One script, four versions

extract_listings.py, behind the question on new markets. Each change reran it from the first record.
  1. v4Count active accounts per week, not only trades2026-08-31Rerun, totals match
  2. v3Start each market from its own listing date2026-08-12Rerun, totals match
  3. v2Add the markets listed in July2026-07-28Rerun, totals match
  4. v1First version: trades per new market per week2026-07-09Rerun, totals match
Illustration. Markets, figures and findings are invented; the platform stays unnamed.

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
  1. 01Source

    Every trade, order and balance change sits in a public transaction ledger. Nothing is sampled; the full record is the starting point.

  2. 02Extract

    Claude writes the extraction scripts against the ledger's public interfaces. They are versioned and rerun from the start when a question changes.

  3. 03Clean and check

    Raw records become one-row-per-event tables, checked against the ledger's own totals before anyone draws a conclusion.

  4. 04Analyse

    Liquidity, trading activity and how participants behave, market by market, with AI helping to explore and to explain what the numbers show.

  5. 05Decide

    Each piece of research ends in a recommendation the product team can act on, with the figures traceable back to raw records.

Want something like this built for your team?

Tell us about the process or the data. We'll reply within two business days with a first view of what we'd build.