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.
@SigmaCoding4 жыл бұрын
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.
@danielfutterweit41824 жыл бұрын
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.
@danielfutterweit41824 жыл бұрын
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, ...
@danielfutterweit41824 жыл бұрын
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).
@SigmaCoding4 жыл бұрын
Could you elaborate on this for me Daniel? What code are you talking about? Are you talking about the main authentication endpoint?
@Novaflux74 жыл бұрын
@@SigmaCoding I believe he is referring to the Oauth 2 token
@danielfutterweit41824 жыл бұрын
Comment 5: I think hearbeat is an unsolicited transmission. These messages are in the received stream: {"notify":[{"heartbeat":"1549375118054"}]}