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

Setting up stock data #69

Open
CasaOSuser01 opened this issue Jan 1, 2025 · 15 comments
Open

Setting up stock data #69

CasaOSuser01 opened this issue Jan 1, 2025 · 15 comments

Comments

@CasaOSuser01
Copy link

CasaOSuser01 commented Jan 1, 2025

Hi

I have it up and running for cryptocurrency after putting in the api key, however id also like it to display stocks too but every stock ticker i input like NVDA it cant find.

Im pretty new to this so unsure if i am missing something very obvious. even the default one SPY isnt found.

logs:
Failed to get ticker 'NVDA' reason: HTTPSConnectionPool(host='fc.yahoo.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x6ece00d0>: Failed to establish a new connection: [Errno 111] Connection refused'))
$NVDA: possibly delisted; no price data found (period=5d)

Thanks in advance

@loiccoyle
Copy link
Owner

Can you ssh onto to the rpi with the tinyticker user, and run:
python -c 'import yfinance as yf; print(yf.Ticker("NVDA").history("5d"))'

@CasaOSuser01
Copy link
Author

Hi @loiccoyle
Thanks for getting back

I am trying to ssh into the pi, i can get into the standard user but not the tinyticker one, is the password different to the default? (i used the image for set up so didnt do any of the manual stuff)

@loiccoyle
Copy link
Owner

yeah check the bottom of this page:

https://loiccoyle.com/tinyticker/

there are two users, the pi user is left unchanged to that you can do whatever you want, and all the tinyticker stuff is contained in the tinyticker user.

@CasaOSuser01
Copy link
Author

CasaOSuser01 commented Jan 1, 2025

Totally missed the webpage! thanks

Ran the script and i get the error-
Failed to get ticker 'NVDA' reason: HTTPSConnectionPool(host='fc.yahoo.com', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x70618110>: Failed to establish a new connection: [Errno 111] Connection refused'))
$NVDA: possibly delisted; no price data found (period=5d)
Empty DataFrame
Columns: [Open, High, Low, Close, Adj Close, Volume]
Index: []

Seems to be largely the same as the log from the web ui

its not what i do but it seems it cant pull stock info from yahoo anymore, maybe an api or cert issue?

@loiccoyle
Copy link
Owner

hm so it isn't really tinyticker related, it seems that you're having issues connecting with the api yfinance uses to fetch the data. Do you have a vpn or something which could be connection issues?

@CasaOSuser01
Copy link
Author

Not a network wide VPN, i do have a unbound pihole working on my network could this be blocking the connection?

@loiccoyle
Copy link
Owner

no idea, I would just try turning off and seeing if it changes anything.

@CasaOSuser01
Copy link
Author

i just tried by tethering it to my phones hotspot on data (avoiding our router/network) the error logs in the web ui are the same

@loiccoyle
Copy link
Owner

Hmm, I did a quick search trough the yfinance issues and found a few that mention this issue, in most cases it seems to be pi hole related.

@CasaOSuser01
Copy link
Author

CasaOSuser01 commented Jan 1, 2025

hmmm, ill flash a fresh image tomorrow but if that was the case i wonder why it didnt kick in when i switched to a mobile tether

it also seems to be a different error, the one above is connection refused not unreachable

@mattrcarroll
Copy link

Hi @loiccoyle. Both of my TinyTicker's stopped updating stock data in the past few days. Here is the log file from one of them. Any thoughts on what might be causing this or what I am doing wrong? Both of them had been working fine for months and then both stopped updating in the past few days. I had/have not made an configuration changes. Maybe a change with the yfinance API? Thanks, Matt

04:49:58 - tinyticker - INFO: Tinyticker version: 1.1.4
04:49:58 - tinyticker - INFO: PID file: /tmp/tinyticker/tinyticker_pid
04:49:58 - tinyticker - INFO: PID: 692
04:49:58 - tinyticker - DEBUG: Args: Namespace(config=PosixPath('/home/tinyticker/.config/tinyticker/config.json'), verbose=2)
04:49:58 - tinyticker - INFO: Starting ticker task.
04:49:58 - tinyticker.display - INFO: Init ePaper display.
04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy
04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release
04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy
04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release
04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy
04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release
04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy
04:50:01 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release
04:50:02 - tinyticker - DEBUG: Sequence(skip_outdated=False, skip_empty=True):
Ticker stock SPY 10x1d 300s
04:50:02 - tinyticker.tickers.stock - INFO: Stock tick: SPY
$SPY: possibly delisted; no price data found (1d 2025-05-26 04:50:02.511846+00:00 -> 2025-01-03 04:50:02.511846+00:00) (Yahoo error = "Invalid input - start date cannot be after end date. startDate = 1748235002, endDate = 1735879802")
04:50:04 - tinyticker.sequence - ERROR: Ticker stock SPY 10x1d 300s failed with No historical data returned from yfinance API for SPY.
04:50:04 - tinyticker.sequence - INFO: All tickers skipped, sleeping 300s.

@CasaOSuser01
Copy link
Author

Hmm, I did a quick search trough the yfinance issues and found a few that mention this issue, in most cases it seems to be pi hole related.

i tried a reflash and mobile tether and the result is the same

@CasaOSuser01
Copy link
Author

Hi @loiccoyle. Both of my TinyTicker's stopped updating stock data in the past few days. Here is the log file from one of them. Any thoughts on what might be causing this or what I am doing wrong? Both of them had been working fine for months and then both stopped updating in the past few days. I had/have not made an configuration changes. Maybe a change with the yfinance API? Thanks, Matt

04:49:58 - tinyticker - INFO: Tinyticker version: 1.1.4 04:49:58 - tinyticker - INFO: PID file: /tmp/tinyticker/tinyticker_pid 04:49:58 - tinyticker - INFO: PID: 692 04:49:58 - tinyticker - DEBUG: Args: Namespace(config=PosixPath('/home/tinyticker/.config/tinyticker/config.json'), verbose=2) 04:49:58 - tinyticker - INFO: Starting ticker task. 04:49:58 - tinyticker.display - INFO: Init ePaper display. 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy 04:50:01 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release 04:50:02 - tinyticker - DEBUG: Sequence(skip_outdated=False, skip_empty=True): Ticker stock SPY 10x1d 300s 04:50:02 - tinyticker.tickers.stock - INFO: Stock tick: SPY $SPY: possibly delisted; no price data found (1d 2025-05-26 04:50:02.511846+00:00 -> 2025-01-03 04:50:02.511846+00:00) (Yahoo error = "Invalid input - start date cannot be after end date. startDate = 1748235002, endDate = 1735879802") 04:50:04 - tinyticker.sequence - ERROR: Ticker stock SPY 10x1d 300s failed with No historical data returned from yfinance API for SPY. 04:50:04 - tinyticker.sequence - INFO: All tickers skipped, sleeping 300s.

Glad im not the only one having issues, chatgpt suggests theres something wrong with the api key that the software is trying to use to communicate with yahoo finance

@loiccoyle
Copy link
Owner

loiccoyle commented Jan 3, 2025

Hi @loiccoyle. Both of my TinyTicker's stopped updating stock data in the past few days. Here is the log file from one of them. Any thoughts on what might be causing this or what I am doing wrong? Both of them had been working fine for months and then both stopped updating in the past few days. I had/have not made an configuration changes. Maybe a change with the yfinance API? Thanks, Matt

04:49:58 - tinyticker - INFO: Tinyticker version: 1.1.4 04:49:58 - tinyticker - INFO: PID file: /tmp/tinyticker/tinyticker_pid 04:49:58 - tinyticker - INFO: PID: 692 04:49:58 - tinyticker - DEBUG: Args: Namespace(config=PosixPath('/home/tinyticker/.config/tinyticker/config.json'), verbose=2) 04:49:58 - tinyticker - INFO: Starting ticker task. 04:49:58 - tinyticker.display - INFO: Init ePaper display. 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release 04:49:58 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy 04:50:01 - tinyticker.waveshare_lib.epd2in13_V4 - DEBUG: e-Paper busy release 04:50:02 - tinyticker - DEBUG: Sequence(skip_outdated=False, skip_empty=True): Ticker stock SPY 10x1d 300s 04:50:02 - tinyticker.tickers.stock - INFO: Stock tick: SPY $SPY: possibly delisted; no price data found (1d 2025-05-26 04:50:02.511846+00:00 -> 2025-01-03 04:50:02.511846+00:00) (Yahoo error = "Invalid input - start date cannot be after end date. startDate = 1748235002, endDate = 1735879802") 04:50:04 - tinyticker.sequence - ERROR: Ticker stock SPY 10x1d 300s failed with No historical data returned from yfinance API for SPY. 04:50:04 - tinyticker.sequence - INFO: All tickers skipped, sleeping 300s.

I noticed this too, will investigate I have some ideas. It is however unrelated to this issue, could you open a separate issue?

EDIT: I opened one myself, #70

@loiccoyle
Copy link
Owner

loiccoyle commented Jan 3, 2025

i tried a reflash and mobile tether and the result is the same

For a sanity check could you try disabling the pi hole and using the normal router, no mobile tether?

keep in mind that it may still not work, because of #70 so check for start date cannot be after end date in the logs.

edit: #70 is fixed in 1.1.5

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