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

Partial fill is not processed correctly when multiple sell orders are made #574

Closed
uhliksk opened this issue Jan 4, 2023 · 2 comments
Closed
Labels
bug Something isn't working

Comments

@uhliksk
Copy link
Contributor

uhliksk commented Jan 4, 2023

Version

v0.0.96

Description

Bot is counting just last sell when volatile market cause partially filled sell is cancelled and new sell is created.

To Reproduce

  1. Make higher value order to not be processed at once.
  2. Make market close order with multiple partial sells.
  3. There is a chance sell will be cancelled after partially sold and new sell order will be created to be filled.

Expected Behaviours

All sells on order created by bot have to be counted.

Screenshots

Trade history on Binance:
image

Trade history recorder by bot:
image

Additional context

There were two sell orders created. One 459,6317236 BUSD at 19:07:14 as partially filled as maker and then cancelled and one 544.8021018 BUSD at 19:07:20 filled as taker. Both made by bot automatically.

@uhliksk uhliksk added the bug Something isn't working label Jan 4, 2023
@uhliksk uhliksk changed the title Partial fill is not processed correctly when there are mixed maker and taker sells Partial fill is not processed correctly when multiple sell orders are made Jan 4, 2023
@chrisleekr
Copy link
Owner

Hmm, I am not sure I can understand what exactly happened here.

So the 1st sell order is partially filled, but the bot archived the trade? Is that why showing -45.73%?

If the 2nd sell order is placed by the bot, then the bot still thinks the trade is opened. So I expect not to archive the trade.

Any log?

@uhliksk
Copy link
Contributor Author

uhliksk commented Jan 5, 2023

I don't have a log as I noticed it too late but what I think happend is because 1st sell order has been cancelled bot started counting sum of sale again when 2nd sell order has been created because there were just 544.80210 BUSD left when it created 2nd sell order. If you sum sales made at 19:07:21 that's exactly 544.8021018 BUSD.

I've seen few times same thing in buy orders when too big profit was calculated because only second buy order part was counted to buy side but this was not blocking issue as bot just then sold available amount of asset so I didn't paid attention to this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants