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

Update stop market order liquidity warning + params #313

Conversation

moo-onthelawn
Copy link
Contributor

@moo-onthelawn moo-onthelawn commented Apr 24, 2024

As per product, update stop market slippages from:

  • Major markets: 0.05 -> 0.1
  • Non-major markets: 0.1 -> 0.2

For cleanliness, updated constants to be shared between TriggerOrdersInputCalculator and TradeInputCalculator; removed unused MARKET_ORDER_SLIPPAGE_WARNING_THRESHOLD.

Also remove STOP_MARKET_ORDER_MAY_NOT_EXECUTE warning prompting users to use stop limit orders.

Copy link

linear bot commented Apr 24, 2024

"code": "STOP_MARKET_ORDER_MAY_NOT_EXECUTE"
}
]
"errors": null
Copy link
Contributor

Choose a reason for hiding this comment

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

[q] is this supposed to be an unhappy path test? if so should we change the test input params to ensure this still throws an error?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

eh it wasn't really an unhappy path - it was just a warning (non blocking for a user; errors are blocking) that we ripped out. I think I'm fine leaving it like this for now; we could add a test for SELL_TRIGGER_TOO_CLOSE_TO_LIQUIDATION_PRICE but I didn't touch that logic (and the mock data doesn't currently have a liquidation price) so inclined to leave it like this for now!

@moo-onthelawn moo-onthelawn merged commit f874b50 into main Apr 24, 2024
3 checks passed
@moo-onthelawn moo-onthelawn deleted the mulan/ct-779-remove-warning-for-users-placing-stop-market-orders branch April 24, 2024 20:34
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