Skip to content

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

@Veenoway

Description

@Veenoway

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions