You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from python_bitvavo_api.bitvavo import Bitvavo
def callback(response):
print(f"Callback: {response}") # Note that json.dumps from documentation also doesn't work
def errorCallback(error):
raise RuntimeError()
bitvavo = Bitvavo()
websocket = bitvavo.newWebsocket()
websocket.setErrorCallback(errorCallback)
websocket.subscriptionBook("BTC-EUR", callback)
I get the following traceback.
Traceback (most recent call last):
File "..\.venv\Lib\site-packages\websocket\_app.py", line 660, in _callback
callback(self, *args)
File "..\.venv\Lib\site-packages\python_bitvavo_api\bitvavo.py", line 485, in on_message
callbacks['subscriptionBook'][market](ws, msg)
File "..\.venv\Lib\site-packages\python_bitvavo_api\bitvavo.py", line 78, in processLocalBook
ws.localBook[market]['bids'] = message['response']['bids']
^^^^^^^^^^^^
AttributeError: 'WebSocketApp' object has no attribute 'localBook'
The text was updated successfully, but these errors were encountered:
I am trying to use the book subscription on the websocket. If I run the code that is in the example on the website, I get an error. I am referring to the python example here: https://docs.bitvavo.com/#tag/Market-data-subscription-WebSocket/paths/~1subscribeBook/post
Python 3.12.1
python_bitvavo_api 1.4.1
Steps to reproduce:
I get the following traceback.
The text was updated successfully, but these errors were encountered: