Skip to content

@livefolio/sdk / Bar

Type Alias: Bar

Bar = object

Defined in: interfaces/types.ts:115

A single OHLCV bar for one asset at one point in time.

Example

ts
import type { Bar } from '@livefolio/sdk';

// Typical daily bar for a $150 stock
const bar: Bar = {
  t:      new Date('2024-06-01'),
  open:   150.0,
  high:   153.4,
  low:    149.1,
  close:  152.7,
  volume: 8_500_000,
};

Properties

close

close: number

Defined in: interfaces/types.ts:121


high

high: number

Defined in: interfaces/types.ts:119


low

low: number

Defined in: interfaces/types.ts:120


open

open: number

Defined in: interfaces/types.ts:118


t

t: Date

Defined in: interfaces/types.ts:117

Bar timestamp (opening instant for intraday bars; midnight UTC for daily).


volume

volume: number

Defined in: interfaces/types.ts:123

Total shares traded during the bar period.

Released under the MIT License.