@thoshpathi/utils-smartapi-order
Version:
Utility functions for placing live and dummy orders using Angel One's SmartAPI, with helper methods for streamlined trading workflows.
34 lines (31 loc) • 1.17 kB
TypeScript
import { SpreadType, OptionLabel, ScripTrendDataMap } from './types.js';
import { Trend, Transaction, ScripLtpMap, ScripLtp } from '@thoshpathi/utils-smartapi';
declare function getSpreadScripData(params: {
strike: number;
trend: Trend;
spreadType: SpreadType;
contractPrefix: string;
leg1Gap: OptionLabel;
leg2Gap: OptionLabel;
}): ScripTrendDataMap;
declare function getNakedScripData(params: {
strike: number;
trend: Trend;
transaction: Transaction;
contractPrefix: string;
legGap: OptionLabel;
}): ScripTrendDataMap;
declare function generateNakedTrendOptionSymbols(params: {
strike: number;
trend: Trend;
transaction: Transaction;
contractPrefix: string;
roundTo?: 50 | 100;
length?: 8 | 9 | 10 | 11 | 12;
}): {
trend: Trend;
symbols: string[];
};
declare function findNearestPremiumData(scripLtpMap: ScripLtpMap, premium: number): ScripLtp;
declare function generateOptionLabels(gap?: number, step?: number): OptionLabel[];
export { getSpreadScripData as default, findNearestPremiumData, generateNakedTrendOptionSymbols, generateOptionLabels, getNakedScripData, getSpreadScripData };