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

Bitget order subscription duplication. C# #22599

Closed
skuvv opened this issue May 23, 2024 · 6 comments
Closed

Bitget order subscription duplication. C# #22599

skuvv opened this issue May 23, 2024 · 6 comments
Assignees

Comments

@skuvv
Copy link

skuvv commented May 23, 2024

Operating System

Windows 10

Programming Languages

No response

CCXT Version

4.3.22

Description

I make several subscriptions for orders.
Next, when I receive new order status, it pushed for all subscriptions instead of specific one.

Code

No response

@skuvv
Copy link
Author

skuvv commented May 23, 2024

Here is the demo solution.
DemoForDebug.zip

The counter should always be 1, but it is incremented in other subscriptions.

@carlosmiei carlosmiei self-assigned this May 24, 2024
@carlosmiei
Copy link
Collaborator

Hello @skuvv, thanks again for reporting it, we will take a look

@skuvv
Copy link
Author

skuvv commented May 26, 2024

More info,

        public void resolve(object content, object messageHash2)
        {
            if (this.verbose && (messageHash2 == null))
            {
                Console.WriteLine("resolve received undefined messageHash");
            }
            var messageHash = messageHash2.ToString();
            if ((this.futures as ConcurrentDictionary<string, Future>).TryRemove(messageHash, out Future future))
            {
                future.resolve(content);
            }
        }

This method uses messageHash for pushing incoming messages for subscriptions but messageHash is not unique in this case and all subscriptions has the same key = "order"

@carlosmiei
Copy link
Collaborator

@skuvv Yes we need to change the messageHash depending on the market type when the symbol is not provided.

@carlosmiei
Copy link
Collaborator

@skuvv Can you please update your ccxt version and try again?

@skuvv
Copy link
Author

skuvv commented May 29, 2024

Tested on CCXT Version:4.3.35
fixed now, thanks!

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