Skip to content

Bar


dataclass backtide.data.Bar

A single OHLCV candle for one symbol at one interval.

The adj_close field is always populated. For instruments where price adjustment is meaningless (crypto, forex) it's set equal to close.

Attributes

open_ts : int

Bar open time in UTC (Unix seconds).

close_ts : int
Bar close time in UTC (Unix seconds).

open_ts_exchange : int
Bar open time in the exchange's local timezone (Unix seconds).

open : float
Price at bar open.

high : float
Highest price seen in the interval.

low : float
Lowest price seen in the interval.

close : float
Price at bar close.

adj_close : float
Split- and dividend-adjusted close. Equal to close when adjustment is not applicable.

volume : float
Traded volume in the instruments's native units.

n_trades: int | None
Number of trades that occurred this bar.


See Also

Instrument

A tradeable financial instrument.

InstrumentType

The category an Instrument belongs to.

Interval

The time resolution of a single Bar.