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

Strategy: Auditing cancels orders ? #58

Open
asmodehn opened this issue Jul 12, 2019 · 1 comment
Open

Strategy: Auditing cancels orders ? #58

asmodehn opened this issue Jul 12, 2019 · 1 comment
Labels
question Further information is requested

Comments

@asmodehn
Copy link
Contributor

I recently noticed that auditing a strategy implies cancelling orders... Is that required for some reason ?

A side effect seems to be that these cancelled orders are not passed to the strategy tick() method... which means the strategy has no way to know these orders have been cancelled...

Any hint/idea to improve that ?

@garethdmm
Copy link
Owner

Audits cancel orders because audits have to take place in a static exchange account state. If a trade can happen in the middle of an audit the whole thing might be thrown off.

This isn't religious decree, this could possibly be more or less important depending on the properties of the exchange. In some the volume of open orders is actually subtracted from the balance so it's absolutely necessary to fully wind down before auditing, but on others it may not be.

One thing you might be interested in is reducing the wind-down time for audits. This is the period that the process waits between the order cancellations and beginning the audit (on some exchanges this is necessary to allow the exchange's internal state to settle).

I don't totally understand why you'd need to have those orders present in current_orders in the next tick. Maybe you could message me on slack and I could help debug.

@garethdmm garethdmm added the question Further information is requested label Jul 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants