Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Get end day price for a particular date #24

Open
munroe7 opened this issue Sep 24, 2019 · 2 comments
Open

Get end day price for a particular date #24

munroe7 opened this issue Sep 24, 2019 · 2 comments

Comments

@munroe7
Copy link

munroe7 commented Sep 24, 2019

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'?

@schardtbc
Copy link
Owner

try the following; it should work, any valid market date should work.

let threeMonthsAgo = await iex.history('SPY', { date: '20190624', chartByDay: true});

@schardtbc
Copy link
Owner

let threeMonthsAgo = await iex.history('SPY', { date: '2019-06-24', chartByDay: true});

should work also.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants