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

If set a custom quantity for TP/SL order, usePositionStream do not return the algo_order as it's a TP_SL type #5

Open
Veenoway opened this issue Oct 10, 2024 · 0 comments

Comments

@Veenoway
Copy link
Contributor

CONTEXT:
When we create a TP/SL order with the full size position it will be a POSITIONAL_TP_SL but for custom qty TP/SL the type is TP_SL.

ISSUE:
As the tp sl with a custom qty is a TP_SL type, actually usePositionStream won't show the current algo order as it is filtered inside the findPositionTPSLFromOrders function ( order.algo_type === AlgoOrderRootType.POSITIONAL_TP_SL ).

FIX:
Adding a condition to the actual findPositionTPSLFromOrders to check if (order.algo_type === AlgoOrderRootType.POSITIONAL_TP_SL) OR (order.algo_type === AlgoOrderRootType.TP_SL )

Capture d’écran 2024-10-10 à 07 04 34
Veenoway added a commit to Veenoway/orderly-js-sdk that referenced this issue Oct 10, 2024
Tarnadas pushed a commit that referenced this issue Oct 10, 2024
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

No branches or pull requests

1 participant