Skip to content

API Reference


API Reference / RiskViolationError

Class: RiskViolationError

Defined in: src/errors/RiskViolationError.ts:7

A pre-trade risk check rejected the order. Raised by the risk pipeline before anything reaches the broker, so no order was placed.

Extends

Constructors

Constructor

new RiskViolationError(check, message, details?): RiskViolationError

Defined in: src/errors/RiskViolationError.ts:11

Parameters

check

string

message

string

details?

unknown

Returns

RiskViolationError

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


check

readonly check: string

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

Name of the check that rejected the order, e.g. "quantity".

Community project — not affiliated with Dhan. MIT License.