mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-18 20:24:19 +01:00
removed config as a default arg;added comment to explain why on_error() and on_close() don't get a self
This commit is contained in:
@@ -38,7 +38,7 @@ class TiingoWebsocketClient:
|
|||||||
while True:pass
|
while True:pass
|
||||||
'''
|
'''
|
||||||
|
|
||||||
def __init__(self,config={},endpoint=None,on_msg_cb=None):
|
def __init__(self,config,endpoint=None,on_msg_cb=None):
|
||||||
|
|
||||||
self._base_url = "wss://api.tiingo.com"
|
self._base_url = "wss://api.tiingo.com"
|
||||||
self.config=config
|
self.config=config
|
||||||
@@ -88,6 +88,7 @@ class TiingoWebsocketClient:
|
|||||||
return
|
return
|
||||||
return on_msg_cb_local
|
return on_msg_cb_local
|
||||||
|
|
||||||
|
# since methods need to be unbound in order for websocketClient these methods don't have a self as their first parameter
|
||||||
def on_error(ws, error):
|
def on_error(ws, error):
|
||||||
print(error)
|
print(error)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user