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

fix: limits account for replaced order quantity #2002

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

sangaman
Copy link
Collaborator

This fixes a bug in the logic to calculate whether a request to place a new order exceeds the available capacity and trading limits by properly accounting for the quantity that is being replaced by the new order request. Previously, this was not accounted for and attempting to replace an order, even if not changing quantity, could result in an error due to exceeding the trading capacity.

Closes #1999.

I'm still working on some tests to cover this case but figured I'd open the PR for testing/review so we can get this merged soon.

This fixes a bug in the logic to calculate whether a request to place
a new order exceeds the available capacity and trading limits by
properly accounting for the quantity that is being replaced by the new
order request. Previously, this was not accounted for and attempting
to replace an order, even if not changing quantity, could result in
an error due to exceeding the trading capacity.

Closes #1999.
@sangaman sangaman added bug Something isn't working grpc gRPC API order book labels Nov 23, 2020
@sangaman sangaman requested review from a user, rsercano and kilrau November 23, 2020 17:36
@sangaman sangaman self-assigned this Nov 23, 2020
@kilrau kilrau requested review from raladev and removed request for rsercano November 23, 2020 17:40
@raladev raladev merged commit eadf5d1 into master Nov 23, 2020
@raladev raladev deleted the fix/tradinglimits-replaceorder branch November 23, 2020 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working grpc gRPC API order book
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No maxsell/maxbuy recalculation for order replacement case
3 participants