Opus Motion ★ Star on GitHub

Data · order-book-depth

Order-book depth chart

Stepped cumulative bid (left) and ask (right) depth curves grow out from a dashed mid line, then breathe as levels refill; a ticking mid price, spread readout and trade pings sit on a dark trading-desk panel.

A free, MIT-licensed animated chart from the Opus Motion Library — 616 motions for Remotion, React and plain HTML.

Order-book depth chart: three frames of the animated chart, start, middle and end
Order-book depth chart — start, middle and end of the 6.0-second motion.

What Order-book depth chart is for

Finance and trading explainers: liquidity, spread, supply vs demand, market depth, fintech product heroes (sample data only).

Details

Category
Animated charts & data visualisation
Length
6.0 s (180 frames at 30 fps)
Formats
16:9, 1:1, 9:16
Weight
light
Transparent overlay
no
Seamless loop
no
Text props
title subtitle
Colour props
bidColor askColor background ink gridColor
Mood
hud, night
Roles
subject

Use Order-book depth chart in Remotion, React or HTML

Remotion project

terminal
# copy this motion into your Remotion project
node cli/mgl.mjs add order-book-depth --to ../my-app/src

# render an mp4 (run in the library folder)
node cli/mgl.mjs render order-book-depth --props '{"title":"Market depth","subtitle":"SAMPLE ORDER BOOK","bidColor":"#2FD39A","askColor":"#FF5C6C","background":"#0E1320","ink":"#E9EEF7","gridColor":"#222B3D"}'

# or export for apps / editors: mp4 | webm-alpha | prores-alpha | gif | png | poster
node cli/mgl.mjs export order-book-depth --as mp4 --props '{"title":"Market depth","subtitle":"SAMPLE ORDER BOOK","bidColor":"#2FD39A","askColor":"#FF5C6C","background":"#0E1320","ink":"#E9EEF7","gridColor":"#222B3D"}'

React / Next.js

tsx
import {MotionPlayer} from 'opus-motion-library/web';

<MotionPlayer
  motion="order-book-depth"
  props={{
    title: 'Market depth',
    subtitle: 'SAMPLE ORDER BOOK',
    bidColor: '#2FD39A',
    askColor: '#FF5C6C',
    background: '#0E1320',
    ink: '#E9EEF7',
    gridColor: '#222B3D',
  }}
  playOnView
  loop="auto"
/>

Plain HTML / WordPress

html
<script src="opus-motion.element.js" defer></script>

<opus-motion motion="order-book-depth"
  props='{"title":"Market depth","subtitle":"SAMPLE ORDER BOOK","bidColor":"#2FD39A","askColor":"#FF5C6C","background":"#0E1320","ink":"#E9EEF7","gridColor":"#222B3D"}'>
</opus-motion>

Compose spec (multi-scene video)

json
{
  "width": 1920,
  "height": 1080,
  "fps": 30,
  "scenes": [
    {
      "motion": "order-book-depth",
      "props": {
        "title": "Market depth",
        "subtitle": "SAMPLE ORDER BOOK",
        "bidColor": "#2FD39A",
        "askColor": "#FF5C6C",
        "background": "#0E1320",
        "ink": "#E9EEF7",
        "gridColor": "#222B3D"
      }
    }
  ]
}

Order-book depth chart props

14 parameters — change any of them to make the motion yours.

PropDefaultWhat it does
title"Market depth"headline above the chart
subtitle"SAMPLE ORDER BOOK"small caps label above the headline (keep it saying sample data unless you pass real numbers)
pair"ABC / XYZ"instrument label shown next to the spread (fictional by default)
midPrice100centre price the book drifts around
tick0.05price step between levels
levels24number of price levels per side (6+)
decimals2decimals in price readouts
bidColor"#2FD39A"buy side colour
askColor"#FF5C6C"sell side colour
background"#0E1320"panel background
ink"#E9EEF7"text and mid-line colour
gridColor"#222B3D"horizontal grid line colour
seed7changes the sample book shape
liveliness10 = frozen book, 1 = normal churn, 2 = frantic

Notes & credits

Technique sources:

  • original