What Is Market Data?
Market data is the stream of prices coming out of a stock exchange: every trade, and every change to the best prices buyers and sellers are offering. It is what makes the price on your trading app move. On a busy day an exchange sends out millions of these updates.
How a Price Reaches Your App
- The matching engine records a trade or a change to the order book.
- The exchange’s market data system turns it into a message, gives it a sequence number, and sends it out on its feed, usually by multicast: one packet that the network copies to every subscriber at once.
- Feed handlers at brokers and data vendors decode the feed, check that no sequence number is missing, and rebuild the order book.
- The broker’s servers push the updates to every app that is watching that stock.
- Your app redraws the price.
Level 1, Level 2 and Tick-by-Tick
- Level 1: the last traded price, and the best price to buy and to sell.
- Level 2 (market depth): the best several prices on each side, with how many shares wait at each. Indian apps commonly show 5 levels, and some offer 20 or more.
- Tick-by-tick: every single change, in order. This is what trading firms use, and it costs more.
Why Does the Price on My App Look Delayed?
- Snapshots, not every tick. Many apps receive a summary several times a second rather than every single change. Between snapshots, the price you see can be a fraction of a second old.
- Conflation. When updates arrive faster than a phone can draw them, the app shows the latest and skips the ones in between.
- Your network. Mobile data adds tens to hundreds of milliseconds.
- Free delayed quotes. Some websites, especially for US markets, show prices 15 minutes late unless you pay for real-time data. Exchanges charge for real-time data, which is one reason.
What Happens When an Update Gets Lost?
Because every message has a sequence number, a receiver knows at once if one is missing. Exchanges usually send two copies of the feed on separate lines, so a message lost on one is often still on the other. If both lose it, the receiver asks a retransmission service for the missing messages, or reloads the full state from a snapshot. Until then, it must not show a price it knows may be wrong.
From Inside an Exchange
I worked on market data systems at the New York Stock Exchange, at Interactive Data, which collected feeds from many exchanges and sold them on, and at Yahoo Finance, which showed them to millions of users. The same three rules held at each: fast, complete, and never out of order. More on the speed side in Latency in Trading.
This article explains how the systems work. It is not financial or investment advice, and limits and rules change: check the current ones with SEBI, your broker or the exchange.