tda-api icon indicating copy to clipboard operation
tda-api copied to clipboard

timesale_futures_subs and add_timesale_futures_handler returning data

Open seth-noaa opened this issue 4 years ago • 3 comments

After reading in the docs (here in the tda-api readthedocs) that these streams open but provide no data I was disappointed. But I tried them anyway. I am getting good solid futures time and sale data back from the API currently.

The data looks like it should from TDA:

{
    "service": "TIMESALE_FUTURES",
    "timestamp": 1636033782612,
    "command": "SUBS",
    "content": [
        {
            "seq": 0,
            "key": "/ES",
            "TRADE_TIME": 1636033782514,
            "LAST_PRICE": 4663.25,
            "LAST_SIZE": 1.0,
            "LAST_SEQUENCE": 16489017
        }
    ]
}

Just thought I would report back that it was functional. Please don't remove this from future versions on the thought that it isn't working.

Thank you for your awesomeness.

seth-noaa avatar Nov 04 '21 14:11 seth-noaa

Wow! This is huge! Thanks for letting me know. Can you share the code that you used to produce this stream?

alexgolec avatar Nov 04 '21 16:11 alexgolec

I just verified it. Too cool.

stream_client.add_timesale_futures_handler(lambda msg: print(json.dumps(msg, indent=4)))
await stream_client.timesale_futures_subs(['/ES'])

jamesgol avatar Nov 04 '21 16:11 jamesgol

I have been trying this with multiple symbols in a list but only one comes back. What am I missing?

uricod avatar Dec 29 '21 03:12 uricod