Skip to content

Commit

Permalink
fix: issue #5
Browse files Browse the repository at this point in the history
  • Loading branch information
Veenoway authored and Tarnadas committed Oct 10, 2024
1 parent abe27b7 commit 1f1da7f
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions packages/hooks/src/orderly/usePositionStream/utils.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
API,
AlgoOrderEntity,
AlgoOrderType,
AlgoOrderRootType,
AlgoOrderType,
OrderStatus,
} from "@orderly.network/types";

Expand Down Expand Up @@ -58,7 +58,8 @@ export const findPositionTPSLFromOrders = (
// console.log(order.symbol, symbol, order.algo_type);
return (
order.symbol === symbol &&
order.algo_type === AlgoOrderRootType.POSITIONAL_TP_SL &&
(order.algo_type === AlgoOrderRootType.POSITIONAL_TP_SL ||
order.algo_type === AlgoOrderRootType.TP_SL) &&
(order.root_algo_status === OrderStatus.NEW ||
order.root_algo_status === OrderStatus.REPLACED ||
order.root_algo_status === OrderStatus.PARTIAL_FILLED)
Expand Down

0 comments on commit 1f1da7f

Please sign in to comment.