get_asset_current_candle
Returns the most recent candle as a pandas DataFrame.
This function is not compatible with options.
Syntax
Fields
Description
symbol(str)
Symbol of stock or crypto asset. Defaults to first symbol in watchlist
interval(str)
Interval of data. Defaults to the interval of the algorithm
def get_asset_current_candle(self, symbol: str, interval=None) -> pd.DataFrame:
Returns
Returns the most recent candle as a DataFrame with the following columns:
open
high
low
close
volume
datetime
float
float
float
float
int
The index is a datetime object.
Raises
- An
Exception
is raised if the symbol is not in the watchlist.