Skip to content

API Reference


API Reference / MarginScriptItem

Interface: MarginScriptItem

Defined in: src/resources/MarginCalculator.ts:13

Plain string-literal request shape for a single margin-calculation leg — the generated ScriptItem type uses TS enums for exchangeSegment/ transactionType/productType, so exchangeSegment: "NSE_FNO" doesn't type-check against it directly. Deriving the literal unions from the enums via ${Enum} keeps them in sync with npm run generate.

Properties

exchangeSegment?

optional exchangeSegment?: "NSE_EQ" | "NSE_FNO" | "NSE_COMM" | "BSE_EQ" | "MCX_COMM" | "BSE_FNO"

Defined in: src/resources/MarginCalculator.ts:14


transactionType?

optional transactionType?: "BUY" | "SELL"

Defined in: src/resources/MarginCalculator.ts:15


quantity?

optional quantity?: number

Defined in: src/resources/MarginCalculator.ts:16


productType?

optional productType?: "CNC" | "INTRADAY" | "MARGIN" | "MTF" | "CO" | "BO"

Defined in: src/resources/MarginCalculator.ts:17


securityId?

optional securityId?: string

Defined in: src/resources/MarginCalculator.ts:18


price?

optional price?: number

Defined in: src/resources/MarginCalculator.ts:19


triggerPrice?

optional triggerPrice?: number

Defined in: src/resources/MarginCalculator.ts:20

Community project — not affiliated with Dhan. MIT License.