diff --git a/README.rst b/README.rst index 355d65a..f7f5b43 100644 --- a/README.rst +++ b/README.rst @@ -135,6 +135,23 @@ To receive results in ``pandas`` format, use the ``get_dataframe()`` method: startDate='2017-01-01', endDate='2018-05-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) You can specify any of the end of day frequencies (daily, weekly, monthly, and annually) or any intraday frequency for both the ``get_ticker_price`` and ``get_dataframe`` methods. Weekly frequencies resample to the end of day on Friday, monthly frequencies resample to the last day of the month, and annually frequencies resample to the end of day on 12-31 of each year. The intraday frequencies are specified using an integer followed by "Min" or "Hour", for example "30Min" or "1Hour".