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

Stopped working #10

Closed
krazykoder opened this issue Mar 30, 2021 · 6 comments
Closed

Stopped working #10

krazykoder opened this issue Mar 30, 2021 · 6 comments

Comments

@krazykoder
Copy link

Seems like this library stopped working. I am not sure if this is python version or changes in the data format. Can you please help. Do you see similar issues.
I am using python 3.8.

@alparamonov
Copy link
Contributor

I'm looking into it. Do you get any errors?

@krazykoder
Copy link
Author

No errors. Just blank - no output.

@alparamonov
Copy link
Contributor

Fixed in new release v0.2.8. Update the package and feel free to reopen the issue if the problem persists.

@krazykoder
Copy link
Author

krazykoder commented Apr 1, 2021

Still not working. I do get the message "### connection is open ###" but no updates after that. Details below

  (venv3) ~/code/python/pythonic/compilation$ python -V
  Python 3.8.0
  (venv3) ~/code/python/pythonic/compilation$ pip list | grep live
  yflive                0.1.2
  yliveticker           0.2.8
  (venv3) ~/code/python/pythonic/compilation$ python liveTICK.py
  ### connection is open ###

The code is same as you posted in examples:

import yliveticker

# this function is called on each ticker update
def on_new_msg(msg):
#   print ("Hello")
    print(msg)

yliveticker.YLiveTicker(on_ticker=on_new_msg, ticker_names=["AAPL", "AMZN", "AMAT"])

alparamonov added a commit that referenced this issue Apr 1, 2021
@alparamonov
Copy link
Contributor

@krazykoder thanks for posting. The issue was no longer with the package itself, but with the example in readme. Please, check the new client code or readme example.

So, instead of the old code snippet, use this:

import yliveticker


# this function is called on each ticker update
def on_new_msg(ws, msg):
    print(msg)


yliveticker.YLiveTicker(on_ticker=on_new_msg, ticker_names=[
    "BTC=X", "^GSPC", "^DJI", "^IXIC", "^RUT", "CL=F", "GC=F", "SI=F", "EURUSD=X", "^TNX", "^VIX", "GBPUSD=X", "JPY=X", "BTC-USD", "^CMC200", "^FTSE", "^N225"])

And also don't forget to update to v0.2.9

pip install yliveticker==0.2.9

Please, let me know if it worked for you.

@krazykoder
Copy link
Author

It worked. thanks for help me out. Appreciate it.

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

2 participants