Skip to content

API Reference


API Reference / OptionChain

Class: OptionChain ​

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

Option chain data (/v2/optionchain).

Note this endpoint is rate limited to one call every three seconds, well below the other data APIs.

Constructors ​

Constructor ​

new OptionChain(httpClient): OptionChain

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

Parameters ​

httpClient ​

HttpClient

Returns ​

OptionChain

Methods ​

fetch() ​

fetch(request): Promise<RawOptionChainResponse>

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

Raw option chain payload, exactly as the API returns it.

Parameters ​

request ​

OptionChainRequest

Returns ​

Promise<RawOptionChainResponse>


expiryList() ​

expiryList(request): Promise<ExpiryListResponse>

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

Available expiry dates for an underlying, ascending.

Parameters ​

request ​

ExpiryListRequest

Returns ​

Promise<ExpiryListResponse>


fetchNormalized() ​

fetchNormalized(request): Promise<NormalizedOptionChain>

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

Option chain with the strike map flattened and sorted ascending.

Parameters ​

request ​

OptionChainRequest

Returns ​

Promise<NormalizedOptionChain>

Community project — not affiliated with Dhan. MIT License.