<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Trading on Sohil Ladhani Blog</title><link>https://sohilladhani.com/blog/tags/trading/</link><description>Recent content in Trading on Sohil Ladhani Blog</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 14 Apr 2026 00:00:00 +0000</lastBuildDate><atom:link href="https://sohilladhani.com/blog/tags/trading/index.xml" rel="self" type="application/rss+xml"/><item><title>Order Matching Engine</title><link>https://sohilladhani.com/blog/post/2026-04-14-order-matching-engine/</link><pubDate>Tue, 14 Apr 2026 00:00:00 +0000</pubDate><guid>https://sohilladhani.com/blog/post/2026-04-14-order-matching-engine/</guid><description>A stock exchange doesn&amp;rsquo;t just record trades. It runs an algorithm that decides which buyer gets matched with which seller. That algorithm is the matching engine, and its design choices are unusually interesting.
The Limit Order Book The core data structure is the limit order book (LOB): two sorted collections of orders, bids (buy orders) and asks (sell orders). Bids are sorted by price descending (highest buyer first), asks by price ascending (lowest seller first).</description></item></channel></rss>