What Happens When You Click Buy?
When you click the buy button in your brokerage app, you're setting in motion a chain of events that moves faster than you can read this sentence. What appears instant on your screen—a confirmation, a position number—is the endpoint of a complex journey involving regulatory systems, clearinghouses, exchanges, and counterparties that you'll never see. Understanding what actually happens when you click buy separates informed traders from those who mistake convenience for simplicity. The infrastructure that executes your order has evolved over decades to protect you while moving billions of shares daily, and knowing its mechanics gives you real insight into why execution quality matters and what "best execution" truly means.
Quick definition: When you click buy, your order travels from your broker's system through routing networks to an exchange or market maker, gets matched with a seller, and enters a settlement process that typically completes in two business days—all while your broker holds regulatory responsibility for the entire journey.
Key takeaways
- Your order doesn't go straight to the stock exchange; it first hits your broker's systems, where routing decisions determine where it actually executes
- Multiple parties—your broker, exchanges, market makers, and clearinghouses—touch your order before it settles
- The entire process from click to settled position takes multiple steps and typically two business days to complete
- Brokers face regulatory requirements to ensure best execution, meaning your order doesn't necessarily go to the cheapest venue
- Technology and regulation have made retail trading instant-feeling, but the settlement mechanics remain deliberately slow to prevent failures
The Millisecond Flash: Order Entry to Broker System
The moment you click buy, your order enters your broker's systems. If you're using Fidelity, Charles Schwab, Interactive Brokers, E*TRADE, or any other retail broker, that system ingests your order details: ticker, quantity, price type (market, limit, stop, etc.), and account information. Your broker's system immediately validates the order—does your account have sufficient cash for a market order, or sufficient margin buying power? Is the stock tradeable under your account type (some brokers restrict certain securities for certain accounts)? Is the symbol real?
This validation happens server-side, measured in milliseconds. You see the spinning wheel or brief pause, and your broker's clearing firm—the entity with direct access to exchanges—receives the order. Major brokers like Fidelity route through their own clearing operations (Fidelity Clearing & Custody Solutions). Smaller online brokers like Webull or Robinhood route through clearing firms they contract with (Robinhood uses Apex Clearing, Webull uses Alpaca). Either way, the clearing firm is the regulatory entity accountable for settlement.
The clearing firm performs second-level validation. Does the account have sufficient buying power after considering existing positions and margin usage? Is the order size within the firm's risk limits? Are there any regulatory holds or restrictions on the account? Only after this passes does the order move to routing.
The Router's Decision: Where Your Order Actually Goes
Your broker's order router now makes the critical decision: where should this order execute? This is not a random choice, and it's not exclusively driven by finding you the cheapest price. Instead, routers operate under the regulatory Best Execution Rule, which requires brokers to seek "reasonably favorable" terms across multiple factors: price, speed, likelihood of execution, settlement, and size.
A sell order for 1,000 shares of Apple might be routed to:
- NASDAQ (where Apple is primarily listed), if the NASDAQ has the best displayed price
- NYSE American (formerly AMEX), if it shows a better quote
- CBOE or other options venues (converted into equivalent stock orders if eligible)
- Internal market maker affiliated with the broker, if they can match the order at the best price
- Third-party market makers like Citadel, Virtu, or Two Sigma, if they've offered favorable execution terms
The router examines the order book—the current list of buy and sell orders waiting to execute at each venue—and determines which venue is most likely to fill your order quickly at the best price. For a market order, this happens in under 100 milliseconds. For a limit order, the broker may hold the order in a queue, periodically checking venues.
Order Transmission: From Your Broker to the Venue
Once the router selects a venue, the order transmits. Most retail orders today hit one of these paths:
Listed Exchange (NASDAQ, NYSE): Your order reaches the exchange's matching engine via a direct connection. The exchange's system confirms receipt and assigns the order an order ID. The exchange's order book now displays your buy order (if it's a limit order), waiting to be matched with sellers. If it's a market order, it immediately seeks to match with existing sell orders on the book.
Market Maker (Citadel Securities, Virtu Financial, Two Sigma): If your broker routes to a market maker, the market maker's proprietary system receives your order. Market makers are obligated to "make a market"—meaning they stand ready to buy or sell securities at any time, within regulatory constraints. The market maker can choose to execute your order from their own inventory (they already own the shares and sell them to you), or they can simultaneously buy those shares from the exchange to fulfill your order.
Alternative Trading System (ATS): A private system like Luminex, Instinet, or IEX may receive your order if your broker has opted into routing there. ATSs operate under SEC Rule 17a-23 and must provide price improvement guarantees if they're taking orders from the public.
The Match: How Your Order Meets a Seller
At the venue level—let's say NASDAQ for a popular tech stock—your buy order sits in the order book. The matching engine is a specialized computer system that continuously compares buy and sell orders. Its sole job: find pairs of orders that cross, meaning a buyer willing to pay at least what a seller will accept.
If you place a market buy order for 500 shares of Microsoft at 10:30 a.m., the matching engine immediately scans existing sell orders:
- Seller A wants $425 for 300 shares (market order)
- Seller B wants $426 for 500 shares (limit order)
- Seller C wants $427 for 200 shares (limit order)
The matching engine pairs you with Seller A first (300 shares at $425). You still need 200 shares, so it pairs you with Seller B (200 shares at $426). Both matches are instantaneous—measured in microseconds on modern exchanges.
You now have a filled order: 300 shares @ $425, 200 shares @ $426. Your average price is $425.40 (before commission). Your broker displays the fill confirmation on your screen.
The Quote Cascade: Why You Don't Always See the Best Price
You've probably noticed that the quoted price in your broker's app sometimes isn't the price you actually got. This is because the National Best Bid and Offer (NBBO) displays the single best price across all exchanges and market makers at any given microsecond, but you don't always execute at the NBBO.
If you place a market buy order when the NBBO is $425 (bid) / $425.05 (ask), you might think you'll pay $425.05. But by the time your order travels through the network (a few milliseconds), the market has moved. Sellers at $425.05 have already filled other orders. Now the ask is $425.10. Or $425.20. This is called market impact—your own order, combined with others, moves prices. It's not a glitch; it's the cost of immediate execution.
For limit orders, your order sits in the queue at your specified price. If the stock trades down to your limit price, you execute. If it trades through without hitting your price, you don't execute, and your order remains open.
Trade Reporting: The Confirmation Lag
Within seconds of execution, your broker sends a trade report to the Trade Reporting and Compliance Engine (TRACE) run by FINRA, and to the exchange itself. TRACE maintains a public database of all trades (though bonds trades are reported here; equity trades are reported to SROs as well).
Your broker displays the confirmation in your account: order number, symbol, quantity, price(s), execution time, order type, and settlement date. The settlement date, by regulation, is T+2—two business days after execution. So if you buy on Monday, the trade settles Wednesday. If you buy on Friday, it settles Tuesday (skipping the weekend).
The confirmation page is binding. Your broker has confirmed the execution details. You now own the position (or owe the shares if you shorted), though the shares won't be fully in your account until settlement.
The Clearing Phase: Behind the Scenes
While you're looking at your confirmation, your broker has already submitted the trade to the clearinghouse. For equities, that's typically The Depository Trust & Clearing Corporation (DTCC), which runs the National Securities Clearing System (NSCC). Your broker must submit trade details within a specific timeframe (same day, if possible).
The clearinghouse does not execute your trade. It's already executed. Instead, the clearinghouse acts as a central counterparty (CCP). Here's the magic: your broker doesn't owe you actual cash, and you don't owe your broker actual shares. Instead:
- The clearinghouse becomes the seller to you (your broker owes you shares), and the buyer from the market maker (the market maker owes the clearinghouse shares)
- This eliminates counterparty risk—if the market maker fails, the clearinghouse guarantees you get your shares
The clearinghouse charges your broker a small fee for this guarantee and holds margin from both parties. It's a quiet, essential system that prevents Lehman Brothers moments from happening on your trades.
Settlement Day T+2: The Book Entry
Two business days after execution, settlement occurs. You don't receive physical share certificates. Instead, your shares exist as book entries—pure electronic records. The DTCC's subsidiary, The Depository Trust Company (DTC), maintains the master ledger of who owns what.
On settlement day:
- Cash leaves your account (or margin is charged) and goes to the selling broker
- Share ownership transfers from the seller's account to your account, via book entry at DTC
- Your broker updates your position statement to show settled shares (not pending)
For most retail investors, this is invisible. Your broker's app shows the position as "bought" immediately after execution, pending settlement. On T+2, it changes to settled. But the electronic transfer of ownership happens automatically between the depository systems.
The Flow Diagram: From Click to Settlement
Real-World Example: Apple Stock on a Typical Tuesday
On Tuesday, March 14, 2023, at 10:47 a.m. ET, you place a market buy order for 100 shares of Apple (AAPL) in your Fidelity account. Here's the actual timeline:
10:47:00 a.m. ET — You click buy. Fidelity's order entry system validates you have $17,200 in buying power (approximately the price of 100 AAPL shares at that moment). The order enters Fidelity's router.
10:47:003 a.m. ET — Fidelity's router checks the NBBO. NASDAQ is showing $173.45 bid / $173.46 ask. Fidelity's affiliated market maker is showing $173.46 bid / $173.47 ask. The router decides NASDAQ has the best ask, routes the order to NASDAQ.
10:47:006 a.m. ET — Order arrives at NASDAQ's matching engine. The engine finds a sell order from another broker's client priced at $173.46. Match! You buy 100 shares at $173.46.
10:47:007 a.m. ET — NASDAQ sends execution report back to Fidelity. Fidelity updates your position to "100 AAPL @ $173.46" and shows the order as filled. Your buying power drops by $17,346.
10:47:100 a.m. ET — Fidelity's compliance system generates a trade report and sends it to FINRA's Trade Reporting and Compliance Engine (TRACE).
Same day, 4:30 p.m. ET — Fidelity submits the trade to DTCC for clearing. DTCC assigns a clearing entry number and confirms receipt.
Wednesday, March 15, 2023 — T+1. The trade is in a pending settlement state. DTCC's systems prepare the securities transfer.
Thursday, March 16, 2023 — T+2. Settlement occurs. Book entry transfer happens at DTC. Your account now shows "100 AAPL (settled)". The $17,346 is fully deducted from your account. The seller's broker's account shows the cash received.
From your click to settled position: 46 milliseconds to 2 days.
Common Mistakes Traders Make About Order Execution
Mistake 1: Assuming "Market Order" Means You Get the Displayed Price Many traders place market orders expecting to get the quoted bid/ask. In reality, market orders can be filled at multiple price levels if the order size is large, or at worse prices if the market has moved since your order was routed. For 100 shares of a liquid stock, you're usually close to the quoted price. For 10,000 shares or an illiquid stock, you can get filled at significantly worse prices.
Mistake 2: Not Understanding T+2 Settlement Traders sometimes liquidate a position on T+1, believing their cash is available. In reality, settlement hasn't occurred yet. Some brokers allow you to trade on unsettled cash (called margin or buying power), but if you sell before T+2 and the original buy fails to settle, you create a violation called a free riding violation, which can trigger restrictions.
Mistake 3: Believing All Brokers Route to the Same Venues Different brokers have different routing arrangements. Some route to NASDAQ by default; others route to affiliated market makers. Some offer customizable routing; others do not. This can cause execution differences of a few cents per share, which compounds on larger trades. Institutional traders pay for smart order routing software to optimize this; retail traders usually accept the default.
Mistake 4: Confusing "Filled" with "Settled" Your order is filled at the time of execution (T+0). But your position is settled at T+2. Between those times, the trade is binding but not yet settled. If the counterparty fails to deliver (rare in equities), a settlement failure can occur, delaying your receipt of shares.
Mistake 5: Placing Limit Orders and Forgetting About Them A limit buy order for 500 shares at $100 might sit in the order book for days if the stock never trades down to $100. Many traders don't check whether their order filled until days later, missing the opportunity to adjust or cancel. Limit orders are powerful tools, but they require active monitoring.
Frequently Asked Questions
How fast does order execution actually happen?
From click to fill, the time is typically measured in milliseconds—less than 1 second for market orders on liquid stocks. However, the full lifecycle (click to settlement) takes 2 business days. The "fast" part is the matching; the slow part is the clearing and settlement, which are deliberately paced to prevent failures.
Why doesn't my broker route my order to the cheapest venue?
Brokers are required by regulation (the SEC Best Execution Rule) to seek "reasonably favorable" terms, not always the cheapest price. Other factors—likelihood of execution, settlement, speed, order size accommodation—matter too. Also, some venues may have faster execution for your order size, even if the price is slightly worse.
Can my broker execute my order without my permission?
No. Your broker executes your order exactly as you've specified (market, limit, stop, quantity). However, your broker can choose the venue, and the actual fill price may differ from the quoted price if the market has moved. This is within the broker's discretion and required by best execution regulations.
What happens if my order is too large for the market?
Large orders can experience market impact. If you try to buy 100,000 shares of a stock with average daily volume of 2 million, your order might need to be split across multiple venues and time periods. Some brokers use algorithmic execution to split large orders into smaller chunks, executed over minutes or hours, to minimize market impact.
Why do some of my shares fill at different prices?
Partial fills occur when the order book doesn't have enough shares at one price level. Your broker's router sends the order to a venue where it matches with multiple sellers at different prices. This is normal and expected for larger orders.
What is payment for order flow, and does it affect my execution?
Payment for order flow (PFOF) occurs when your broker receives a rebate from a market maker for routing orders to them. This can incentivize brokers to route orders to market makers even if the exchange has a slightly better price. The SEC requires brokers to disclose PFOF, but it remains a potential conflict of interest.
Can I choose which venue my order routes to?
Most retail brokers do not offer venue selection. Some platforms (like Interactive Brokers or TradeStation) allow you to specify "NASDAQ," "NYSE," or "ATS," but this is advanced and uncommon. Institutional traders with direct market access can route to specific venues.
Related Concepts
- Your Broker as Intermediary — Understand your broker's role in the execution chain
- Order Routing, Explained — Deep dive into how routers decide where your order goes
- Payment for Order Flow (PFOF) — Learn the controversial incentive that can influence your execution
- The Best-Execution Rule — The regulatory requirement that governs order routing
- From Broker to Exchange — Technical details of order transmission
Summary
When you click buy, your order travels through a choreographed sequence involving your broker's systems, clearing firms, order routers, exchanges or market makers, matching engines, clearinghouses, and settlement systems—all completing the core execution in milliseconds, then spending two business days in clearing and settlement. This journey is regulated, monitored, and optimized to protect you from counterparty risk while providing you with near-instant confirmation. The infrastructure is complex precisely because it handles billions of dollars in daily transactions without failure. Understanding this journey reveals why best execution matters, why settlement takes two days, and why your broker's routing decisions can meaningfully impact your portfolio over time.