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 current stock price? #23

Open
ablankenship10 opened this issue Apr 24, 2021 · 6 comments
Open

Get current stock price? #23

ablankenship10 opened this issue Apr 24, 2021 · 6 comments

Comments

@ablankenship10
Copy link

Checked through the code and did some tests but want to make sure im not totally missing something. Can I get the current price with any of the calls, or can Alpha Vantage return that at all? I only want to pull the current price like once an hour so it doesn't have to be down to the second or anything.

@ablankenship10
Copy link
Author

Looks like the Quote API works for that, was able to implement directly with Alpha Vantage, might try and submit a PR if I find some time to add it to this library

@christiantobin
Copy link

Hi, any progress on this? I would like to fetch the current stock price given the symbol. Perhaps you can point me in the right direction.

@christiantobin
Copy link

Disreguard. I went with Alpha Vantage directly as well.

@luni-moon
Copy link

Disreguard. I went with Alpha Vantage directly as well.

Could you help me with this? Currently, I am using this package set on a daily time-interval, like this:

setInterval(async () => {
  let gtlbResult = await stocks.timeSeries({
    symbol: 'GTLB',
    interval: 'daily',
    amount: 1
  });

  console.log('GTLB (GitLab):');
  console.log(gtlbResult);
  console.log("----------");
}, 1000 * 60 * 60 * 24);

Best regards,
Lukas Batema

@christiantobin
Copy link

@Lukas-Batema Have a look at this method: https://github.com/christiantobin/Tobins-Discord-Bot/blob/master/src/bot.js#L329
Here I am just using a get request to see the stock price

@luni-moon
Copy link

@Lukas-Batema Have a look at this method: https://github.com/christiantobin/Tobins-Discord-Bot/blob/master/src/bot.js#L329 Here I am just using a get request to see the stock price

Thanks, it helped!

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

3 participants