jalibu / MMM-Jast

A minimalistic stock ticker based on Yahoo's finance API for the MagicMirror² platform.
MIT License
67 stars 22 forks source link

Can't get EURRON=X to display on my mm #28

Closed ikze closed 2 years ago

ikze commented 2 years ago

Platform

Raspberry PI OS

Node.js Version

v14.18.1

MagicMirror Version

latest

Module Version

v2.17.1

Description

I can't get to display EURRON=X for some reason, but I can get EURUSD=X. Is this some sort of bug?

Expected behavior

No response

Current behavior

No response

Possible solution

No response

Steps to reproduce

everything loads properly, except the EURRON=X call

Log

No response

config.js


            {
    module: "MMM-Jast",
    position: "bottom_left",
    config: {
        maxWidth: "100%",
        updateIntervalInSeconds: 300,
        fadeSpeedInSeconds: 3.5,
        scroll: "none", // One of ["none", "vertical", "horizontal"]
        useGrouping: false,
        currencyStyle: "symbol", // One of ["code", "symbol", "name"]
        lastUpdateFormat: "HH:mm",
        showColors: true,
        showCurrency: true,
        showChangePercent: true,
        showChangeValue: false,
        showChangeValueCurrency: false,
        showLastUpdate: true,
        showPortfolioValue: false,
        showPortfolioGrowthPercent: false,
        showPortfolioGrowth: false,
        numberDecimalsValues: 2,
        numberDecimalsPercentages: 1,
        virtualHorizontalMultiplier: 2,
        stocks: [
            { name: "GME", symbol: "GME"},
            { name: "BTC", symbol: "BTC-USD"},
            { name: "EUR", symbol: "EURRON=X"},
            { name: "ETN", symbol: "ETN-USD"}
        ]
    }

Additional info

No response

ikze commented 2 years ago

[28.10.2021 12:51.47.956] [WARN] Skipped symbol 'EURRON=X' as it's response did not have required property 'currency'. This is usually the case when a symbol is misspelled [28.10.2021 12:51.48.569] [INFO] Newsfeed-Fetcher: Broadcasting 70 items.

https://finance.yahoo.com/quote/EURRON=X?p=EURRON=X&.tsrc=fin-srch

It's not misspelled

jalibu commented 2 years ago

Hi @ikze , thank you for opening this issue. This is more a feature request as a bug. Today, Jast supports stocks, indexes and cryptos. Exchange rates are a bit different because they are supplied by the API with a different data model. We can leave this issue open for now. Maybe someone can be found who would like to contribute a PR on it. I myself unfortunately have very little time at the moment.

ikze commented 2 years ago

Hi Jalibu,

Thanks for the quick reply. I think it should be easily implemented as other exchange rates work ( EURO/USD - USD/RON - RON/USD). I'd do it myself but I have no clue where to look.

ikze commented 2 years ago

I'm also getting this error

[28.10.2021 15:34.10.690] [WARN] Skipped symbol 'EURRON=X' as it's response did not have required property 'currency'. This is usually the case when a symbol is misspelled

I removed the currency a long time ago from the config file, but it keeps triggering this warning

jalibu commented 2 years ago

I don't understand your last comment. What did you remove from the config?

ikze commented 2 years ago

I replaced the line { name: "EUR", symbol: "EURRON=X"} with { name: "FB", symbol: "FB"}, but I finally got it to work after reinstalling npm. Until that happened I kept getting the above error.

jalibu commented 2 years ago

The problem with 'EURRON=X' is, that the API does not return a currency field for that. I don't know why. It does that for other exchange symbols...

ikze commented 2 years ago

I understand, but when I removed it from the config file, it was still reported by NPM

jalibu commented 2 years ago

by npm?

jalibu commented 2 years ago

it‘s a problem with the yahoo finance npm module.