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

Handle unknown liquidity as None #109

Merged
merged 1 commit into from
Feb 9, 2024
Merged

Handle unknown liquidity as None #109

merged 1 commit into from
Feb 9, 2024

Conversation

drpngx
Copy link
Contributor

@drpngx drpngx commented Feb 9, 2024

TWS will sometimes return UNSET_INTEGER (2**31 -1), causing the code to panic. This will prevent enumerating the orders from Client::executions(...). This is compliant with the C# client behavior. Also, we note that the C# comment lists 0 = Unknown.

TWS will sometimes return UNSET_INTEGER (2**31 -1). If we panic, it will prevent enumerating the orders. This is compliant with the C# client behavior: https://github.com/quantrocket-llc/ibapi/blob/e3542aa3e05a2b752eb33742f81a50d4ac0aa1d8/source/csharpclient/client/Execution.cs#L31
Also, we note that the C# comment lists 0 = Unknown.
Copy link
Owner

@wboayue wboayue left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. This is better behavior. Only downside is that it is not obvious if a new liquidity type as added and the code is not updated for the new liquidity type.

@wboayue wboayue merged commit 110420e into wboayue:main Feb 9, 2024
1 check passed
@drpngx
Copy link
Contributor Author

drpngx commented Feb 9, 2024

Thanks!

@drpngx drpngx deleted the patch-1 branch February 9, 2024 23:23
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

Successfully merging this pull request may close these issues.

None yet

2 participants