Exchange Liquidity CheckCross-venue spot depth and volume quality
Loading

Work sample: live exchange liquidity and volume-quality check

Pulls public order books and 24h tickers from 10 spot venues, measures spread, depth and volume on one documented method, and flags venues whose reported volume their own book does not support.

Prototype built by Edward Tay for a job application. Independent; not CoinMarketCap's production code or methodology. Data comes live from each venue's public REST API, refreshed every 30 seconds. USDT pairs are treated at par with USD.

Venue table

Volume share vs depth share a venue far right of the line reports more volume than its book carries

Within bandTurnover over 2x medianTurnover over 4x median

Drafted market note generated from the table, edit before publishing

Method

Mid and spread
Mid = (best bid + best ask) / 2. Spread in basis points = (ask - bid) / mid x 10,000. For Bitget and HTX the best bid and ask come from the ticker, because their deep books are price-aggregated.
Depth at 0.1% and 1%
Sum of price x size for every bid within the band below mid and every ask within the band above it, in USD. Books come from each venue's deepest keyless snapshot endpoint and are trimmed to +/-5% of mid. Bitget and HTX are read from price-aggregated books, which keep total size but blur the 0.1% figure. The 1% band is used because most venues' public BTC snapshots stop well short of 2%; a licensed or websocket feed would restore the 2% band.
Truncated book
If a venue's snapshot does not reach 1% on either side, its 1% depth is a lower bound and the row carries a "book < 1%" flag. Depth figures for that venue are left out of the turnover median.
Turnover (volume / depth)
24h quote volume divided by 1% depth. A venue that turns its visible book over far more often than its peers is the first candidate for wash-trading review. Flags fire at 2x and 4x the cross-venue median.
Price deviation
Venue mid against the median mid of venues quoting the same currency (USDT or USD), in basis points, so the USDT/USD basis is reported on its own line and never read as dislocation. Above 10 bps on BTC or ETH is unusual for a liquid venue and is flagged.
What this cannot see
Snapshot depth can be spoofed and withdrawn; one snapshot is a sample. A production version would sample books every minute, use time-weighted depth, add trade-level checks (trade-size distribution, Benford tests, self-match patterns) and reconcile against onchain reserves.