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

chore: add min validation for isolated limit orders #601

Merged
merged 11 commits into from
Aug 27, 2024

Conversation

moo-onthelawn
Copy link
Contributor

@moo-onthelawn moo-onthelawn commented Aug 26, 2024

Add validation for isolated margin limit orders so that traders can't place orders <$20 total equity.

Renamed TradeMarketOrderInputValidator -> TradeOrderInputValidator

  • Added const isolatedLimitOrderMinimumEquity = 20
  • Added logic for validating that isolated margin limit orders (and stop limit and take profit limit) are using at least 20 dollars of equity by comparing post freeCollateral with current freeCollateral

Added tests in V4TradeInputTests

I don't think our FE is reading in the link stuff rn, but willl dig in more. Here is proof of concept of it working:

validationError.mov

Copy link

linear bot commented Aug 26, 2024

@ruixhuang ruixhuang merged commit e022a3c into main Aug 27, 2024
4 checks passed
@ruixhuang ruixhuang deleted the mulan/ct-1142-abacus-to-return-validation-error branch August 27, 2024 18:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants