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

Watch_orders api with newUpdates or not with newUpdates both have bugs. #22494

Open
angrymilk opened this issue May 14, 2024 · 1 comment
Open
Assignees

Comments

@angrymilk
Copy link

angrymilk commented May 14, 2024

Operating System

linux

Programming Languages

Python

CCXT Version

4.1.86

Description

watch_orders with newUpdates will get error when openordres are bigger than limit, because ArrayCacheBySymbolById deletes order with which is earlier, if the earlier order is still open, but the older older is ended, the earlier order will lose status.
watch_orders without newUpdates also will get something wrong, the reason is about the code below.

If self.futures[message_hash] is not ready from where the watch_orders is called, this message will get lost.

Code

  def resolve(self, result, message_hash):
        if self.verbose and message_hash is None:
            self.log(iso8601(milliseconds()), 'resolve received None messageHash')
        if message_hash in self.futures:
            future = self.futures[message_hash]
            future.resolve(result)
    
            del self.futures[message_hash]
        
        return result

@sc0Vu
Copy link
Contributor

sc0Vu commented May 15, 2024

@angrymilk any script that we can reproduce this?

@sc0Vu sc0Vu self-assigned this May 15, 2024
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