mirror of
https://github.com/hydrosquall/tiingo-python.git
synced 2025-12-18 12:24:18 +01:00
added docs to README
This commit is contained in:
17
README.rst
17
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".
|
||||
|
||||
|
||||
Reference in New Issue
Block a user