Added barebone support for websockets API

This commit is contained in:
mohamedemad4
2020-09-02 03:17:11 +02:00
parent db92c33410
commit 4ce17b8079
4 changed files with 112 additions and 0 deletions

View File

@@ -61,6 +61,23 @@ Now you can use ``TiingoClient`` to make your API calls. (Other parameters are a
startDate='2017-01-01',
endDate='2017-08-31')
Websocket support::
.. code-block:: python
from tiingo import TiingoWebsocketClient
def cb_fn(msg):
print(msg)
subscribe = {
'eventName':'subscribe',
'authorization':'API_KEY_GOES_HERE',
'eventData': {
'thresholdLevel':5
}
}
client=TiingoWebsocketClient(subscribe,endpoint="iex",on_msg_cb=cb_fn)
Further Docs
--------