GL-01 · Methodology · 2026-09-22 · 9 min
Reading a book through glass
Every figure Glassy shows, how it is computed, and where the feed runs out.
Glassy shows a handful of numbers for each venue: spread, depth, a deviation from one composite price, stability, the cost of a trade you type in, and a flow reading. This note gives the formula behind each one and says where the data stops, so you can check any figure against the venue yourself.
Where the books come from
Your browser opens the connections, not a Glassy server. Lighter on Robinhood Chain, Lighter on Ethereum, Hyperliquid and dYdX stream their books over WebSockets. Aster, Binance, Bybit, OKX and Paradex answer REST requests, which Glassy repeats every one and a half to two seconds. The engine runs in a Web Worker, parses a few hundred messages a second and hands the page a snapshot two and a half times a second in the terminal, twice a second on the home page.
Venues quote in different dollars: USD on dYdX and Paradex, USDC on Hyperliquid, USDT on the centralized venues, USDG on Robinhood Chain. Glassy treats all of them as one dollar. When a stablecoin trades a few basis points off its peg, that gap shows up inside the deviation figures below. Glassy drops every level more than 5% from mid before computing anything.
Spread
With best bid and best ask , the mid is and the spread in basis points is
One basis point is a hundredth of a percent. On a BTC book with a tick of 0.1, the tightest spread a venue can show is about 0.01 bps, which is why the large centralized books read as 0.01 most of the time.
Microprice and imbalance
The mid ignores size. If the best bid holds ten times more than the best ask, the next trade is more likely to lift the offer. The microprice weights each side by the size on the other:
Imbalance looks five levels deep. With and the dollars on the first five bid and ask levels,
Depth bands
For a band of basis points, Glassy adds up the dollars resting between mid and bps away on each side:
Bands run at 10, 25, 50 and 100 bps. Some feeds stop before the band does. Binance sends a thousand levels at a 0.1 tick, which reaches about 15 bps on BTC. When the levels in memory end before the band edge, the terminal marks the figure with a plus sign: the true depth is at least that much.
Hyperliquid's socket sends twenty levels at full precision, a few dollars either side of mid on BTC. Glassy polls the same book aggregated to four and three significant figures and appends those coarser levels beyond the fine ones, which stretches coverage past 200 bps.
One view
The composite mid is the median of the mids of every perp book that updated in the last ten seconds and shows a spread under 100 bps. The median ignores a single stale or broken book, where a mean would follow it. Each venue then gets a deviation:
Spot books, such as the stock tokens on Robinhood Chain, stay out of because spot and perp prices differ by a basis that has nothing to do with book quality. They still get a deviation against it.
Stability and stress
Every snapshot adds the current spread to a sixty second window. Stability is the standard deviation of that window, and the terminal also shows its 95th percentile. A venue enters the window eight seconds after it goes live, so a reconnect does not count as volatility.
The stress figures keep the widest spread and the thinnest depth within 25 bps seen since you opened the page, with the time each one happened. Leave the terminal open through a sharp move and those two numbers tell you which books stayed.
Walking the book
For a buy of dollars, Glassy fills from the best ask upward, taking at each level, and divides dollars spent by coins bought to get the average price . The cost against the composite is
where is the venue's taker fee in bps. A sell mirrors it on the bid side. Using as the reference means a venue that trades below the others shows a lower cost for a buy, which matches what you would pay.
The fees come from each venue's published base tier, checked on 22 September 2026: Lighter reports its own fee in its API, Hyperliquid 4.5 bps, Aster 4 bps on USDT perps and 0.9 bps on stock perps, dYdX 5, Binance 5, OKX 5, Bybit 5.5, Paradex zero for retail. Your tier may pay less. The terminal lets you overwrite any of them, and a venue with an unknown fee shows its book cost without a total.
Flow
Lighter and Hyperliquid publish the aggressor side of every trade, so Glassy signs each trade by the side that crossed the spread instead of guessing from price moves. Trades fill dollar buckets of size ; a trade that overflows a bucket splits across the boundary. With and the bought and sold dollars in bucket ,
over the last buckets. A reading near zero means buyers and sellers met in balance. A reading near one means each bucket filled from one side, the pattern market makers widen against. Bucket size depends on the market: $50,000 on BTC and ETH, $25,000 on the index perps, $20,000 on gold and $10,000 on single stocks.
What Glassy cannot see
- Hidden liquidity, request-for-quote flow and anything a venue keeps off its public book.
- Latency between the venue and you. A REST book can be two seconds old when it lands.
- Your account's real fee tier, rebates and funding.
Every number comes from a public endpoint listed in the page's content security policy. Open your browser's network tab on the terminal and you can watch each request.