-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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
Updating Orders should fail if it causes insufficient margin #8553
Updating Orders should fail if it causes insufficient margin #8553
Conversation
93ab38f
to
a6ac4a9
Compare
|
||
if (!hasSufficientBuyingPowerResult.IsSufficient) | ||
{ | ||
var errorMessage = $@"Order Error: id: [{order.Id}], Insufficient buying power to complete order, Reason: {hasSufficientBuyingPowerResult.Reason}."; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some order errors only include the order ID, and it is -10.
It would be helpful to add the Symbol and the Order Time. Perhaps order.ToString()...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you!
71dbab6
to
bdb519e
Compare
88d48ff
to
de6c6f2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you 👍
Follow up issue: #8567 |
Description
Added validation to ensure update orders are rejected when updated without sufficient margin.
Related Issue
Closes #5964
Motivation and Context
This change introduces validation to ensure that update orders are rejected when updated without sufficient margin, as stated in the description.
Requires Documentation Change
No.
How Has This Been Tested?
Tested using regression tests to verify that update orders are rejected when updated without sufficient margin. Additionally, ensured that existing functionality remains unaffected.
Types of changes
Checklist:
bug-<issue#>-<description>
orfeature-<issue#>-<description>