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

Order cancels on server close #25

Closed
lianopbs opened this issue Jul 29, 2019 · 2 comments
Closed

Order cancels on server close #25

lianopbs opened this issue Jul 29, 2019 · 2 comments

Comments

@lianopbs
Copy link

Every order is cancelled upon server close or losing internet connection, and I am looking into disabling this behavior.
It would be fine if only algo-type orders would be cancelled as I can't have my long term limit orders deleted everytime.

Any hint on where this behavior is coded ? , I just can't find it

@JacobPlaster
Copy link
Contributor

Hey @lianopbs, the feature that you are talking about is called a "deadman switch". When we connect the websocket to the bitfinex API we submit a flag that tells bitfinex to kill all orders if that websocket connection is closed.

In this case, this behaviour is located in the bfx-hf-algo service which is create in the background of the UI via the bfx-hf-server and you can see the logic here: https://github.com/bitfinexcom/bfx-hf-algo/blob/ef93d5a323d75a66bbffc6cc4df98216ae43b574/lib/ao_host.js#L59.
In order to disable this you may want to fork your own hf server and pass in the parameter to disable it.

@lianopbs
Copy link
Author

got it, thanks. I wasn't expecting this to be located on websocket opening functions haha

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