Depth Chart

Cumulative bid and ask liquidity either side of the mid, with a crosshair that reports the size resting up to any price.

Cumulative book

@spectrumui/depth-chart
SOLSolana · USDC

$245.85

Spread
$0.30 (0.122%)
Bid depth
9.5K
Ask depth
11.5K
SOL order book depth — cumulative size by price
PriceSideSizeCumulative
$246.00Ask235235
$246.15Ask406641
$246.30Ask254895
$246.45Ask2301125
$246.60Ask11482273
$246.75Ask12923565
$246.90Ask6114176
$247.05Ask9455121
$247.20Ask5185639
$247.35Ask5706209
$247.50Ask9417150
$247.65Ask5297679
$247.80Ask9298608
$247.95Ask9049512
$248.10Ask108410596
$248.25Ask88311479
$245.70Bid150150
$245.55Bid307457
$245.40Bid435892
$245.25Bid1841076
$245.10Bid3681444
$244.95Bid5952039
$244.80Bid2962335
$244.65Bid3972732
$244.50Bid6643396
$244.35Bid17725168
$244.20Bid6885856
$244.05Bid4196275
$243.90Bid8677142
$243.75Bid8457987
$243.60Bid9658952
$243.45Bid5859537

BTC · wider tick

BTCBitcoin · USDT

$96,480.00

Spread
$24.00 (0.025%)
Bid depth
348
Ask depth
316
BTC order book depth — cumulative size by price
PriceSideSizeCumulative
$96.49KAsk44
$96.5KAsk610
$96.52KAsk818
$96.53KAsk927
$96.54KAsk1138
$96.55KAsk3876
$96.56KAsk2096
$96.58KAsk48144
$96.59KAsk18162
$96.6KAsk17179
$96.61KAsk24203
$96.62KAsk23226
$96.64KAsk13239
$96.65KAsk17256
$96.66KAsk38294
$96.67KAsk22316
$96.47KBid55
$96.46KBid1823
$96.44KBid932
$96.43KBid1547
$96.42KBid1461
$96.41KBid1677
$96.4KBid2097
$96.38KBid15112
$96.37KBid25137
$96.36KBid65202
$96.35KBid19221
$96.34KBid26247
$96.32KBid29276
$96.31KBid26302
$96.3KBid18320
$96.29KBid28348

Manual installation

Prefer to copy by hand? Open the Code tab on any example above and switch to the file you need — every source file is there, not just the demo. Drop them in your project like this:

  • chart-engine.tsxcomponents/spectrumui/charts/chart-engine.tsx
  • depth-chart.tsxcomponents/spectrumui/charts/depth-chart.tsx

There is nothing to install — this chart draws its own SVG and imports only @/lib/utils.

Usage

import { DepthChart } from '@/components/spectrumui/charts/depth-chart';

<DepthChart book={book} symbol="SOL" />
  • generateOrderBook() from the engine builds a specimen book; swap it for your feed.
  • Levels are cumulative from the mid outward — pass total already summed.

Props

PropTypeDefaultDescription
bookOrderBookSOL_BOOKMid, spread, and cumulative bid/ask levels.
symbolstring'SOL'Ticker shown in the header.
namestring'Solana · USDC'Pair label beside the ticker.
heightnumber-Plot height in pixels. The header sits above it, so the card is taller than this.
status'ready' | 'loading' | 'empty' | 'error''ready'Which state to render. All four reserve the same frame height, so nothing shifts when data lands.
onRetry() => void-Called by the retry button in the error state. Omit it and no button is shown.
classNamestring-Merged onto the root element.