Skip to content
ChartDeck ChartScript docs Account Open the terminal

basis

Perpetual versus spot basis and the Coinbase premium. ChartDeck data.

#Variables

#basis.cb_premiumvariable

Coinbase premium in percent: (Coinbase USD close ÷ Binance USDT spot close − 1) × 100 for the chart’s coin (BTC when Coinbase does not list it; OKX spot when Binance does not answer; the Coinbase premium study). na on seconds charts.

basis.cb_premium: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const v = basis.cb_premium

Since ChartScript 1

#basis.pctvariable

Perpetual over spot, in percent: (perp close ÷ spot close − 1) × 100, against the same exchange’s spot market or Binance spot (the Perp/spot basis study). na on a spot market.

basis.pct: float

Type series float.

Example

ChartScriptFragmentOpen in editor
const v = basis.pct

Since ChartScript 1

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