Skip to content

API Reference


API Reference / normalizeOptionChain

Function: normalizeOptionChain()

normalizeOptionChain(response): NormalizedOptionChain

Defined in: src/resources/OptionChain.ts:130

Flattens the oc map (keyed by a stringified float strike) into a sorted array. Strikes that do not parse as numbers are dropped rather than sorted to the front as NaN.

Parameters

response

RawOptionChainResponse

Returns

NormalizedOptionChain

Community project — not affiliated with Dhan. MIT License.