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

Staggered orders should not be cancelled on error #170

Closed
bitphage opened this issue Jun 1, 2018 · 1 comment
Closed

Staggered orders should not be cancelled on error #170

bitphage opened this issue Jun 1, 2018 · 1 comment

Comments

@bitphage
Copy link
Collaborator

bitphage commented Jun 1, 2018

Actual Behavior

When error in staggered_orders worker is happen, it will cancel all orders from the market:

     def error(self, *args, **kwargs):
         self.cancel_all()
         self.disabled = True

On next run reverse orders will be placed effectively selling all your funds. Should be fixed ASAP.

Steps to Reproduce the Problem

  1. Add any error-producing code to the def tick() inside staggered_orders.py
  2. See worker error
  3. Remove error from the code
  4. Restart workers
  5. See how worker is selling everything
  6. Press Ctrl-Z immediately then kill worker with kill -9

Specifications

  • Version: 0.2.7
bitphage added a commit to bitphage/DEXBot that referenced this issue Jun 1, 2018
Orders should not be cancelled on error because on next run reverse
orders will be placed effectively selling all your funds.

Closes: Codaone#170
bitphage added a commit to bitphage/DEXBot that referenced this issue Jun 2, 2018
By default, dexbot uses python-bitshares order expiration time (7 days)
which is quite low for staggered orders. Whether order expired, on the
next run of the staggered orders worker it will treat expired order as
filled and so a reverse order will be placed, effectively selling your
funds (same as Codaone#170).

Closes: Codaone#174
@MarkoPaasila
Copy link
Collaborator

Yes I agree. This behavior was apparently inherited from Relative Orders, where I think orders should be cancelled if we aren't sure what's going on. But with staggered orders we don't care what's going on in the same manner. Thank you! Excellent observation!

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

No branches or pull requests

2 participants