-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Opening a new ticker websocket kills the old one #5
Comments
Refactored websocket code, which seems to have fixed this issue. |
I'm afraid this is still happening, although after a delay, i.e. 2 or more can run for a short time. Also, I'm not sure the 2 clients are actually receiving the same data. (Thirdly, there seems to be a colossal amount of data from the ticker; whether this is due to the bots being different from SF I don't know. Can I turn them off?) |
The clients should receive the same quotes now. The ticker chatter was probably due to the market makers constantly canceling tons of orders; they wait a bit now, which seems to have helped. I'll see whats up with the sockets dropping. Maybe the sockets are timing out after 5 minutes, I'll try to keep them alive. |
One thing: if possible, the ticker shouldn't care about account name at all. Although it's in the URL, official Stockfighter just ignores it, as far as I can tell. |
Should be easy to fix. I was saving websockets in a hash-table keyed to the traders account number, I'll key the table by API key instead maybe. Thanks again! |
It's likely quite normal to open multiple websockets for the ticker (and also the executions). i.e. I'm trying to run multiple bots, each of which will need its own ticker websocket. But when one connects, all other connections are closed, it seems.
The text was updated successfully, but these errors were encountered: