/** * Order classification utilities. * * Type guards and classifiers that operate on SDK types to determine * order categories (TP/SL, open/close). These use the OrderType enum * for classification — no string matching. */ import type { OpenOrder } from '@lifi/perps-types'; import { FillClassification, OrderSide, OrderStatus } from '@lifi/perps-types'; export { FillClassification }; /** * Check if an open order is a Take Profit trigger order. * @public */ export declare function isTakeProfitOrder(order: Pick): boolean; /** * Check if an open order is a Stop Loss trigger order. * @public */ export declare function isStopLossOrder(order: Pick): boolean; /** * Check if an open order is a TP or SL trigger order. * @public */ export declare function isTpSlOrder(order: Pick): boolean; /** * Order statuses representing an order still resting on the book (visible * in `openOrders` / `triggerOrders`). Anything not in this set is terminal — * filled, cancelled, rejected, expired — and should be evicted from the * cached orders list when seen in a WS update. * @public */ export declare const ACTIVE_ORDER_STATUSES: ReadonlySet; /** * Whether `status` is one of {@link ACTIVE_ORDER_STATUSES}. * * @public */ export declare function isActiveOrderStatus(status: OrderStatus): boolean; /** * Classify a fill as open or close based on realizedPnl. * @deprecated Use `Fill.classification` instead — it uses startPosition * for accurate open/increase/reduce/close/reverse classification. * @public */ export declare function classifyFill(side: OrderSide, realizedPnl: string | null | undefined): FillClassification; //# sourceMappingURL=orderClassification.d.ts.map