Get end day price for a particular date
My Goal: I am trying to display if a stock is up or down on the 6m, 3m, 1m, and 1w chart. This way I can show a green or red circle in my app to signify the trend.
Is there an easy way to check this without pulling 6m data because that eats up your limit pretty quickly. I tried doing the following:
let threeMonthsAgo = await iex.history('SPY', {period: '3m', date: '20190624'});
but this didn't work. It's also more confusing that some of the history params aren't named the same in this wrapper. Shouldn't 'period' be 'range'?
try the following; it should work, any valid market date should work.
let threeMonthsAgo = await iex.history('SPY', { date: '20190624', chartByDay: true});
let threeMonthsAgo = await iex.history('SPY', { date: '2019-06-24', chartByDay: true});
should work also.