lavolp3 / MMM-AVStock

MagicMirror module for displaying stock price with Alphavantage API
MIT License
38 stars 18 forks source link

Stocks not updating after latest update #28

Closed kevmang closed 3 years ago

kevmang commented 4 years ago

Hi There

Stocks don't seem to be working with the latest update (2.0). Config included below. Have there been any changes to any of the config attributes?

    {
        "module": "MMM-AVStock",
        "header": "US Stocks",
        "position": "top_right",
        "config": {
            "apiKey": "mykey",
            "timeFormat": "DD-MM-YYYY",
            "symbols": [
                "VOO",
                "QQQ",
                "AAPL",
                "MSFT",
                "AMZN",
                "GOOGL"
            ],
            "alias": [
                "S&P 500 ETF",
                "NDQ 100 ETF",
                "Apple Inc",
                "Microsoft Corp",
                "Amazon.com Inc",
                "Alphabet Inc"
            ],
            "tickerDuration": 900,
            "chartDays": null,
            "mode": "table",
            "decimals": 4
        }
    },
lavolp3 commented 3 years ago

Have you done

npm install

after the update? That's necessary. Also restart your mirror via pm2 or however it is running.

kevmang commented 3 years ago

Thanks for your reply, yes I've tried this but the tickers are appearing as "--".

I've made a Google Sheets workaround (with the Google Sheets Module) for the time being and will try again next update.

lavolp3 commented 3 years ago

Your config entry has quotes around every key as if it was json format. That's not intended. Not sure if that's the problem however. Please try the sample config from the readme and start from that. Also note that it may take a few minutes for the first values to appear.

koles0ff commented 3 years ago

Hello,

Having same issue for ~3 month already. Please advise, how can I check module logs? Module updated, api key checked. Havo no idea what to check more. Config is very simple:

module: "MMM-AVStock", position: "bottom_center", config: { apiKey : "mykey", symbols : ["EURRUB=x","RUB=x"], alias: ["EURO","USD"], timeFormat: "YYYY-MM-DD HH:mm:ss", }

lavolp3 commented 3 years ago

@koles0ff

symbols : ["EURRUB=x","RUB=x"]

These symbols cannot be interpreted. Try symbols : ["EURRUB","USDRUB"]

You can check module logs by including debug: true

koles0ff commented 3 years ago

This was quite lame from my end... Thanks! I wonder how this worked with this config :D It is working now.

lavolp3 commented 3 years ago

Great! Your module worked before but the API returned an empty list (not an error) and therefore nothing was sent to the front-end

lavolp3 commented 3 years ago

Thanks for your reply, yes I've tried this but the tickers are appearing as "--".

I've made a Google Sheets workaround (with the Google Sheets Module) for the time being and will try again next

@kevmang Has your issue been solved by the updates?

kevmang commented 3 years ago

@lavolp3 figured out the issue after going back to your default config and adding everything one by one... it was the chartDays: null, command! Love the new grid mode by the way, thanks for all your efforts bringing this to the community.

lavolp3 commented 3 years ago

@kevmang good catch. Dont find this anywhere in the readme or main js. It's always chartDays: 90. If there is something that you think should be changed let me know.