TD Ameritrade API Python Library: Streaming Pt. 2

  Рет қаралды 1,693

Sigma Coding

Sigma Coding

Күн бұрын

Пікірлер: 9
@fma3487
@fma3487 4 жыл бұрын
Thank for the video. Really helpful.
@danielfutterweit4182
@danielfutterweit4182 4 жыл бұрын
Comment 4: I did not checked how you are processing the streaming data and saving in the database but also as far as I remember the responses can be a list where you have mixed data from TIMESALE_EQUITY, CHART_EQUITY, QUOTE, as well as responses of commands, etc. So one response can include several database entries. I comment this because documentation does only explain unique requests/responses and not real world applications behavior.
@SigmaCoding
@SigmaCoding 4 жыл бұрын
Yes, you have to be careful with the responses because they can sometimes change based on the endpoint and on top of that the time of day you pull it or even the day of the week you pull it.
@danielfutterweit4182
@danielfutterweit4182 4 жыл бұрын
Comment 3: I programmed this with websocket_client (import websocket # without a final s) a library with included methods: on_open, on_error, on_message, on_close and I could get things running very easily since it solved the event loop. As it was a test for programming I inculded fixed requests in on_open and let it run. Unfortunatelly it did not worked all the day long and stopped without any notification. (this is what I remember). As it was just for testing purposes, since I do not actually have a streaming use I quit working on it. So, my comment is that websockets (with a final s) + asyncio seems to be more reliable or, at least you have more control in events handling.
@danielfutterweit4182
@danielfutterweit4182 4 жыл бұрын
Comment 1: In userprincipals dictionary there is a key "authorizations" for each account (remember userprincials can be requested for all fields or some of them). It seems not to be a complete list in my account I do not trade forex and I do not see any forex authorization there but there are for options and in my case I do not trade options either. Also I see in the ' Resource Summary' (get userprincipals response) in developers page a 'description' for the account which I do not see in my presonal account response. I suppose there must be the information if it is a margin account, cash, ...
@danielfutterweit4182
@danielfutterweit4182 4 жыл бұрын
Comment 2: This is not related specifically with this video but I do not want to forget it. In the authorization with CODE. Were you saving the date the CODE was obtained and the date the CODE expires (90 days after)? This might be necessary for priodically get a new CODE and not be in a hurry (as I was some days ago when my CODE expired and I could get things running a few minutes before market opened).
@SigmaCoding
@SigmaCoding 4 жыл бұрын
Could you elaborate on this for me Daniel? What code are you talking about? Are you talking about the main authentication endpoint?
@Novaflux7
@Novaflux7 4 жыл бұрын
@@SigmaCoding I believe he is referring to the Oauth 2 token
@danielfutterweit4182
@danielfutterweit4182 4 жыл бұрын
Comment 5: I think hearbeat is an unsolicited transmission. These messages are in the received stream: {"notify":[{"heartbeat":"1549375118054"}]}
TD Ameritrade API Python Library: Streaming Pt. 3
27:11
Sigma Coding
Рет қаралды 1,8 М.
Using Pathlib in Python
29:34
Sigma Coding
Рет қаралды 12 М.
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 46 МЛН
UFC 310 : Рахмонов VS Мачадо Гэрри
05:00
Setanta Sports UFC
Рет қаралды 1,2 МЛН
Mom Hack for Cooking Solo with a Little One! 🍳👶
00:15
5-Minute Crafts HOUSE
Рет қаралды 21 МЛН
Google Data Center 360° Tour
8:29
Google Cloud Tech
Рет қаралды 5 МЛН
Rethinking the TD Ameritrade Library
32:59
Sigma Coding
Рет қаралды 3,5 М.
Getting Started with Python on Windows | Introduction
15:35
Sigma Coding
Рет қаралды 3,6 М.
Асинхронный python / Python FastAPI / Python uv / Юрий Селиванов / #16
2:02:23
Организованное программирование | Кирилл Мокевнин
Рет қаралды 15 М.
Power BI in Python | Dashboards & Datasets
27:04
Sigma Coding
Рет қаралды 8 М.