mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2026-02-01 09:04:18 +01:00
Added barebone support for websockets API
This commit is contained in:
@@ -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
|
||||
--------
|
||||
|
||||
Reference in New Issue
Block a user