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.

28 lines (24 loc) 1.38 kB
import { SmartApiEnhanced, CandleDataParams } from './smartapi/smartapi_enhanced.js'; import { OHLCData } from './smartapi/ohlc_data.js'; import { InstrumentDump, CacheInterface, ScripLtpMap } from './types.js'; import '@thoshpathi/smartapi-javascript'; import '@thoshpathi/utils-core'; interface Params { symbols: string[]; smartapi: SmartApiEnhanced; } /** * Return Map of <symbol, ScripLtp> */ declare function getManyScripLtpMap(params: Params, instrumentDumps: InstrumentDump[], cacheObject?: CacheInterface): Promise<ScripLtpMap>; /** * Return Map of <symbol, ScripLtp> */ declare function getManyScripLtpMapCache(params: Params, instrumentDumps: InstrumentDump[], cacheObject?: CacheInterface): Promise<ScripLtpMap>; /** * Return Map of <symbol, ScripLtp> */ declare function getIndexScripLtpMap(indexScrips: InstrumentDump[], smartapi: SmartApiEnhanced, cacheObject?: CacheInterface): Promise<ScripLtpMap>; declare function getIndexHistoricalData(params: CandleDataParams, smartapi: SmartApiEnhanced): Promise<OHLCData[] | undefined>; declare function getIndexLatestHistoricalData(args: Omit<CandleDataParams, "fromdate" | "todate">, smartapi: SmartApiEnhanced): Promise<OHLCData[] | undefined>; export { getManyScripLtpMap as default, getIndexHistoricalData, getIndexLatestHistoricalData, getIndexScripLtpMap, getManyScripLtpMap, getManyScripLtpMapCache };