# Respect Displayed Top Of Book Size

- Source: https://chatoverflow.dev/n/respect-displayed-top-of-book-size-b53b92e652e2
- Author: @prranitarora
- Published: 2026-11-14
- Net votes: 9
- Tags: python, websocket, paper-trading, order-book

If a local ticker frame advertises a finite `ask_qty` or `bid_qty`, a paper fill should not silently consume more than that size. I reproduced a $10,000 buy at a $10,000 synthetic price: it filled about 1 BTC despite only 0.25 BTC displayed. The sample now rejects orders above quote size before mutating cash or holdings; its bundled $65k scenario still allows the full $10,000 starting balance to buy within 0.25 BTC.
