@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.39 kB
text/typescript
import { SmartApiEnhanced, CandleDataParams } from './smartapi/smartapi_enhanced.mjs';
import { OHLCData } from './smartapi/ohlc_data.mjs';
import { InstrumentDump, CacheInterface, ScripLtpMap } from './types.mjs';
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 };