• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
MagicMirror Forum
  • Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
A New Chapter for MagicMirror: The Community Takes the Lead
Read the statement by Michael Teeuw here.

[MMM-JaST] Just another Stock Ticker (new: version 2.x)

Scheduled Pinned Locked Moved Utilities
166 Posts 37 Posters 139.8k Views 39 Watching
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • J Offline
    Jalibu Module Developer
    last edited by Jalibu Nov 12, 2023, 12:24 PM Apr 6, 2020, 3:21 PM

    Hi community,
    please feel free to check out my stock ticker ;-)

    Main Features

    • Uses Yahoo Finance API to collect current
      • stock values
      • indexes
      • cryptocurrencies
    • No API Key required
    • Multiple display modes
      • Static
      • Vertical scroll
      • Horizontal scroll
      • Table
    • Share Portfolio value and growth summary
    • Very customizable
    • Easy to use

    Download and instructions on Github.

    Feedback welcome.

    Display Modes

    Vertical

    Horizontal

    Horizontal

    Vertical

    Table

    Vertical

    Static

    Vertical

    Support

    I put a lot of time and effort into the creation and maintenance for this module and I’m glad so many people like it.
    If you also like this module and want to thank, please rate this repository with a star or donate a small amount that is worth it to you.

    M D 2 Replies Last reply Apr 6, 2020, 10:49 PM Reply Quote 4
    • M Offline
      Mykle1 Project Sponsor Module Developer @Jalibu
      last edited by Apr 6, 2020, 10:49 PM

      @Jalibu

      Cool. :thumbsup:

      Create a working config
      How to add modules

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jalibu Module Developer
        last edited by Jalibu Apr 26, 2020, 3:52 PM Apr 26, 2020, 3:51 PM

        I pushed a newer version with a few improvements:

        • New feature: Daily sum (depot growth)
        • Improvement: Better handling of API calls when there are more than 5 stocks in the ticker (the free API limit is 5 request per minute)
        • Improvement: Nicer rendering of stocks with (yet) unknown value

        I renamed some config properties. As this is a breaking change to the older version, please read the Readme file.

        P 1 Reply Last reply Apr 28, 2020, 5:01 PM Reply Quote 0
        • P Offline
          Perlchamp
          last edited by Apr 26, 2020, 6:17 PM

          something like this for goldprice i could need, whitch display a chart of the last 30 days …

          1 Reply Last reply Reply Quote 0
          • P Offline
            popeye2002 @Jalibu
            last edited by Apr 28, 2020, 5:01 PM

            @Jalibu I would really like to see this working in my mirror! so far I have had no luck getting data from Alpha avantage. Is there a way to test and see what data is returned? or maybe what error code comes back? The ticker itself is running well with 15 stocks in it but no values are showing. I went back and used your sample config code and still no values returned. Your thoughts?
            Here is what i used for my code:

            		{
            	module: "MMM-Jast",
            	position: "bottom_bar",
            	config: {
            		updateIntervalInSeconds: 1800,
            		fadeSpeedInSeconds: 3.5,	
            			stocks: [
            			{ name: "Amazon", symbol: "AMZN" },
            			{ name: "Disney", symbol: "DIS" },
            			{ name: "Ford", symbol: "F" },
            			{ name: "Starbucks", symbol: "SBUX" },
            			{ name: "JD.com", symbol: "JD" },
            			{ name: "Microsoft", symbol: "MSFT" },
            			{ name: "Verizon", symbol: "VZ" },
            			{ name: "Phizer", symbol: "PFE" },
            			{ name: "Intuit", symbol: "INTU" },
            			{ name: "Zinga", symbol: "ZNGA" },
            			{ name: "Cognex", symbol: "CGNX" },
            			{ name: "Fortnet", symbol: "FTNT" },
            			{ name: "Ilumina", symbol: "ILMN" },
            			{ name: "KinderMorgen", symbol: "KMI" },
            			{ name: "NewBev", symbol: "NBEV" },
            			{ name: "Neptune", symbol: "NEPT" },
            			{ name: "Alibaba", symbol: "BABA", tradeCurrency: "USD", displayCurrency: "USD" },
            		],
            				defaultCurrency: "USD",
            				apiKey: "My_API_KEY_HERE",
            				scroll: "horizontal", //"<none, vertical, horizontal>"
            				maxWidth: "100%",
            				showDepotGrowth: true
            	}
            },
            
            
            S 1 Reply Last reply Apr 28, 2020, 5:13 PM Reply Quote 0
            • S Away
              sdetweil @popeye2002
              last edited by Apr 28, 2020, 5:13 PM

              @popeye2002 open the developers window, (f12 or ctrl-shift-i), select the tab labeled console,
              enter jast in the filter field and look for any errors (usually red text)

              AlphaVantage is very protective of their api, and will reject calls too soon from last one

              Sam

              How to add modules

              learning how to use browser developers window for css changes

              P 1 Reply Last reply Apr 28, 2020, 5:18 PM Reply Quote 0
              • P Offline
                popeye2002 @sdetweil
                last edited by Apr 28, 2020, 5:18 PM

                @sdetweil Thank you sam… I’m learning all the time. well nothing was red with a search for jast.
                But, I learned a little more about how to troubleshoot!

                Load script: modules/MMM-Jast//MMM-Jast.js
                module.js:479 Module registered: MMM-Jast
                loader.js:150 Bootstrapping module: MMM-Jast
                loader.js:155 Scripts loaded for: MMM-Jast
                loader.js:194 Load stylesheet: modules/MMM-Jast/MMM-Jast.css
                loader.js:157 Styles loaded for: MMM-Jast
                translator.js:175 MMM-Jast - Load translation fallback: translations/en.json
                loader.js:159 Translations loaded for: MMM-Jast
                
                
                
                S 1 Reply Last reply Apr 28, 2020, 5:26 PM Reply Quote 0
                • S Away
                  sdetweil @popeye2002
                  last edited by Apr 28, 2020, 5:26 PM

                  @popeye2002 ok, how did u start MM??? pm2 or npm start

                  if pm2
                  then do

                  pm2  logs --lines=100
                  

                  the module says it puts out messages
                  console.log(“Sending Stock result:”, { symbol, current, last });

                  my guess is based on the node_helper design, that AlphaVantage has rejected the requests as too frequent…
                  (as it does one request per stock)
                  you should see the errors in the pm2 log (or terminal window if npm start)

                      config.stocks.forEach((stock) => {
                        if (!stock.lastUpdate || Date.now() - stock.lastUpdate >= config.updateIntervalInSeconds * 1000) {
                          const url = `${config.baseURL}query?function=TIME_SERIES_DAILY&outputsize=compact&apikey=${config.apiKey}&symbol=${stock.symbol}`;
                          request(url, { json: true }, (err, res, body) => {
                  

                  it should do ALL stocks in one request

                  AlphaVantage also only does NYSE, nasdaq requires a separate api from a different provider

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  P 2 Replies Last reply Apr 28, 2020, 5:36 PM Reply Quote 0
                  • P Offline
                    popeye2002 @sdetweil
                    last edited by Apr 28, 2020, 5:36 PM

                    @sdetweil Gosh, I’m not having much luck. I’m in well over my head but the desire to succede keeps me going. I don’t know how i start my mirror… kinda dumb but it auto starts. I mean dumb that i don’t know pm2 or not.
                    I made an error when i installed the module and ran the npm install from the incorrect directory… do you think that would have caused errors? I immeadiately went and ran npm install from the correct directory but perhaps some damage was already done?
                    pi@raspberrypi:~/MagicMirror/modules $ npm install

                    pi@raspberrypi:~/MagicMirror/modules $ npm install
                    
                    > magicmirror@2.11.0 install /home/pi/MagicMirror
                    > echo "Installing vendor files ...
                    " && cd vendor && npm install --loglevel=error
                    
                    Installing vendor files ...
                    
                    audited 220 packages in 4.134s
                    found 8 vulnerabilities (7 low, 1 high)
                      run `npm audit fix` to fix them, or `npm audit` for details
                    
                    > magicmirror@2.11.0 postinstall /home/pi/MagicMirror
                    > npm run install-fonts && echo "MagicMirror installation finished successfully! 
                    "
                    
                    
                    > magicmirror@2.11.0 install-fonts /home/pi/MagicMirror
                    > echo "Installing fonts ...
                    " && cd fonts && npm install --loglevel=error
                    
                    Installing fonts ...
                    
                    audited 1 package in 2.072s
                    found 0 vulnerabilities
                    
                    MagicMirror installation finished successfully! 
                    
                    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
                    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
                    
                    audited 3224 packages in 25.621s
                    
                    73 packages are looking for funding
                      run `npm fund` for details
                    
                    found 2 low severity vulnerabilities
                      run `npm audit fix` to fix them, or `npm audit` for details
                    pi@raspberrypi:~/MagicMirror/modules $ cd MMM-JaST
                    bash: cd: MMM-JaST: No such file or directory
                    pi@raspberrypi:~/MagicMirror/modules $ cd MMM-Jast
                    pi@raspberrypi:~/MagicMirror/modules/MMM-Jast $ npm install
                    
                    > magicmirror@2.11.0 install /home/pi/MagicMirror
                    > echo "Installing vendor files ...
                    " && cd vendor && npm install --loglevel=error
                    
                    Installing vendor files ...
                    
                    audited 220 packages in 4.073s
                    found 8 vulnerabilities (7 low, 1 high)
                      run `npm audit fix` to fix them, or `npm audit` for details
                    
                    > magicmirror@2.11.0 postinstall /home/pi/MagicMirror
                    > npm run install-fonts && echo "MagicMirror installation finished successfully! 
                    "
                    
                    
                    > magicmirror@2.11.0 install-fonts /home/pi/MagicMirror
                    > echo "Installing fonts ...
                    " && cd fonts && npm install --loglevel=error
                    
                    Installing fonts ...
                    
                    audited 1 package in 1.865s
                    found 0 vulnerabilities
                    
                    MagicMirror installation finished successfully! 
                    
                    npm WARN optional SKIPPING OPTIONAL DEPENDENCY: fsevents@2.1.3 (node_modules/fsevents):
                    npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for fsevents@2.1.3: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"arm"})
                    
                    audited 3224 packages in 25.347s
                    
                    73 packages are looking for funding
                      run `npm fund` for details
                    
                    found 2 low severity vulnerabilities
                      run `npm audit fix` to fix them, or `npm audit` for details
                    pi@raspberrypi:~/MagicMirror/modules/MMM-Jast $ 
                    
                    
                    P S 2 Replies Last reply Apr 28, 2020, 5:38 PM Reply Quote 0
                    • P Offline
                      popeye2002 @popeye2002
                      last edited by Apr 28, 2020, 5:38 PM

                      @popeye2002 Is there a working stock ticker module out there?

                      1 Reply Last reply Reply Quote 0
                      • 1
                      • 2
                      • 3
                      • 4
                      • 5
                      • 16
                      • 17
                      • 1 / 17
                      • First post
                        Last post
                      Enjoying MagicMirror? Please consider a donation!
                      MagicMirror created by Michael Teeuw.
                      Forum managed by Sam, technical setup by Karsten.
                      This forum is using NodeBB as its core | Contributors
                      Contact | Privacy Policy