I am running the following code
import alpaca_trade_api as tradeapi
import matplotlib.pyplot as plt
api = tradeapi.REST(<with my credeentials) # or use ENV Vars shown below
Get daily price data for AAPL over the last 5 trading days.
barset = api.get_barset(‘AAPL’, ‘day’, limit=1)
aapl_bars = barset[‘AAPL’]
See how much AAPL moved in that timeframe.
week_open = aapl_bars[0].o
week_close = aapl_bars[-1].c
percent_change = (week_close - week_open) / week_open * 100
print(“barset”)
I get back an output of
{‘AAPL’: [Bar({ ‘c’: 321.36,
‘h’: 323.44,
‘l’: 315.63,
‘o’: 316.77,
‘t’: 1590638400,
‘v’: 23595650})]}
What do the letters h, l, o, t, v mean?