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

cancel an order before the unfilledtimeout expires #2646

Closed
maxma-bit opened this issue Dec 11, 2019 · 4 comments · Fixed by #8086
Closed

cancel an order before the unfilledtimeout expires #2646

maxma-bit opened this issue Dec 11, 2019 · 4 comments · Fixed by #8086
Labels
Enhancement Enhancements to the bot. Get lower priority than bugs by default. Good first issue Good issues to get familiar and start contributing to freqtrade RPC Telegram, ReST API, external control, ...

Comments

@maxma-bit
Copy link

Is there a way to cancel an order before the unfilledtimeout expires, in a way that the local sqlite database remains consistent with the exchage?
Please note that the RPC command /forcesell or /forcebuy do not help with this. In the case of a SELL, one would like to cancel the SELL order in Order Book before the sale is actually executed. It seems a bit different from forcing a SELL with the RPC command /forcesell.
For BUY order, one would like to cancel the order before the BUY purchase is made. It seems to me different from forcing a purchase with /forcebuy.
if there is no way to do it, could you consider this for a possible extension?

@hroff-1902 hroff-1902 added Enhancement Enhancements to the bot. Get lower priority than bugs by default. Good first issue Good issues to get familiar and start contributing to freqtrade labels Dec 11, 2019
@xmatthias
Copy link
Member

I guess you should be able to cancel the buy-order "on exchange" - the database should notice that and update the trade.
One problem this causes:
assuming you don't use process_only_new_candles=True, then the buy-signal may still be active - so it reopens the trade seconds after you cancelled that.
We should be able to prevent that by locking the pair anyway - but that'll mean that you the bot can't buy this pair for the duration of this candle.

i think you may be able to stop a buy via /forcesell (don't pin me on that though - never tested this scenario).

@xmatthias xmatthias added the RPC Telegram, ReST API, external control, ... label Dec 11, 2019
@hroff-1902
Copy link
Member

hroff-1902 commented Dec 11, 2019

assuming you don't use process_only_new_candles=True, then the buy-signal may still be active - so it reopens the trade seconds after you cancelled that.

Should not the pair be locked after the first buy (which we are going to cancel)?

Sequence of 2 commands /stopbuy=pair (or /blacklist=pair), /cancelorder=id issued should help in this case anyway...

@werkkrew
Copy link

Is this still considered a valuable "good first issue"?

@xmatthias
Copy link
Member

sure thing - i think all issues we've got currently open (with the label Enhancement) are kindof "free to pick" or are otherwise closed, although some will not be easy to implement / require multiple steps to fully be implemented (this does not apply to "good first issue" though).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Enhancements to the bot. Get lower priority than bugs by default. Good first issue Good issues to get familiar and start contributing to freqtrade RPC Telegram, ReST API, external control, ...
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants