Skip to content

API Reference


API Reference / LiveTradingDisabledError

Class: LiveTradingDisabledError

Defined in: src/errors/LiveTradingDisabledError.ts:9

A write tool was invoked without the live-trading gate open.

Agent and MCP write paths require both DHANHQ_MCP_ENABLE_WRITES=true and LIVE_TRADING=true, so an agent cannot place orders by default.

Extends

Constructors

Constructor

new LiveTradingDisabledError(message?): LiveTradingDisabledError

Defined in: src/errors/LiveTradingDisabledError.ts:10

Parameters

message?

string = "Write tools require DHANHQ_MCP_ENABLE_WRITES=true and LIVE_TRADING=true"

Returns

LiveTradingDisabledError

Overrides

DhanError.constructor

Properties

code

readonly code: string

Defined in: src/errors/DhanError.ts:2

Inherited from

DhanError.code


status?

readonly optional status?: number

Defined in: src/errors/DhanError.ts:3

Inherited from

DhanError.status


details?

readonly optional details?: unknown

Defined in: src/errors/DhanError.ts:4

Inherited from

DhanError.details


cause?

readonly optional cause?: unknown

Defined in: src/errors/DhanError.ts:5

Inherited from

DhanError.cause

Community project — not affiliated with Dhan. MIT License.