UNPKG

@thoshpathi/utils-smartapi

Version:

Extended utilities for Angel One's smartapi-javascript SDK, including custom methods and helpers for market data like candles, P&L, and more.

19 lines (16 loc) 577 B
import { Trend } from './types.mjs'; interface DefaultParams { entry: number; trend: Trend; ltp: number; } interface CheckParams extends DefaultParams { points: number; } interface CalculateParams extends DefaultParams { qty: number; } declare function isProfitReached({ entry, points, trend, ltp }: CheckParams): boolean; declare function isStoplossReached({ entry, points, trend, ltp }: CheckParams): boolean; declare function calculatePL({ entry, qty, trend, ltp }: CalculateParams): number; export { calculatePL, isProfitReached, isStoplossReached };