Skip to content
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

Open
rooklift opened this issue Dec 26, 2015 · 5 comments
Open

Opening a new ticker websocket kills the old one #5

rooklift opened this issue Dec 26, 2015 · 5 comments

Comments

@rooklift
Copy link

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.

@eu90h
Copy link
Owner

eu90h commented Dec 27, 2015

Refactored websocket code, which seems to have fixed this issue.

@eu90h eu90h closed this as completed Dec 27, 2015
@rooklift
Copy link
Author

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?)

@eu90h
Copy link
Owner

eu90h commented Dec 27, 2015

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.

@eu90h eu90h reopened this Dec 27, 2015
@rooklift
Copy link
Author

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.

@eu90h
Copy link
Owner

eu90h commented Dec 31, 2015

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants