query_bars
function backtide.storage.query_bars(symbol=None, interval=None, provider=None, limit=None)
Return stored OHLCV bars as a dataframe.
Each row represents a single bar. The dataframe columns are:
symbol, interval, provider, open_ts, close_ts,
open_ts_exchange, open, high, low, close, adj_close,
volume, and n_trades.
| Returns |
pd.DataFrame | pl.DataFrame
Matching bars from the database.
|
See Also
Download OHLCV data for the instruments described in a list of profiles.
Return a pre-aggregated summary of stored bars as a dataframe.
Return stored dividend events as a dataframe.
Example
>>> from backtide.storage import query_bars
>>> df = query_bars()
>>> print(df.head())
symbol interval provider ... adj_close volume n_trades
0 AAPL 1d yahoo ... 0.098207 469033600.0 None
1 AAPL 1d yahoo ... 0.093083 175884800.0 None
2 AAPL 1d yahoo ... 0.086251 105728000.0 None
3 AAPL 1d yahoo ... 0.088386 86441600.0 None
4 AAPL 1d yahoo ... 0.090949 73449600.0 None
[5 rows x 13 columns]