Skip to content

API Reference


API Reference / ConvertPositionRequest

Interface: ConvertPositionRequest ​

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

Plain string-literal request shape for Positions.convert — the generated PositionConversionRequest type uses TS enums for fromProductType/exchangeSegment/positionType/toProductType, so fromProductType: "INTRADAY" doesn't type-check against it directly. Deriving the literal unions from the enums via ${Enum} keeps them in sync with npm run generate without hand-transcribing every member.

Properties ​

dhanClientId? ​

optional dhanClientId?: string

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


fromProductType? ​

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

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


exchangeSegment? ​

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

Defined in: src/resources/Positions.ts:21


positionType? ​

optional positionType?: "CLOSED" | "LONG" | "SHORT"

Defined in: src/resources/Positions.ts:22


securityId? ​

optional securityId?: string

Defined in: src/resources/Positions.ts:23


convertQty? ​

optional convertQty?: number

Defined in: src/resources/Positions.ts:24


toProductType? ​

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

Defined in: src/resources/Positions.ts:25

Community project — not affiliated with Dhan. MIT License.