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

Channel callback doesn't fire #6

Closed
wkyle opened this issue Jan 15, 2018 · 3 comments
Closed

Channel callback doesn't fire #6

wkyle opened this issue Jan 15, 2018 · 3 comments

Comments

@wkyle
Copy link

wkyle commented Jan 15, 2018

Tried implementing basic example. The 'data' event doesn't seem to be firing.

import pysher
import time

def channel_callback(data):
    print(data)

def connection_callback(data):
    channel = pusher.subscribe("order_book_BTC_USD")
    channel.bind("data", channel_callback)
    
pusher = pysher.Pusher("de504dc5763aeef9ff52")
pusher.connection.bind("pusher:connection_established", connection_callback)
pusher.connect()

while True:
    time.sleep(1)
@wkyle
Copy link
Author

wkyle commented Jan 15, 2018

To follow up on this, I wrote a print(message) inside the _on_message handler in connections.py and while it prints the initial connection messages, there are no messages following that. Trades are occurring on BitStamp at the moment however no messages are coming through.

@deepbrook
Copy link
Owner

Hey @wkyle,
your orderbook channel is wrong. it should be order_book, not order_book_BTC_USD.

Cheers!
Nils

@wkyle
Copy link
Author

wkyle commented Jan 15, 2018

Oh my. After all that I misread the BitStamp documentation.
Thank you kindly. I look forward to following this project.
Wes

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