Aperiodic/Markets from First Principles

An interactive guide · By Daniel and Mark

Markets from First Principles

How markets work, from a village market square to perpetual futures and the data behind them. Every figure is one you can play with.

Start with lesson 1or read it all on one page

All lessons

Part 1Beginner: No background needed

How a price is made

No finance needed. Works for any market.

  1. 1
    From a square to a bookWhat happens when a crowd wants to trade, and they can't all be there at the same time?
    • ƒbest bid and ask
    • ƒspread
    • ƒmid price
    Read
  2. 2
    Why there's a gapWhy does buying cost more than selling at the same moment?
    • ƒspread in basis points
    • ƒweighted mid price
    • ƒimbalance at the best prices
    Read
Part 2Trader: Knows a bid from an askQuant: Trades or models for a living

Pushing and paying

Who moves the price, and what it costs to move it.

  1. 3
    Who's pushingEvery trade has a buyer and a seller. Which one moved the price, and was it a crowd or one big player?
    • ƒtaker buy and sell flow
    • ƒflow toxicity
    • ƒtrade run imbalance
    Read
  2. 4
    What the candle leaves outWhat does a five-minute candle throw away?
    • ƒupticks and downticks
    • ƒtrade sizes
    • ƒjump ratio
    • ƒflow entropy
    Read
  3. 5
    Walking the bookWhat does it cost to buy more than the best ask holds?
    • ƒorder book depth, 5 to 25 levels
    • ƒslippage
    • ƒbook imbalance
    Read
  4. 6
    Every trade leaves a markAfter a big order, how much of the move stays?
    • ƒKyle's lambda
    • ƒAmihud illiquidity
    • ƒlarge-trade reversal
    Read
Part 3Trader: Knows a bid from an askQuant: Trades or models for a living

Today's markets

Perpetuals, stocks on crypto venues, many venues at once, and the data behind it all.

  1. 7
    A contract that never expiresHow do you trade bitcoin without ever holding any, and what happens when everyone borrowed to do it?
    • ƒfunding rate
    • ƒbasis
    • ƒmark and index price
    • ƒopen interest
    Read
  2. 8
    A stock that trades on SundayWhat is a Tesla perpetual, and what does it do while Nasdaq is closed?
    • ƒbasis
    • ƒspread and depth on stock perpetuals
    Read
  3. 9
    Three numbers for any marketThe same asset trades on several venues. Where is it cheapest to trade, where is it deepest, and where is it hardest to move?
    • ƒthe Cost, Depth and Impact indices
    Read
  4. 10
    Behind the numbersWhy is market data so hard to get right, and how does bad data make a backtest lie?A short version. The full course, Building market data, comes later.
    Read
Aperiodic

Built from hundreds of terabytes of raw data and distilled into point-in-time metrics you can pull as parquet files. Plus the raw trades, quotes and derivatives data behind them.

Use Cases
  • Improve your backtest
  • Find new alpha
  • Execute smarter
Indices
  • All indices
  • Aperiodic Cost Index
  • Aperiodic Depth Index
  • Aperiodic Impact Index
Metrics
  • Metrics library
  • Data Catalog
  • Free data
  • Live markets dashboard
  • Every perp, A–Z
  • Global Liquidity
  • Unusual activity
  • Order Flow
  • L1 & L2
  • Derivatives
  • RWA
  • Live funding rates
  • Raw Data
Developers
  • Docs
  • API Docs
  • MCP Server
  • Notebooks
  • Integrations
  • For AI Agents
  • Atlas Security Master
  • TParquet
  • Binance OI history API
  • OKX history APIs
  • Pre-flight
  • Changelog
  • Roadmap
  • llms.txt
Learn
  • Markets from First Principles
  • Replays
  • Microstructure Guide
  • Architecture
  • Research Blog
  • FAQ
Compare
  • All vendors
  • Pricing compared
  • vs. Tardis
  • vs. CoinGlass
  • vs. Kaiko
  • vs. Amberdata
  • vs. Crypto Lake
  • vs. Laevitas
  • vs. Coinalyze
  • vs. Binance public data
  • vs. Hyperliquid data
  • Binance archive
  • Hyperliquid data
Company
  • Team
  • Pricing
  • Contact
  • Book a call
  • Terms of Service
  • Privacy Policy
  • Licensing
  • SLA

© Copyright 2026 Aperiodic. All Rights Reserved.

Aperiodic Limited · Registered in Ireland · Company No. 815273 ·
136 Capel Street, Dublin D01 T2C9, Ireland