Skip to content
ChartDeck ChartScript docs Account Open the terminal

book

Order-book data recorded by ChartDeck: book.heat, book.depth, book.bucket, book.since.

#Functions

#book.bucketfunction

The price bucket size of the recorded order book (the height of a book.heat cell), na without data.

book.bucket(): float

Returns float.

Example

ChartScriptFragmentOpen in editor
const g = book.bucket()

Since ChartScript 1

#book.depthfunction

This bar's recorded order-book buckets as book.level values, bids from the best price down, then asks from the best price up.

book.depth({ side?: simple string = "both" }): array<book.level>
ParameterTypeDescription
sidesimple stringdefault "both""both", "bid" or "ask".

Returns array<book.level>.

Example

ChartScriptFragmentOpen in editor
const levels = book.depth("ask")

Since ChartScript 1

#book.heatfunction

This bar's recorded order book as a heatmap.column: the largest size seen in each price bucket during the bar (base coin). na where nothing was recorded. History is what ChartDeck's recorder kept for the plan (Pro 7 days, Elite 180 days).

book.heat({ side?: simple string = "both" }): heatmap.column
ParameterTypeDescription
sidesimple stringdefault "both""both", "bid" or "ask".

Returns heatmap.column.

Example

ChartScriptFragmentOpen in editor
const bids = heatmap.new({ palette: heatmap.palette_bid })
const col = book.heat("bid")
if (!na(col)) {
    bids.add(col)
}

Since ChartScript 1

#book.sincefunction

The time (ms) of the oldest recorded order-book column ChartDeck gave this script, na without data.

book.since(): int

Returns int.

Example

ChartScriptFragmentOpen in editor
const from = book.since()

Since ChartScript 1

#Not available yet

#book.imbalancefunction

Not available yet.

book.imbalance (later version).

Since ChartScript 1

#book.wallfunction

Not available yet.

book.wall (later version).

Since ChartScript 1

The ChartScript documentation is in English for now; translations will follow.