Stock Quotes and Data

I would love to see a plugin that pulls in current stock information for the US markets.

I keep detailed logs of ideas and trades and it would be super helpful to pull in current prices and data as I am typing up a note.

For example, I might type AMZN and the plugin would give me:
Price: $93.50 (-2.32 / -2.42%) * Volume: 57,053,812 * Market Cap: $958.123B * 52W Range: 81.43 - 170.83

Real-time quotes aren’t necessary - there are better tools for that. But, it would be nice to quickly bring in data to my note without having to reference a finance site.

1 Like

I am not yet able to create plugins, but I have a way to use Templater to call a simple Javascript to fetch info via the alphavantage.co API. You will need to get your own free API key and add it to the script and configure Templater to call it, but it works for me.

Example:

<% tp.user.stock(“AMZN”) %>

turns into

AMZN: $93.50 (-2.32, -2.42%)

let me know if you are OK with this many steps - otherwise maybe someone can make a plugin.

Here is the data that is available:

{
    "Global Quote": {
        "01. symbol": "AAPL",
        "02. open": "147.1100",
        "03. high": "147.1900",
        "04. low": "145.7202",
        "05. price": "146.7100",
        "06. volume": "55469606",
        "07. latest trading day": "2023-02-24",
        "08. previous close": "149.4000",
        "09. change": "-2.6900",
        "10. change percent": "-1.8005%"
    }
}
3 Likes

I’m not an engineer by any means, but started playing with a library that uses the Yahoo Finance API. Main pain point is that it can sometimes take 7 or 8 seconds to get an API response, other times it’s less than a second.

StockInfo

1 Like

Just adding a looping gif…

StockInfoPlugin

3 Likes

This would be a great start! Can you share the steps and the javascript?

That also looks like what I had in mind. Would love to check it out when you a ready!

I’ve submitted it for review to be included in the Community plugins - will have to see if it gets approved or not.

The repo is here though if you want to pull the code and run it locally - GitHub - mikejongbloet/obsidian-get-stock-information

3 Likes

Hello,
is it possible to write the values into variables like:
stock_aapl_bid:: some crazy code that gets current aapl bid price
best regards
Mark

Did this become a proper community plug-in?

Oh, I’m such a doofus! Is avaialble via the in-program plugin search, and, most importantly:

Works like a charm!