Skip to content

API Reference


API Reference / RequestOptions

Interface: RequestOptions<TBody> ​

Defined in: src/client/HttpClient.ts:30

Type Parameters ​

TBody ​

TBody = unknown

Properties ​

method ​

method: HttpMethod

Defined in: src/client/HttpClient.ts:31


url ​

url: string

Defined in: src/client/HttpClient.ts:32


data? ​

optional data?: TBody

Defined in: src/client/HttpClient.ts:33


params? ​

optional params?: Record<string, unknown>

Defined in: src/client/HttpClient.ts:34


headers? ​

optional headers?: Record<string, string>

Defined in: src/client/HttpClient.ts:35


safeToRetry? ​

optional safeToRetry?: boolean

Defined in: src/client/HttpClient.ts:42

true only for requests with no side effects. Anything else — including omitting the flag — is never replayed by the transport: not after a timeout, not after a 5xx, and not after a 401 that triggered token renewal. Trading writes must leave this false.


tier? ​

optional tier?: "order_api" | "data_api" | "quote_api" | "option_chain" | "non_trading_api"

Defined in: src/client/HttpClient.ts:48

Enforces the documented Dhan rate limit for this endpoint (RATE_LIMITS) in addition to the generic read/write queue. Omit for endpoints without a documented tier-specific limit narrower than the generic default.

Community project — not affiliated with Dhan. MIT License.