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

Workaround for IG /confirms bug #320

Open
bug-or-feature opened this issue Jan 13, 2024 · 0 comments
Open

Workaround for IG /confirms bug #320

bug-or-feature opened this issue Jan 13, 2024 · 0 comments

Comments

@bug-or-feature
Copy link
Member

bug-or-feature commented Jan 13, 2024

There is a bug in IG's implementation of their

/confirms/{dealReference}

endpoint, when you close a position. The method in this project is IGService.fetch_deal_by_deal_reference(). This is the request you make after opening/updating/closing a position or working order. It responds with the status of your request, and a unique ID for the transaction, if it was successful.

The bug is this: when closing a position, fetch_deal_by_deal_reference() responds with the ID of the opening transaction, not closing. There is a discussion about it on the IG community forum here.

This a real pain. Especially as IG don't even acknowledge that there is anything wrong. It makes it hard to associate opening and closing trades, and therefore get P&L information.

There is a workaround, as outlined in the forum chat. I propose to add built-in support for the workaround in the code. Optional of course.

The same bug exists whether you request the confirms information via the REST or Streaming API

bug-or-feature added a commit to bug-or-feature/trading-ig that referenced this issue Jan 16, 2024
…he correct dealId when updating or closing a position. Fix for ig-python#320
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

1 participant